Reduces visibility of internal fields/methods
Reduces the visibility of all fields to private and create setters/getters when necessary. Exceptions are fields with GuiSync as these need to be public. Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
@@ -54,18 +54,18 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
||||
// rather simple client side caching.
|
||||
private static final Map<ItemStack, ItemStack> SIMPLE_CACHE = new WeakHashMap<ItemStack, ItemStack>();
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
private ModelResourceLocation res;
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
private ModelResourceLocation encodedPatternModel; // TODO: make encoded pattern model!
|
||||
|
||||
public ItemEncodedPattern()
|
||||
{
|
||||
this.setFeature( EnumSet.of( AEFeature.Patterns ) );
|
||||
this.setMaxStackSize( 1 );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelResourceLocation res;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelResourceLocation encodedPatternModel; // TODO: make encoded pattern model!
|
||||
|
||||
@Override
|
||||
public void registerIcons(
|
||||
final ClientHelper proxy,
|
||||
@@ -74,34 +74,34 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
||||
this.encodedPatternModel = this.res = proxy.setIcon( this, name );
|
||||
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( this, new ItemMeshDefinition(){
|
||||
|
||||
|
||||
boolean recursive = false;
|
||||
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(
|
||||
final ItemStack stack )
|
||||
{
|
||||
if ( this.recursive == false )
|
||||
if( this.recursive == false )
|
||||
{
|
||||
this.recursive = true;
|
||||
|
||||
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) stack.getItem();
|
||||
|
||||
|
||||
final ItemStack is = iep.getOutput( stack );
|
||||
if ( Minecraft.getMinecraft().thePlayer.isSneaking() )
|
||||
if( Minecraft.getMinecraft().thePlayer.isSneaking() )
|
||||
{
|
||||
return ItemEncodedPattern.this.encodedPatternModel;
|
||||
}
|
||||
|
||||
|
||||
this.recursive = false;
|
||||
}
|
||||
|
||||
|
||||
return ItemEncodedPattern.this.res;
|
||||
}
|
||||
});
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack stack, final World w, final EntityPlayer player )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user