Add this qualifier

This commit is contained in:
thatsIch
2015-09-30 14:26:54 +02:00
parent efecd4b8c1
commit ebda927fb5
105 changed files with 422 additions and 415 deletions
+22 -22
View File
@@ -111,7 +111,7 @@ public class ClientHelper extends ServerHelper
@Override
public void configureIcon( final Object item, final String name )
{
iconTmp.add( new IconReg( item, 0, name ) );
this.iconTmp.add( new IconReg( item, 0, name ) );
}
@Override
@@ -271,11 +271,11 @@ public class ClientHelper extends ServerHelper
@Override
public ModelResourceLocation getModelLocation( final ItemStack stack )
{
return partRenderer;
return ClientHelper.this.partRenderer;
}
};
for( final IconReg reg : iconTmp )
for( final IconReg reg : this.iconTmp )
{
if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem )
{
@@ -291,7 +291,7 @@ public class ClientHelper extends ServerHelper
continue;
}
addIcon( reg.name );
this.addIcon( reg.name );
mesher.register( reg.item instanceof Item ? (Item) reg.item : Item.getItemFromBlock( (Block) reg.item ), stack -> renderer.rendererInstance.getResourcePath() );
continue;
@@ -313,7 +313,7 @@ public class ClientHelper extends ServerHelper
}
final String MODID = AppEng.MOD_ID + ":";
for( final List<IconReg> reg : iconRegistrations.values() )
for( final List<IconReg> reg : this.iconRegistrations.values() )
{
final String[] names = new String[reg.size()];
@@ -380,16 +380,16 @@ public class ClientHelper extends ServerHelper
public ResourceLocation addIcon( final String string )
{
final ModelResourceLocation n = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, string ), "inventory" );
extraIcons.add( n );
this.extraIcons.add( n );
return n;
}
public ModelResourceLocation setIcon( final Item item, final String name )
{
List<IconReg> reg = iconRegistrations.get( item );
List<IconReg> reg = this.iconRegistrations.get( item );
if( reg == null )
{
iconRegistrations.put( item, reg = new LinkedList<>() );
this.iconRegistrations.put( item, reg = new LinkedList<>() );
}
final ModelResourceLocation res = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, name ), "inventory" );
@@ -399,10 +399,10 @@ public class ClientHelper extends ServerHelper
public ModelResourceLocation setIcon( final Item item, final int meta, final String name )
{
List<IconReg> reg = iconRegistrations.get( item );
List<IconReg> reg = this.iconRegistrations.get( item );
if( reg == null )
{
iconRegistrations.put( item, reg = new LinkedList<>() );
this.iconRegistrations.put( item, reg = new LinkedList<>() );
}
final ModelResourceLocation res = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, name ), "inventory" );
@@ -493,9 +493,9 @@ public class ClientHelper extends ServerHelper
{
// inventory renderer
final SmartModel buses = new SmartModel( new BlockRenderInfo( ( new RendererCableBus() ) ) );
event.modelRegistry.putObject( partRenderer, buses );
event.modelRegistry.putObject( this.partRenderer, buses );
for( final IconReg reg : iconTmp )
for( final IconReg reg : this.iconTmp )
{
if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem )
{
@@ -553,7 +553,7 @@ public class ClientHelper extends ServerHelper
@SubscribeEvent
public void updateTextureSheet( final TextureStitchEvent.Pre ev )
{
for( final IconReg reg : iconTmp )
for( final IconReg reg : this.iconTmp )
{
if( reg.item instanceof AEBaseItem )
{
@@ -571,7 +571,7 @@ public class ClientHelper extends ServerHelper
}
}
extraIcons.forEach( ev.map::registerSprite );
this.extraIcons.forEach( ev.map::registerSprite );
//if( ev.map.getTextureType() == ITEM_RENDERER )
{
@@ -604,18 +604,18 @@ public class ClientHelper extends ServerHelper
public IconReg( final Object item2, final int meta2, final String name2 )
{
meta = meta2;
name = name2;
item = item2;
loc = null;
this.meta = meta2;
this.name = name2;
this.item = item2;
this.loc = null;
}
public IconReg( final Item item2, final int meta2, final String name2, final ModelResourceLocation res )
{
meta = meta2;
name = name2;
item = item2;
loc = res;
this.meta = meta2;
this.name = name2;
this.item = item2;
this.loc = res;
}
}
}
+4 -4
View File
@@ -47,7 +47,7 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
public SmartModel(
final BlockRenderInfo rendererInstance )
{
AERenderer = rendererInstance;
this.AERenderer = rendererInstance;
}
@Override
@@ -84,7 +84,7 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
@Override
public TextureAtlasSprite getTexture()
{
return AERenderer != null ? AERenderer.getTexture( AEPartLocation.UP ).getAtlas() : MissingIcon.getMissing();
return this.AERenderer != null ? this.AERenderer.getTexture( AEPartLocation.UP ).getAtlas() : MissingIcon.getMissing();
}
@Override
@@ -100,7 +100,7 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
final ModelGenerator helper = new ModelGenerator();
final Block blk = Block.getBlockFromItem( stack.getItem() );
helper.setRenderBoundsFromBlock( blk );
AERenderer.rendererInstance.renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null );
this.AERenderer.rendererInstance.renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null );
helper.finalizeModel( true );
return helper.getOutput();
}
@@ -116,7 +116,7 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
helper.setTranslation( -pos.getX(), -pos.getY(), -pos.getZ() );
helper.setRenderBoundsFromBlock( blk );
helper.blockAccess = world;
AERenderer.rendererInstance.renderInWorld( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, world, pos, helper);
this.AERenderer.rendererInstance.renderInWorld( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, world, pos, helper);
helper.finalizeModel( false );
return helper.getOutput();
}
+11 -11
View File
@@ -239,7 +239,7 @@ public abstract class AEBaseGui extends GuiContainer
}
this.zLevel = 300.0F;
itemRender.zLevel = 300.0F;
this.itemRender.zLevel = 300.0F;
final int var10 = -267386864;
this.drawGradientRect( var6 - 3, var7 - 4, var6 + var5 + 3, var7 - 3, var10, var10 );
this.drawGradientRect( var6 - 3, var7 + var9 + 3, var6 + var5 + 3, var7 + var9 + 4, var10, var10 );
@@ -277,7 +277,7 @@ public abstract class AEBaseGui extends GuiContainer
}
this.zLevel = 0.0F;
itemRender.zLevel = 0.0F;
this.itemRender.zLevel = 0.0F;
}
RenderHelper.enableStandardItemLighting();
GL11.glPopAttrib();
@@ -722,17 +722,17 @@ public abstract class AEBaseGui extends GuiContainer
protected void drawItem( final int x, final int y, final ItemStack is )
{
this.zLevel = 100.0F;
itemRender.zLevel = 100.0F;
this.itemRender.zLevel = 100.0F;
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
GL11.glEnable( GL11.GL_LIGHTING );
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
GL11.glEnable( GL11.GL_DEPTH_TEST );
RenderHelper.enableGUIStandardItemLighting();
itemRender.renderItemAndEffectIntoGUI( is, x, y );
this.itemRender.renderItemAndEffectIntoGUI( is, x, y );
GL11.glPopAttrib();
itemRender.zLevel = 0.0F;
this.itemRender.zLevel = 0.0F;
this.zLevel = 0.0F;
}
@@ -768,7 +768,7 @@ public abstract class AEBaseGui extends GuiContainer
try
{
this.zLevel = 100.0F;
itemRender.zLevel = 100.0F;
this.itemRender.zLevel = 100.0F;
if( !this.isPowered() )
{
@@ -778,7 +778,7 @@ public abstract class AEBaseGui extends GuiContainer
}
this.zLevel = 0.0F;
itemRender.zLevel = 0.0F;
this.itemRender.zLevel = 0.0F;
this.aeRenderItem.aeStack = ( (SlotME) s ).getAEStack();
@@ -864,14 +864,14 @@ public abstract class AEBaseGui extends GuiContainer
if( ( (AppEngSlot) s ).isValid == hasCalculatedValidness.Invalid )
{
this.zLevel = 100.0F;
itemRender.zLevel = 100.0F;
this.itemRender.zLevel = 100.0F;
GL11.glDisable( GL11.GL_LIGHTING );
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66ff6666 );
GL11.glEnable( GL11.GL_LIGHTING );
this.zLevel = 0.0F;
itemRender.zLevel = 0.0F;
this.itemRender.zLevel = 0.0F;
}
}
@@ -904,8 +904,8 @@ public abstract class AEBaseGui extends GuiContainer
}
else
{
final RenderItem ri = itemRender;
itemRender = item;
final RenderItem ri = this.itemRender;
this.itemRender = item;
return ri;
}
}
@@ -60,7 +60,7 @@ public class GuiChest extends AEBaseGui
{
super.initGui();
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
}
@Override
@@ -136,7 +136,7 @@ public class GuiCraftAmount extends AEBaseGui
if( this.originalGui != null && myIcon != null )
{
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), this.itemRender ) );
}
this.amountToCraft = new GuiNumberBox( this.fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRendererObj.FONT_HEIGHT, Integer.class );
@@ -142,7 +142,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
if( this.myIcon != null )
{
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, this.myIcon, this.myIcon.getDisplayName(), itemRender ) );
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, this.myIcon, this.myIcon.getDisplayName(), this.itemRender ) );
this.originalGuiBtn.hideEdge = 13;
}
}
@@ -60,7 +60,7 @@ public class GuiDrive extends AEBaseGui
{
super.initGui();
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
}
@Override
@@ -58,7 +58,7 @@ public class GuiFormationPlane extends GuiUpgradeable
this.placeMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.PLACE_BLOCK, YesNo.YES );
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.buttonList.add( this.placeMode );
this.buttonList.add( this.fuzzyMode );
@@ -56,7 +56,7 @@ public class GuiInterface extends GuiUpgradeable
@Override
protected void addButtons()
{
this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender );
this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender );
this.buttonList.add( this.priority );
this.BlockMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK, YesNo.NO );
@@ -310,7 +310,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if( this.viewCell || this instanceof GuiWirelessTerm )
{
this.buttonList.add( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus.getLocal(), itemRender ) );
this.buttonList.add( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus.getLocal(), this.itemRender ) );
this.craftingStatusBtn.hideEdge = 13;
}
@@ -94,8 +94,8 @@ public class GuiPatternTerm extends GuiMEMonitorable
public void initGui()
{
super.initGui();
this.buttonList.add( this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.crafting_table ), GuiText.CraftingPattern.getLocal(), itemRender ) );
this.buttonList.add( this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.furnace ), GuiText.ProcessingPattern.getLocal(), itemRender ) );
this.buttonList.add( this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.crafting_table ), GuiText.CraftingPattern.getLocal(), this.itemRender ) );
this.buttonList.add( this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.furnace ), GuiText.ProcessingPattern.getLocal(), this.itemRender ) );
// buttonList.add( substitutionsBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163,
// Settings.ACTIONS, ActionItems.SUBSTITUTION ) );
@@ -156,7 +156,7 @@ public class GuiPriority extends AEBaseGui
if( this.OriginalGui != null && myIcon != null )
{
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), this.itemRender ) );
}
this.priority = new GuiNumberBox( this.fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRendererObj.FONT_HEIGHT, Long.class );
@@ -68,7 +68,7 @@ public class GuiStorageBus extends GuiUpgradeable
this.storageFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), this.itemRender ) );
this.buttonList.add( this.storageFilter );
this.buttonList.add( this.fuzzyMode );
@@ -763,6 +763,6 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
public ModelResourceLocation getResourcePath()
{
return modelPath;
return this.modelPath;
}
}
@@ -113,8 +113,8 @@ public class BusRenderer implements IItemRenderer
GL11.glScaled( 1.2, 1.2, 1. );
GL11.glColor4f( 1, 1, 1, 1 );
renderer.setColorOpaque_F( 1, 1, 1 );
renderer.setBrightness( 14 << 20 | 14 << 4 );
this.renderer.setColorOpaque_F( 1, 1, 1 );
this.renderer.setBrightness( 14 << 20 | 14 << 4 );
BusRenderHelper.INSTANCE.setBounds( 0, 0, 0, 1, 1, 1 );
BusRenderHelper.INSTANCE.setTexture( null );
@@ -20,42 +20,42 @@ public class IconUnwrapper extends TextureAtlasSprite
final IAESprite src )
{
super( src.getIconName() );
width = src.getIconWidth();
height = src.getIconHeight();
min_u = src.getMinU();
max_u = src.getMaxU();
min_v = src.getMinV();
max_v = src.getMaxV();
this.width = src.getIconWidth();
this.height = src.getIconHeight();
this.min_u = src.getMinU();
this.max_u = src.getMaxU();
this.min_v = src.getMinV();
this.max_v = src.getMaxV();
}
@Override
public int getIconWidth()
{
return width;
return this.width;
}
@Override
public int getIconHeight()
{
return height;
return this.height;
}
@Override
public float getMaxU()
{
return max_u;
return this.max_u;
}
@Override
public float getMinV()
{
return min_v;
return this.min_v;
}
@Override
public float getMaxV()
{
return max_v;
return this.max_v;
}
@Override
@@ -67,7 +67,7 @@ public class IconUnwrapper extends TextureAtlasSprite
@Override
public float getMinU()
{
return min_u;
return this.min_u;
}
@Override
@@ -42,9 +42,9 @@ public class ModelGenerator
public CachedModel()
{
general = new ArrayList<BakedQuad>();
this.general = new ArrayList<BakedQuad>();
for ( final EnumFacing f : EnumFacing.VALUES )
faces[f.ordinal()] = new ArrayList<BakedQuad>();
this.faces[f.ordinal()] = new ArrayList<BakedQuad>();
}
@Override
@@ -80,14 +80,14 @@ public class ModelGenerator
@Override
public List getGeneralQuads()
{
return general;
return this.general;
}
@Override
public List getFaceQuads(
final EnumFacing p_177551_1_ )
{
return faces[p_177551_1_.ordinal()];
return this.faces[p_177551_1_.ordinal()];
}
}
@@ -123,13 +123,13 @@ public class ModelGenerator
final Block block )
{
if ( block == null ) return;
renderMinX = block.getBlockBoundsMinX();
renderMinY = block.getBlockBoundsMinY();
renderMinZ = block.getBlockBoundsMinZ();
renderMaxX = block.getBlockBoundsMaxX();
renderMaxY = block.getBlockBoundsMaxY();
renderMaxZ = block.getBlockBoundsMaxZ();
this.renderMinX = block.getBlockBoundsMinX();
this.renderMinY = block.getBlockBoundsMinY();
this.renderMinZ = block.getBlockBoundsMinZ();
this.renderMaxX = block.getBlockBoundsMaxX();
this.renderMaxY = block.getBlockBoundsMaxY();
this.renderMaxZ = block.getBlockBoundsMaxZ();
}
public void setRenderBounds(
@@ -140,12 +140,12 @@ public class ModelGenerator
final double h,
final double i )
{
renderMinX = d;
renderMinY = e;
renderMinZ = f;
renderMaxX = g;
renderMaxY = h;
renderMaxZ = i;
this.renderMinX = d;
this.renderMinY = e;
this.renderMinZ = f;
this.renderMaxX = g;
this.renderMaxY = h;
this.renderMaxZ = i;
}
int color = -1;
@@ -153,7 +153,7 @@ public class ModelGenerator
public void setBrightness(
final int i )
{
brightness=i;
this.brightness =i;
}
public void setColorRGBA_F(
@@ -163,7 +163,7 @@ public class ModelGenerator
final float a )
{
final int alpha = ( int ) ( a * 0xff );
color = alpha << 24 |
this.color = alpha << 24 |
r << 16 |
b << 8 |
b;
@@ -173,7 +173,7 @@ public class ModelGenerator
final int whiteVariant )
{
final int alpha = 0xff;
color = //alpha << 24 |
this.color = //alpha << 24 |
whiteVariant;
}
public void setColorOpaque(
@@ -182,7 +182,7 @@ public class ModelGenerator
final int b )
{
final int alpha = 0xff;
color =// alpha << 24 |
this.color =// alpha << 24 |
r << 16 |
g << 8 |
b;
@@ -194,7 +194,7 @@ public class ModelGenerator
final int b )
{
final int alpha = 0xff;
color = //alpha << 24 |
this.color = //alpha << 24 |
Math.min( 0xff, Math.max( 0, r ) ) << 16 |
Math.min( 0xff, Math.max( 0, g ) ) << 8 |
Math.min( 0xff, Math.max( 0, b ) );
@@ -209,7 +209,7 @@ public class ModelGenerator
final int g = (int)( gf * 0xff );
final int b = (int)( bf * 0xff );
final int alpha = 0xff;
color = //alpha << 24 |
this.color = //alpha << 24 |
Math.min( 0xff, Math.max( 0, r ) ) << 16 |
Math.min( 0xff, Math.max( 0, g ) ) << 8 |
Math.min( 0xff, Math.max( 0, b ) );
@@ -226,7 +226,7 @@ public class ModelGenerator
final Block blk = Block.getBlockFromItem( it );
if ( blk != null )
return getIcon(blk.getStateFromMeta( is.getMetadata() ))[0];
return this.getIcon(blk.getStateFromMeta( is.getMetadata() ))[0];
if ( it instanceof AEBaseItem )
{
@@ -293,7 +293,7 @@ public class ModelGenerator
return out;
}
return getIcon( state );
return this.getIcon( state );
}
int point =0;
@@ -308,48 +308,48 @@ public class ModelGenerator
final double u,
final double v )
{
points[point++] = new float[]{ (float)x+tx, (float)y+ty, (float)z+tz, (float)u, (float)v };
this.points[this.point++] = new float[]{ (float)x+ this.tx, (float)y+ this.ty, (float)z+ this.tz, (float)u, (float)v };
if ( point == 4 )
if ( this.point == 4 )
{
brightness = -1;
this.brightness = -1;
final int[] vertData = {
Float.floatToRawIntBits( points[0][0] ),
Float.floatToRawIntBits( points[0][1] ),
Float.floatToRawIntBits( points[0][2] ),
brightness,
Float.floatToRawIntBits( points[0][3] ),
Float.floatToRawIntBits( points[0][4] ),
Float.floatToRawIntBits( this.points[0][0] ),
Float.floatToRawIntBits( this.points[0][1] ),
Float.floatToRawIntBits( this.points[0][2] ),
this.brightness,
Float.floatToRawIntBits( this.points[0][3] ),
Float.floatToRawIntBits( this.points[0][4] ),
0,
Float.floatToRawIntBits( points[1][0] ),
Float.floatToRawIntBits( points[1][1] ),
Float.floatToRawIntBits( points[1][2] ),
brightness,
Float.floatToRawIntBits( points[1][3] ),
Float.floatToRawIntBits( points[1][4] ),
Float.floatToRawIntBits( this.points[1][0] ),
Float.floatToRawIntBits( this.points[1][1] ),
Float.floatToRawIntBits( this.points[1][2] ),
this.brightness,
Float.floatToRawIntBits( this.points[1][3] ),
Float.floatToRawIntBits( this.points[1][4] ),
0,
Float.floatToRawIntBits( points[2][0] ),
Float.floatToRawIntBits( points[2][1] ),
Float.floatToRawIntBits( points[2][2] ),
brightness,
Float.floatToRawIntBits( points[2][3] ),
Float.floatToRawIntBits( points[2][4] ),
Float.floatToRawIntBits( this.points[2][0] ),
Float.floatToRawIntBits( this.points[2][1] ),
Float.floatToRawIntBits( this.points[2][2] ),
this.brightness,
Float.floatToRawIntBits( this.points[2][3] ),
Float.floatToRawIntBits( this.points[2][4] ),
0,
Float.floatToRawIntBits( points[3][0] ),
Float.floatToRawIntBits( points[3][1] ),
Float.floatToRawIntBits( points[3][2] ),
brightness,
Float.floatToRawIntBits( points[3][3] ),
Float.floatToRawIntBits( points[3][4] ),
Float.floatToRawIntBits( this.points[3][0] ),
Float.floatToRawIntBits( this.points[3][1] ),
Float.floatToRawIntBits( this.points[3][2] ),
this.brightness,
Float.floatToRawIntBits( this.points[3][3] ),
Float.floatToRawIntBits( this.points[3][4] ),
0,
};
generatedModel.general.add( new IColoredBakedQuad.ColoredBakedQuad( vertData, color, face ));
point=0;
this.generatedModel.general.add( new IColoredBakedQuad.ColoredBakedQuad( vertData, this.color, face ));
this.point =0;
}
}
@@ -359,15 +359,15 @@ public class ModelGenerator
{
//setRenderBoundsFromBlock( block );
final IAESprite[] textures = getIcon( blockAccess,pos );
setColorOpaque_I( 0xffffff );
final IAESprite[] textures = this.getIcon( this.blockAccess,pos );
this.setColorOpaque_I( 0xffffff );
renderFaceXNeg( block, pos, textures[EnumFacing.WEST.ordinal()] );
renderFaceXPos( block, pos, textures[EnumFacing.EAST.ordinal()] );
renderFaceYNeg( block, pos, textures[EnumFacing.DOWN.ordinal()] );
renderFaceYPos( block, pos, textures[EnumFacing.UP.ordinal()] );
renderFaceZNeg( block, pos, textures[EnumFacing.NORTH.ordinal()] );
renderFaceZPos( block, pos, textures[EnumFacing.SOUTH.ordinal()] );
this.renderFaceXNeg( block, pos, textures[EnumFacing.WEST.ordinal()] );
this.renderFaceXPos( block, pos, textures[EnumFacing.EAST.ordinal()] );
this.renderFaceYNeg( block, pos, textures[EnumFacing.DOWN.ordinal()] );
this.renderFaceYPos( block, pos, textures[EnumFacing.UP.ordinal()] );
this.renderFaceZNeg( block, pos, textures[EnumFacing.NORTH.ordinal()] );
this.renderFaceZPos( block, pos, textures[EnumFacing.SOUTH.ordinal()] );
return false;
}
@@ -377,9 +377,9 @@ public class ModelGenerator
final int y,
final int z )
{
tx=x;
ty=y;
tz=z;
this.tx =x;
this.ty =y;
this.tz =z;
}
public boolean isAlphaPass()
@@ -458,17 +458,17 @@ public class ModelGenerator
to_b = 1.0f - to_b;
final float[] afloat = {// :P
16.0f * ( quadsUV[0] + quadsUV[2] * from_a + quadsUV[4] * from_b ), // 0
16.0f * ( quadsUV[1] + quadsUV[3] * from_a + quadsUV[5] * from_b ), // 1
16.0f * ( this.quadsUV[0] + this.quadsUV[2] * from_a + this.quadsUV[4] * from_b ), // 0
16.0f * ( this.quadsUV[1] + this.quadsUV[3] * from_a + this.quadsUV[5] * from_b ), // 1
16.0f * ( quadsUV[0] + quadsUV[2] * to_a + quadsUV[4] * from_b ), // 2
16.0f * ( quadsUV[1] + quadsUV[3] * to_a + quadsUV[5] * from_b ), // 3
16.0f * ( this.quadsUV[0] + this.quadsUV[2] * to_a + this.quadsUV[4] * from_b ), // 2
16.0f * ( this.quadsUV[1] + this.quadsUV[3] * to_a + this.quadsUV[5] * from_b ), // 3
16.0f * ( quadsUV[0] + quadsUV[2] * to_a + quadsUV[4] * to_b ), // 2
16.0f * ( quadsUV[1] + quadsUV[3] * to_a + quadsUV[5] * to_b ), // 3
16.0f * ( this.quadsUV[0] + this.quadsUV[2] * to_a + this.quadsUV[4] * to_b ), // 2
16.0f * ( this.quadsUV[1] + this.quadsUV[3] * to_a + this.quadsUV[5] * to_b ), // 3
16.0f * ( quadsUV[0] + quadsUV[2] * from_a + quadsUV[4] * to_b ), // 0
16.0f * ( quadsUV[1] + quadsUV[3] * from_a + quadsUV[5] * to_b ), // 1
16.0f * ( this.quadsUV[0] + this.quadsUV[2] * from_a + this.quadsUV[4] * to_b ), // 0
16.0f * ( this.quadsUV[1] + this.quadsUV[3] * from_a + this.quadsUV[5] * to_b ), // 1
};
return afloat;
@@ -479,12 +479,12 @@ public class ModelGenerator
final BlockPos pos,
final IAESprite lights )
{
final boolean isEdge = renderMinX < 0.0001;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ * 16.0f);
final Vector3f from = new Vector3f( (float)renderMinX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ * 16.0f);
final boolean isEdge = this.renderMinX < 0.0001;
final Vector3f to = new Vector3f( (float) this.renderMinX * 16.0f, (float) this.renderMinY * 16.0f, (float) this.renderMinZ * 16.0f);
final Vector3f from = new Vector3f( (float) this.renderMinX * 16.0f, (float) this.renderMaxY * 16.0f, (float) this.renderMaxZ * 16.0f);
final EnumFacing myFace = EnumFacing.WEST;
addFace(myFace, isEdge,to,from,defUVs,lights );
this.addFace(myFace, isEdge,to,from, this.defUVs,lights );
}
public void renderFaceYNeg(
@@ -492,12 +492,12 @@ public class ModelGenerator
final BlockPos pos,
final IAESprite lights )
{
final boolean isEdge = renderMinY < 0.0001;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMinY* 16.0f, (float)renderMaxZ* 16.0f );
final boolean isEdge = this.renderMinY < 0.0001;
final Vector3f to = new Vector3f( (float) this.renderMinX * 16.0f, (float) this.renderMinY * 16.0f, (float) this.renderMinZ * 16.0f );
final Vector3f from = new Vector3f( (float) this.renderMaxX * 16.0f, (float) this.renderMinY * 16.0f, (float) this.renderMaxZ * 16.0f );
final EnumFacing myFace = EnumFacing.DOWN;
addFace(myFace, isEdge,to,from,defUVs, lights );
this.addFace(myFace, isEdge,to,from, this.defUVs, lights );
}
public void renderFaceZNeg(
@@ -505,12 +505,12 @@ public class ModelGenerator
final BlockPos pos,
final IAESprite lights )
{
final boolean isEdge = renderMinZ < 0.0001;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMinZ* 16.0f );
final boolean isEdge = this.renderMinZ < 0.0001;
final Vector3f to = new Vector3f( (float) this.renderMinX * 16.0f, (float) this.renderMinY * 16.0f, (float) this.renderMinZ * 16.0f );
final Vector3f from = new Vector3f( (float) this.renderMaxX * 16.0f, (float) this.renderMaxY * 16.0f, (float) this.renderMinZ * 16.0f );
final EnumFacing myFace = EnumFacing.NORTH;
addFace(myFace, isEdge,to,from,defUVs, lights );
this.addFace(myFace, isEdge,to,from, this.defUVs, lights );
}
public void renderFaceYPos(
@@ -518,12 +518,12 @@ public class ModelGenerator
final BlockPos pos,
final IAESprite lights )
{
final boolean isEdge = renderMaxY > 0.9999;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ * 16.0f);
final boolean isEdge = this.renderMaxY > 0.9999;
final Vector3f to = new Vector3f( (float) this.renderMinX * 16.0f, (float) this.renderMaxY * 16.0f, (float) this.renderMinZ * 16.0f );
final Vector3f from = new Vector3f( (float) this.renderMaxX * 16.0f, (float) this.renderMaxY * 16.0f, (float) this.renderMaxZ * 16.0f);
final EnumFacing myFace = EnumFacing.UP;
addFace(myFace, isEdge,to,from,defUVs,lights );
this.addFace(myFace, isEdge,to,from, this.defUVs,lights );
}
public void renderFaceZPos(
@@ -531,12 +531,12 @@ public class ModelGenerator
final BlockPos pos,
final IAESprite lights )
{
final boolean isEdge = renderMaxZ > 0.9999;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMaxZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ* 16.0f );
final boolean isEdge = this.renderMaxZ > 0.9999;
final Vector3f to = new Vector3f( (float) this.renderMinX * 16.0f, (float) this.renderMinY * 16.0f, (float) this.renderMaxZ * 16.0f );
final Vector3f from = new Vector3f( (float) this.renderMaxX * 16.0f, (float) this.renderMaxY * 16.0f, (float) this.renderMaxZ * 16.0f );
final EnumFacing myFace = EnumFacing.SOUTH;
addFace(myFace, isEdge,to,from,defUVs,lights );
this.addFace(myFace, isEdge,to,from, this.defUVs,lights );
}
public void renderFaceXPos(
@@ -544,12 +544,12 @@ public class ModelGenerator
final BlockPos pos,
final IAESprite lights )
{
final boolean isEdge = renderMaxX > 0.9999;
final Vector3f to = new Vector3f( (float)renderMaxX * 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ* 16.0f );
final boolean isEdge = this.renderMaxX > 0.9999;
final Vector3f to = new Vector3f( (float) this.renderMaxX * 16.0f, (float) this.renderMinY * 16.0f, (float) this.renderMinZ * 16.0f );
final Vector3f from = new Vector3f( (float) this.renderMaxX * 16.0f, (float) this.renderMaxY * 16.0f, (float) this.renderMaxZ * 16.0f );
final EnumFacing myFace = EnumFacing.EAST;
addFace(myFace, isEdge,to,from,defUVs, lights );
this.addFace(myFace, isEdge,to,from, this.defUVs, lights );
}
private void addFace(
@@ -559,10 +559,10 @@ public class ModelGenerator
final float[] defUVs2,
IAESprite texture )
{
if ( overrideBlockTexture != null )
texture = overrideBlockTexture;
faces.add( new SMFace(face,isEdge,color,to,from,defUVs2,new IconUnwrapper(texture)));
if ( this.overrideBlockTexture != null )
texture = this.overrideBlockTexture;
this.faces.add( new SMFace( face, isEdge, this.color, to, from, defUVs2, new IconUnwrapper( texture ) ) );
}
EnumFacing currentFace = EnumFacing.UP;
@@ -572,18 +572,24 @@ public class ModelGenerator
final float y,
final float z )
{
if ( x > 0.5 ) currentFace = EnumFacing.EAST;
if ( x < -0.5 ) currentFace = EnumFacing.WEST;
if ( y > 0.5 ) currentFace = EnumFacing.UP;
if ( y < -0.5 ) currentFace = EnumFacing.DOWN;
if ( z > 0.5 ) currentFace = EnumFacing.SOUTH;
if ( z < -0.5 ) currentFace = EnumFacing.NORTH;
if ( x > 0.5 )
this.currentFace = EnumFacing.EAST;
if ( x < -0.5 )
this.currentFace = EnumFacing.WEST;
if ( y > 0.5 )
this.currentFace = EnumFacing.UP;
if ( y < -0.5 )
this.currentFace = EnumFacing.DOWN;
if ( z > 0.5 )
this.currentFace = EnumFacing.SOUTH;
if ( z < -0.5 )
this.currentFace = EnumFacing.NORTH;
}
public void setOverrideBlockTexture(
final IAESprite object )
{
overrideBlockTexture = object;
this.overrideBlockTexture = object;
}
public void finalizeModel( final boolean Flip )
@@ -593,15 +599,15 @@ public class ModelGenerator
if ( Flip )
mr = ModelRotation.X0_Y180;
for ( final SMFace face : faces )
for ( final SMFace face : this.faces )
{
final EnumFacing myFace = face.face;
final float[] uvs = getFaceUvs( myFace, face.from, face.to );
final float[] uvs = this.getFaceUvs( myFace, face.from, face.to );
final BlockFaceUV uv = new BlockFaceUV( uvs, 0 );
final BlockPartFace bpf = new BlockPartFace( myFace, face.color, "", uv );
BakedQuad bf = faceBakery.makeBakedQuad( face.to, face.from, bpf, face.spite, myFace, mr, null, true, true );
BakedQuad bf = this.faceBakery.makeBakedQuad( face.to, face.from, bpf, face.spite, myFace, mr, null, true, true );
bf = new IColoredBakedQuad.ColoredBakedQuad( bf.getVertexData(), face.color, bf.getFace() );
if ( face.isEdge )
@@ -613,7 +619,7 @@ public class ModelGenerator
public IBakedModel getOutput()
{
return generatedModel;
return this.generatedModel;
}
}
@@ -57,7 +57,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
public void renderInventory( final BlockWireless blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
this.blk = blk;
center = new BlockPos(0,0,0);
this.center = new BlockPos(0,0,0);
this.hasChan = false;
this.hasPower = false;
final BlockRenderInfo ri = blk.getRendererInstance();
@@ -128,7 +128,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
this.renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz );
super.renderInWorld( blk, world, pos, renderer );
center = pos;
this.center = pos;
ri.setTemporaryRenderIcon( null );
this.renderTorchAtAngle( renderer, fdx, fdy, fdz );
@@ -210,7 +210,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
private void renderTorchAtAngle( final ModelGenerator renderer, final EnumFacing x, final EnumFacing y, final EnumFacing z )
{
final IAESprite r = ( this.hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : renderer.getIcon( blk.getDefaultState() )[0] );
final IAESprite r = ( this.hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : renderer.getIcon( this.blk.getDefaultState() )[0] );
final IAESprite sides = new OffsetIcon( r, 0.0f, -2.0f );
switch( z )
@@ -251,14 +251,14 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
renderer.setColorOpaque_I( 0xffffff );
this.renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x,y,z );
this.renderFace( center, this.blk, sides, renderer, y );
this.renderFace( center, this.blk, sides, renderer, y.getOpposite() );
this.renderFace( this.center, this.blk, sides, renderer, y );
this.renderFace( this.center, this.blk, sides, renderer, y.getOpposite() );
this.renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z );
this.renderFace( center, this.blk, sides, renderer, x );
this.renderFace( center, this.blk, sides, renderer, x.getOpposite() );
this.renderFace( this.center, this.blk, sides, renderer, x );
this.renderFace( this.center, this.blk, sides, renderer, x.getOpposite() );
this.renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z );
this.renderFace( center, this.blk, r, renderer, z );
this.renderFace( this.center, this.blk, r, renderer, z );
}
}
@@ -8,69 +8,69 @@ public class BaseIcon implements IAESprite
public BaseIcon( final TextureAtlasSprite src )
{
spite = src;
this.spite = src;
}
@Override
public int getIconWidth()
{
return spite.getIconWidth();
return this.spite.getIconWidth();
}
@Override
public int getIconHeight()
{
return spite.getIconHeight();
return this.spite.getIconHeight();
}
@Override
public float getMaxU()
{
return spite.getMaxU();
return this.spite.getMaxU();
}
@Override
public float getInterpolatedU(
final double px )
{
return spite.getInterpolatedU( px );
return this.spite.getInterpolatedU( px );
}
@Override
public float getMinV()
{
return spite.getMinV();
return this.spite.getMinV();
}
@Override
public float getMaxV()
{
return spite.getMaxV();
return this.spite.getMaxV();
}
@Override
public String getIconName()
{
return spite.getIconName();
return this.spite.getIconName();
}
@Override
public float getInterpolatedV(
final double px )
{
return spite.getInterpolatedV( px );
return this.spite.getInterpolatedV( px );
}
@Override
public float getMinU()
{
return spite.getMinU();
return this.spite.getMinU();
}
@Override
public TextureAtlasSprite getAtlas()
{
return spite;
return this.spite;
}
}
@@ -108,6 +108,6 @@ public enum CableBusTextures
public void registerIcon( final TextureMap map )
{
IIcon = new BaseIcon( map.registerSprite( new ResourceLocation( AppEng.MOD_ID, "blocks/" + name ) ) );
this.IIcon = new BaseIcon( map.registerSprite( new ResourceLocation( AppEng.MOD_ID, "blocks/" + this.name ) ) );
}
}
@@ -118,6 +118,6 @@ public enum ExtraBlockTextures
public void registerIcon( final TextureMap map )
{
IIcon = new BaseIcon( map.registerSprite( new ResourceLocation( AppEng.MOD_ID, "blocks/" + name ) ) );
this.IIcon = new BaseIcon( map.registerSprite( new ResourceLocation( AppEng.MOD_ID, "blocks/" + this.name ) ) );
}
}
@@ -59,6 +59,6 @@ public enum ExtraItemTextures
public void registerIcon( final TextureMap map )
{
IIcon = new BaseIcon( map.registerSprite( new ResourceLocation( AppEng.MOD_ID, "items/" + name ) ) );
this.IIcon = new BaseIcon( map.registerSprite( new ResourceLocation( AppEng.MOD_ID, "items/" + this.name ) ) );
}
}
@@ -32,7 +32,7 @@ public class FlippableIcon implements IAESprite
@Override
public TextureAtlasSprite getAtlas()
{
return original.getAtlas();
return this.original.getAtlas();
}
public FlippableIcon( final IAESprite o )
@@ -42,7 +42,7 @@ public class FullIcon implements IAESprite
@Override
public TextureAtlasSprite getAtlas()
{
return p;
return this.p;
}
@Override
@@ -118,6 +118,6 @@ public class OffsetIcon implements IAESprite
@Override
public TextureAtlasSprite getAtlas()
{
return p.getAtlas();
return this.p.getAtlas();
}
}
@@ -34,7 +34,7 @@ public class TaughtIcon implements IAESprite
@Override
public TextureAtlasSprite getAtlas()
{
return icon.getAtlas();
return this.icon.getAtlas();
}
public TaughtIcon( final IAESprite iIcon, final float tightness )