Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes coremod #3038

Merged
merged 1 commit into from
Aug 17, 2017
Merged

Removes coremod #3038

merged 1 commit into from
Aug 17, 2017

Conversation

yueh
Copy link
Member

@yueh yueh commented Aug 17, 2017

From now on every integration must not rely on method stripping through
a coremod or @optional. Notable example for a very good solution is IC2.

As consequence this drops all support for RF and mods must support on of
our supported energy types. At the time of writing, ForgeEnergy and
IC2/EU.

From now on every integration must not rely on method stripping through
a coremod or @optional. Notable example for a very good solution is IC2.

As consequence this drops all support for RF and mods must support on of
our supported energy types. At the time of writing, ForgeEnergy and
IC2/EU.
this.setInternalCurrentPower( this.getInternalCurrentPower() + amt );
if( this.getInternalCurrentPower() > this.getInternalMaxPower() )
{
amt = this.getInternalCurrentPower() - this.getInternalMaxPower();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Introduce a new variable instead of reusing the parameter "amt". rule

}

@TileEvent( TileEventType.WORLD_NBT_WRITE )
public void writeToNBT_AERootPoweredTile( final NBTTagCompound data )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

return PowerUnits.AE.convertTo( externalUnit, Math.max( 0.0, this.getFunnelPowerDemand( externalUnit.convertTo( PowerUnits.AE, maxPowerRequired ) ) ) );
}

protected double getFunnelPowerDemand( final double maxRequired )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Remove this unused method parameter "maxRequired". rule

return amt;
}

amt = this.getInternalCurrentPower();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Introduce a new variable instead of reusing the parameter "amt". rule

}
else if( capability == Capabilities.TESLA_CONSUMER )
{
if( this.getPowerSides().contains( facing ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Merge this if statement with the enclosing one. rule

}

@TileEvent( TileEventType.WORLD_NBT_READ )
public void readFromNBT_AERootPoweredTile( final NBTTagCompound data )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

}
}

protected void PowerEvent( final PowerEventType x )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

}
else if( capability == Capabilities.TESLA_CONSUMER )
{
if( this.getPowerSides().contains( facing ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Merge this if statement with the enclosing one. rule

@Override
public boolean hasCapability( Capability<?> capability, EnumFacing facing )
{
if( capability == Capabilities.FORGE_ENERGY )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Remove this conditional structure or edit its code blocks so that they're not all the same. rule

this.addNewAttunement( "thermalfoundation", TunnelType.RF_POWER );
this.addNewAttunement( "thermaldynamics", TunnelType.FE_POWER );
this.addNewAttunement( "thermalexpansion", TunnelType.FE_POWER );
this.addNewAttunement( "thermalfoundation", TunnelType.FE_POWER );
// TODO: Remove when confirmed that the official 1.12 version of EnderIO will support FE.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFO Complete the task associated to this TODO comment. rule

// fluxduct
this.addNewAttunement( this.getModItem( "thermaldynamics", "duct_0", 5 ), TunnelType.RF_POWER ); // cryo-stabilized
// fluxduct
this.addNewAttunement( this.getModItem( "thermaldynamics", "duct_0", 0 ), TunnelType.FE_POWER );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL Define a constant instead of duplicating this literal "thermaldynamics" 15 times. rule

// TODO: Remove when confirmed that the official 1.12 version of EnderIO will support FE.
this.addNewAttunement( "enderio", TunnelType.RF_POWER );
this.addNewAttunement( "enderio", TunnelType.FE_POWER );
// TODO: Remove when confirmed that the official 1.12 version of Mekanism will support FE.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFO Complete the task associated to this TODO comment. rule

// TODO: Remove when confirmed that the official 1.12 version of Mekanism will support FE.
this.addNewAttunement( "mekanism", TunnelType.RF_POWER );
this.addNewAttunement( "mekanism", TunnelType.FE_POWER );
// TODO: Remove when support for RFTools' Powercells support is added

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFO Complete the task associated to this TODO comment. rule

@orod-org
Copy link

SonarQube analysis reported 35 issues

  • CRITICAL 9 critical
  • MAJOR 14 major
  • MINOR 9 minor
  • INFO 3 info

Watch the comments in this conversation to review them.

Top 10 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL P2PTunnelRegistry.java#L122: Define a constant instead of duplicating this literal "extrautilities" 3 times. rule
  2. CRITICAL P2PTunnelRegistry.java#L123: Define a constant instead of duplicating this literal "mekanism" 4 times. rule
  3. CRITICAL P2PTunnelRegistry.java#L125: Define a constant instead of duplicating this literal "duct_32" 4 times. rule
  4. CRITICAL P2PTunnelRegistry.java#L146: Define a constant instead of duplicating this literal "duct_16" 4 times. rule
  5. CRITICAL P2PTunnelRegistry.java#L201: Remove this "Nullable" annotation to honor the overridden method's contract. rule
  6. CRITICAL P2PTunnelRegistry.java#L203: The Cyclomatic Complexity of this method "getTunnelTypeByItem" is 11 which is greater than 10 authorized. rule
  7. CRITICAL IntegrationType.java#L65: Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule
  8. MAJOR Registration.java#L128: Add a constructor to the class. rule
  9. MAJOR Registration.java#L150: This block of commented-out lines of code should be removed. rule
  10. MAJOR Registration.java#L229: Remove this useless assignment to local variable "partHelper". rule

return new RFModule();
}
},

MFR( IntegrationSide.BOTH, "Mine Factory Reloaded", "minefactoryreloaded" ),

Waila( IntegrationSide.BOTH, "Waila", "waila" )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'. rule

@yueh yueh added this to the rv5.alpha - 1.12 milestone Aug 17, 2017
@yueh yueh merged commit c4fa21c into rv5-1.12 Aug 17, 2017
@yueh yueh deleted the feature-remove-coremod branch August 17, 2017 19:17
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants