Formatted code

This commit is contained in:
yueh 2015-12-24 02:03:16 +01:00
parent e94a0cfccf
commit c9e8a6e939
216 changed files with 1196 additions and 1187 deletions

View file

@ -95,7 +95,6 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
this.setTileProvider( this.hasBlockTileEntity() );
}
// update Block value.
private void setTileProvider( final boolean b )
{
@ -115,7 +114,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Nullable
public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final int x, final int y, final int z )
{
return this.getTileEntity( w, new BlockPos(x,y,z) );
return this.getTileEntity( w, new BlockPos( x, y, z ) );
}
@Nullable
@ -163,7 +162,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
final BlockPos pos,
final IBlockState state )
{
final AEBaseTile te = this.getTileEntity( w,pos );
final AEBaseTile te = this.getTileEntity( w, pos );
if( te != null )
{
final ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
@ -219,7 +218,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
return false;
}
return super.recolorBlock( world, pos, side, color);
return super.recolorBlock( world, pos, side, color );
}
@Override
@ -243,7 +242,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
final int eventID,
final int eventParam )
{
super.onBlockEventReceived( worldIn, pos, state ,eventID, eventParam);
super.onBlockEventReceived( worldIn, pos, state, eventID, eventParam );
final TileEntity tileentity = worldIn.getTileEntity( pos );
return tileentity != null ? tileentity.receiveClientEvent( eventID, eventParam ) : false;
}

View file

@ -1,8 +1,11 @@
package appeng.block;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.property.IUnlistedProperty;
public final class UnlistedBlockAccess implements IUnlistedProperty<IBlockAccess>
{
@Override

View file

@ -1,8 +1,11 @@
package appeng.block;
import net.minecraft.util.BlockPos;
import net.minecraftforge.common.property.IUnlistedProperty;
public final class UnlistedBlockPos implements IUnlistedProperty<BlockPos>
{
@Override

View file

@ -60,7 +60,7 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
{
for( final Block craftingUnitBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
{
return ( (BlockCraftingUnit)craftingUnitBlock ).getIcon( side, state );
return ( (BlockCraftingUnit) craftingUnitBlock ).getIcon( side, state );
}
}

View file

@ -35,7 +35,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
public BlockCraftingStorage( final CraftingUnitType type )
{
super(type );
super( type );
this.setTileEntity( TileCraftingStorageTile.class );
}
@ -46,28 +46,28 @@ public class BlockCraftingStorage extends BlockCraftingUnit
}
@Override
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state)
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state )
{
final boolean formed = (boolean)state.getValue( FORMED );
switch( this.type )
final boolean formed = (boolean) state.getValue( FORMED );
switch( this.type )
{
default:
case STORAGE_1K:
return formed ?
super.getIcon( side,state ) :
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
super.getIcon( side, state ) :
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
case STORAGE_4K:
return formed ?
ExtraBlockTextures.BlockCraftingStorage4k.getIcon() :
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
case STORAGE_16K:
return formed ?
ExtraBlockTextures.BlockCraftingStorage16k.getIcon() :
ExtraBlockTextures.BlockCraftingStorage16kFit.getIcon();
ExtraBlockTextures.BlockCraftingStorage16kFit.getIcon();
case STORAGE_64K:
return formed ?
ExtraBlockTextures.BlockCraftingStorage64k.getIcon() :
ExtraBlockTextures.BlockCraftingStorage64kFit.getIcon();
ExtraBlockTextures.BlockCraftingStorage64kFit.getIcon();
}
}

View file

@ -146,7 +146,7 @@ public class BlockCrank extends AEBaseTileBlock
private boolean isCrankable( final World world, final BlockPos pos, final EnumFacing offset )
{
final BlockPos o = pos.offset( offset);
final BlockPos o = pos.offset( offset );
final TileEntity te = world.getTileEntity( o );
return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() );

View file

@ -45,7 +45,7 @@ import appeng.helpers.MetaRotation;
import appeng.tile.misc.TileLightDetector;
public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBlock,ICustomCollision
public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBlock, ICustomCollision
{
public BlockLightDetector()
@ -77,7 +77,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override
protected IProperty[] getAEStates()
{
return new IProperty[]{ BlockTorch.FACING };
return new IProperty[] { BlockTorch.FACING };
}
@Override
@ -213,6 +213,6 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{
return new MetaRotation( w, pos,true );
return new MetaRotation( w, pos, true );
}
}

View file

@ -81,7 +81,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override
protected IProperty[] getAEStates()
{
return new IProperty[]{ BlockTorch.FACING };
return new IProperty[] { BlockTorch.FACING };
}
@Override
@ -196,6 +196,6 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{
return new MetaRotation( w, pos,true );
return new MetaRotation( w, pos, true );
}
}

View file

@ -54,7 +54,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
}
@Override
public appeng.client.texture.IAESprite getIcon( final IBlockAccess w, final BlockPos pos, final EnumFacing side)
public appeng.client.texture.IAESprite getIcon( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
{
final IAESprite ico = super.getIcon( w, pos, side );
final TileVibrationChamber tvc = this.getTileEntity( w, pos );

View file

@ -52,19 +52,19 @@ public class BlockController extends AEBaseTileBlock
};
public static final PropertyEnum CONTROLLER_STATE = PropertyEnum.create("state",ControllerBlockState.class);
public static final PropertyEnum CONTROLLER_STATE = PropertyEnum.create( "state", ControllerBlockState.class );
@Override
protected IProperty[] getAEStates()
{
return new IProperty[]{ CONTROLLER_STATE };
}
@Override
protected IProperty[] getAEStates()
{
return new IProperty[] { CONTROLLER_STATE };
}
@Override
public int getMetaFromState(
final IBlockState state )
{
return ((ControllerBlockState)state.getValue( CONTROLLER_STATE )).ordinal();
return ( (ControllerBlockState) state.getValue( CONTROLLER_STATE ) ).ordinal();
}
@Override

View file

@ -36,9 +36,9 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
}
@Override
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state)
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state )
{
switch( (int)state.getValue( ENERGY_STORAGE ) )
switch( (int) state.getValue( ENERGY_STORAGE ) )
{
default:
case 0:

View file

@ -52,13 +52,13 @@ public class BlockEnergyCell extends AEBaseTileBlock
public int getMetaFromState(
final IBlockState state )
{
return (int)state.getValue( ENERGY_STORAGE );
return (int) state.getValue( ENERGY_STORAGE );
}
@Override
public IBlockState getStateFromMeta( final int meta )
{
return this.getDefaultState().withProperty( ENERGY_STORAGE, Math.min( 7, Math.max( 0, meta ) ) );
return this.getDefaultState().withProperty( ENERGY_STORAGE, Math.min( 7, Math.max( 0, meta ) ) );
}
public BlockEnergyCell()
@ -76,9 +76,9 @@ public class BlockEnergyCell extends AEBaseTileBlock
}
@Override
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final IBlockState state)
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final IBlockState state )
{
switch( (int)state.getValue( ENERGY_STORAGE ) )
switch( (int) state.getValue( ENERGY_STORAGE ) )
{
default:
case 0:
@ -122,7 +122,7 @@ public class BlockEnergyCell extends AEBaseTileBlock
@Override
protected IProperty[] getAEStates()
{
return new IProperty[]{ENERGY_STORAGE};
return new IProperty[] { ENERGY_STORAGE };
}
@Override

View file

@ -123,23 +123,24 @@ public class ClientHelper extends ServerHelper
@Override
public void init()
{
// final Block fluixBlock = GameRegistry.findBlock( "appliedenergistics2", "fluix" );
// Item fluixItem = Item.getItemFromBlock( fluixBlock );
// ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation( "appliedenergistics2:fluix", "inventory" );
// final int DEFAULT_ITEM_SUBTYPE = 0;
// final ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
// // mesher.register( fluixItem, DEFAULT_ITEM_SUBTYPE, itemModelResourceLocation );
//
// final ResourceLocation resource = new ResourceLocation( "appliedenergistics2", "stair.fluix" );
// final ModelResourceLocation fluixStairModel = new ModelResourceLocation( resource, "inventory" );
// AELog.info( "FluixStairModel: " + fluixStairModel );
//
// final Set<Item> items = AEApi.instance().definitions().blocks().fluixStair().maybeItem().asSet();
// for( Item item : items )
// {
// AELog.info( "Registering with %s with unlocalized %s", item, item.getUnlocalizedName() );
// mesher.register( item, DEFAULT_ITEM_SUBTYPE, fluixStairModel );
// }
// final Block fluixBlock = GameRegistry.findBlock( "appliedenergistics2", "fluix" );
// Item fluixItem = Item.getItemFromBlock( fluixBlock );
// ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation( "appliedenergistics2:fluix",
// "inventory" );
// final int DEFAULT_ITEM_SUBTYPE = 0;
// final ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
// // mesher.register( fluixItem, DEFAULT_ITEM_SUBTYPE, itemModelResourceLocation );
//
// final ResourceLocation resource = new ResourceLocation( "appliedenergistics2", "stair.fluix" );
// final ModelResourceLocation fluixStairModel = new ModelResourceLocation( resource, "inventory" );
// AELog.info( "FluixStairModel: " + fluixStairModel );
//
// final Set<Item> items = AEApi.instance().definitions().blocks().fluixStair().maybeItem().asSet();
// for( Item item : items )
// {
// AELog.info( "Registering with %s with unlocalized %s", item, item.getUnlocalizedName() );
// mesher.register( item, DEFAULT_ITEM_SUBTYPE, fluixStairModel );
// }
}
@Override
@ -258,7 +259,7 @@ public class ClientHelper extends ServerHelper
@Override
public void postInit()
{
//RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE );
// RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE );
final RenderManager inst = Minecraft.getMinecraft().getRenderManager();
inst.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed( inst ) );
@ -573,7 +574,7 @@ public class ClientHelper extends ServerHelper
this.extraIcons.forEach( ev.map::registerSprite );
//if( ev.map.getTextureType() == ITEM_RENDERER )
// if( ev.map.getTextureType() == ITEM_RENDERER )
{
for( final ExtraItemTextures et : ExtraItemTextures.values() )
{
@ -581,7 +582,7 @@ public class ClientHelper extends ServerHelper
}
}
//if( ev.map. == BLOCK_RENDERER )
// if( ev.map. == BLOCK_RENDERER )
{
for( final ExtraBlockTextures et : ExtraBlockTextures.values() )
{

View file

@ -48,7 +48,7 @@ public class GuiQuartzKnife extends AEBaseGui
{
super.initGui();
this.name = new GuiTextField( 0,this.fontRendererObj, this.guiLeft + 24, this.guiTop + 32, 79, this.fontRendererObj.FONT_HEIGHT );
this.name = new GuiTextField( 0, this.fontRendererObj, this.guiLeft + 24, this.guiTop + 32, 79, this.fontRendererObj.FONT_HEIGHT );
this.name.setEnableBackgroundDrawing( false );
this.name.setMaxStringLength( 32 );
this.name.setTextColor( 0xFFFFFF );

View file

@ -154,7 +154,7 @@ public class GuiUpgradeable extends AEBaseGui
}
if( this.schedulingMode != null )
{
this.schedulingMode.setVisibility(this.bc.getInstalledUpgrades( Upgrades.CAPACITY ) > 0 && this.bc instanceof PartExportBus );
this.schedulingMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CAPACITY ) > 0 && this.bc instanceof PartExportBus );
}
}

View file

@ -416,7 +416,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
}
}
private static class ButtonAppearance
{
public int index;

View file

@ -55,11 +55,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
/**
* Using itemstack as an icon
*
* @param x x pos of button
* @param y y pos of button
* @param ico used icon
* @param x x pos of button
* @param y y pos of button
* @param ico used icon
* @param message mouse over message
* @param ir renderer
* @param ir renderer
*/
public GuiTabButton( final int x, final int y, final ItemStack ico, final String message, final RenderItem ir )
{

View file

@ -45,10 +45,10 @@ public class MEGuiTextField extends GuiTextField
* Pays attention to the '_' caret.
*
* @param fontRenderer renderer for the strings
* @param xPos absolute left position
* @param yPos absolute top position
* @param width absolute width
* @param height absolute height
* @param xPos absolute left position
* @param yPos absolute top position
* @param width absolute width
* @param height absolute height
*/
public MEGuiTextField( final FontRenderer fontRenderer, final int xPos, final int yPos, final int width, final int height )
{

View file

@ -66,7 +66,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
private final FloatBuffer rotMat = BufferUtils.createFloatBuffer( 16 );
private static int dynRender = 0;
private final ModelResourceLocation modelPath = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, "DynamicRender"+dynRender++ ), "inventory" );
private final ModelResourceLocation modelPath = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, "DynamicRender" + dynRender++ ), "inventory" );
public BaseBlockRender()
{
@ -330,7 +330,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return ORIENTATION_MAP[a][b][c];
}
public void renderInvBlock( final EnumSet<AEPartLocation> sides, final B block, final ItemStack item, final int color, final ModelGenerator tess )
public void renderInvBlock( final EnumSet<AEPartLocation> sides, final B block, final ItemStack item, final int color, final ModelGenerator tess )
{
if( block != null && block.hasSubtypes() && item != null )
{
@ -338,48 +338,48 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
final IAESprite[] icons = tess.getIcon( item == null ? block.getDefaultState() : block.getStateFromMeta( item.getMetadata() ) );
final BlockPos zero = new BlockPos(0,0,0);
final BlockPos zero = new BlockPos( 0, 0, 0 );
if( sides.contains( AEPartLocation.DOWN ) )
{
tess.setNormal( 0.0F, -1.0F, 0.0F );
tess.setColorOpaque_I( color );
tess.renderFaceYNeg( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.DOWN ), icons[ AEPartLocation.DOWN.ordinal() ] ) );
tess.renderFaceYNeg( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.DOWN ), icons[AEPartLocation.DOWN.ordinal()] ) );
}
if( sides.contains( AEPartLocation.UP ) )
{
tess.setNormal( 0.0F, 1.0F, 0.0F );
tess.setColorOpaque_I( color );
tess.renderFaceYPos( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.UP ), icons[ AEPartLocation.UP.ordinal() ] ) );
tess.renderFaceYPos( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.UP ), icons[AEPartLocation.UP.ordinal()] ) );
}
if( sides.contains( AEPartLocation.NORTH ) )
{
tess.setNormal( 0.0F, 0.0F, -1.0F );
tess.setColorOpaque_I( color );
tess.renderFaceZNeg( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.NORTH ), icons[ AEPartLocation.NORTH.ordinal() ] ) );
tess.renderFaceZNeg( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.NORTH ), icons[AEPartLocation.NORTH.ordinal()] ) );
}
if( sides.contains( AEPartLocation.SOUTH ) )
{
tess.setNormal( 0.0F, 0.0F, 1.0F );
tess.setColorOpaque_I( color );
tess.renderFaceZPos( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.SOUTH ), icons[ AEPartLocation.SOUTH.ordinal() ] ) );
tess.renderFaceZPos( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.SOUTH ), icons[AEPartLocation.SOUTH.ordinal()] ) );
}
if( sides.contains( AEPartLocation.WEST ) )
{
tess.setNormal( -1.0F, 0.0F, 0.0F );
tess.setColorOpaque_I( color );
tess.renderFaceXNeg( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.WEST ), icons[ AEPartLocation.WEST.ordinal() ] ) );
tess.renderFaceXNeg( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.WEST ), icons[AEPartLocation.WEST.ordinal()] ) );
}
if( sides.contains( AEPartLocation.EAST ) )
{
tess.setNormal( 1.0F, 0.0F, 0.0F );
tess.setColorOpaque_I( color );
tess.renderFaceXPos( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.EAST ), icons[ AEPartLocation.EAST.ordinal() ]) );
tess.renderFaceXPos( block, zero, this.firstNotNull( tess.getOverrideBlockTexture(), block.getRendererInstance().getTexture( AEPartLocation.EAST ), icons[AEPartLocation.EAST.ordinal()] ) );
}
}
@ -557,25 +557,25 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
final double layerBX = 0.0;
final double layerAY = 0.0;
this.renderFace(orientation, tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
this.renderFace( orientation, tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0, 1.0,
// v -> v
0, edgeThickness, ico, flip );
this.renderFace( orientation,tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
this.renderFace( orientation, tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0.0, edgeThickness,
// v -> v
edgeThickness, 1.0 - edgeThickness, ico, flip );
this.renderFace( orientation,tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
this.renderFace( orientation, tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
1.0 - edgeThickness, 1.0,
// v -> v
edgeThickness, 1.0 - edgeThickness, ico, flip );
this.renderFace( orientation,tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
this.renderFace( orientation, tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0, 1.0,
// v -> v
@ -583,14 +583,14 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
@SideOnly( Side.CLIENT )
private void renderFace( final EnumFacing face, final ModelGenerator tess, final double offsetX, final double offsetY, final double offsetZ, final double ax, final double ay, final double az, final double bx, final double by, final double bz, final double ua, final double ub, final double va, final double vb, final IAESprite ico, final boolean flip )
private void renderFace( final EnumFacing face, final ModelGenerator tess, final double offsetX, final double offsetY, final double offsetZ, final double ax, final double ay, final double az, final double bx, final double by, final double bz, final double ua, final double ub, final double va, final double vb, final IAESprite ico, final boolean flip )
{
if( flip )
{
tess.addVertexWithUV( face,offsetX + ax * ua + bx * va, offsetY + ay * ua + by * va, offsetZ + az * ua + bz * va, ico.getInterpolatedU( ua * 16.0 ), ico.getInterpolatedV( va * 16.0 ) );
tess.addVertexWithUV( face,offsetX + ax * ua + bx * vb, offsetY + ay * ua + by * vb, offsetZ + az * ua + bz * vb, ico.getInterpolatedU( ua * 16.0 ), ico.getInterpolatedV( vb * 16.0 ) );
tess.addVertexWithUV( face,offsetX + ax * ub + bx * vb, offsetY + ay * ub + by * vb, offsetZ + az * ub + bz * vb, ico.getInterpolatedU( ub * 16.0 ), ico.getInterpolatedV( vb * 16.0 ) );
tess.addVertexWithUV( face,offsetX + ax * ub + bx * va, offsetY + ay * ub + by * va, offsetZ + az * ub + bz * va, ico.getInterpolatedU( ub * 16.0 ), ico.getInterpolatedV( va * 16.0 ) );
tess.addVertexWithUV( face, offsetX + ax * ua + bx * va, offsetY + ay * ua + by * va, offsetZ + az * ua + bz * va, ico.getInterpolatedU( ua * 16.0 ), ico.getInterpolatedV( va * 16.0 ) );
tess.addVertexWithUV( face, offsetX + ax * ua + bx * vb, offsetY + ay * ua + by * vb, offsetZ + az * ua + bz * vb, ico.getInterpolatedU( ua * 16.0 ), ico.getInterpolatedV( vb * 16.0 ) );
tess.addVertexWithUV( face, offsetX + ax * ub + bx * vb, offsetY + ay * ub + by * vb, offsetZ + az * ub + bz * vb, ico.getInterpolatedU( ub * 16.0 ), ico.getInterpolatedV( vb * 16.0 ) );
tess.addVertexWithUV( face, offsetX + ax * ub + bx * va, offsetY + ay * ub + by * va, offsetZ + az * ub + bz * va, ico.getInterpolatedU( ub * 16.0 ), ico.getInterpolatedV( va * 16.0 ) );
}
else
{
@ -691,7 +691,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
final BlockPos pos = tile.getPos();
renderer.setTranslation( -pos.getX(), -pos.getY(), -pos.getZ() );
renderer.setTranslation( -pos.getX(), -pos.getY(), -pos.getZ() );
// note that this is a terrible approach...
renderer.setRenderBoundsFromBlock( block );
@ -753,9 +753,9 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
GL11.glPushMatrix();
GL11.glTranslatef( 0, -0.14F, 0 );
//RenderItem.renderInFrame = true;
// RenderItem.renderInFrame = true;
Minecraft.getMinecraft().getRenderManager().renderEntityWithPosYaw( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F );
//RenderItem.renderInFrame = false;
// RenderItem.renderInFrame = false;
GL11.glPopMatrix();
}

View file

@ -1,9 +1,12 @@
package appeng.client.render;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
import net.minecraft.world.IBlockAccess;
public interface ISimpleBlockRenderingHandler
{

View file

@ -1,6 +1,7 @@
package appeng.client.render;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import appeng.client.texture.IAESprite;
@ -71,17 +72,17 @@ public class IconUnwrapper extends TextureAtlasSprite
}
@Override
public float getInterpolatedU( final double d)
{
final float f = this.max_u - this.min_u;
return this.min_u + f * (float)d / 16.0F;
}
public float getInterpolatedU( final double d )
{
final float f = this.max_u - this.min_u;
return this.min_u + f * (float) d / 16.0F;
}
@Override
public float getInterpolatedV( final double d)
{
final float f = this.max_v - this.min_v;
return this.min_v + f * ((float)d / 16.0F);
}
public float getInterpolatedV( final double d )
{
final float f = this.max_v - this.min_v;
return this.min_v + f * ( (float) d / 16.0F );
}
}

View file

@ -1,10 +1,13 @@
package appeng.client.render;
import javax.vecmath.Vector3f;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.EnumFacing;
public class SMFace
{
@ -21,7 +24,7 @@ public class SMFace
private final int color;
public SMFace(
final EnumFacing face , final boolean isEdge,
final EnumFacing face, final boolean isEdge,
final int color,
final Vector3f to,
final Vector3f from,
@ -29,10 +32,10 @@ public class SMFace
final TextureAtlasSprite iconUnwrapper )
{
this.color = color;
this.face=face;
this.face = face;
this.isEdge = isEdge;
this.to=to;
this.from=from;
this.to = to;
this.from = from;
this.uv = defUVs2;
this.spite = iconUnwrapper;
}

View file

@ -76,7 +76,7 @@ public class SpatialSkyRender extends IRenderHandler
GL11.glDepthMask( false );
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
for( int i = 0; i < 6; ++i )
{
@ -145,8 +145,8 @@ public class SpatialSkyRender extends IRenderHandler
private void renderTwinkles()
{
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.startDrawingQuads();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.startDrawingQuads();
for( int i = 0; i < 50; ++i )
{

View file

@ -63,20 +63,20 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
blk.getRendererInstance().setTemporaryRenderIcons( ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null, null );
this.setInvRenderBounds( renderer, 2, 0, 2, 14, 3, 14 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.setInvRenderBounds( renderer, 3, 3, 3, 13, 4, 13 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
blk.getRendererInstance().setTemporaryRenderIcon( null );
blk.getRendererInstance().setTemporaryRenderIcons( null, ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null );
this.setInvRenderBounds( renderer, 2, 13, 2, 14, 16, 14 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.setInvRenderBounds( renderer, 3, 12, 3, 13, 13, 13 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
renderer.setRenderAllFaces( false );
blk.getRendererInstance().setTemporaryRenderIcon( null );
@ -140,13 +140,14 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
final Block blk = Block.getBlockFromItem( sis.getItem() );
/*
if( sis.getItemSpriteNumber() == 0 && block != null && IRenderHelper.renderItemIn3d( blk.getRenderType() ) )
{
GL11.glRotatef( 25.0f, 1.0f, 0.0f, 0.0f );
GL11.glRotatef( 15.0f, 0.0f, 1.0f, 0.0f );
GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
}
*/
* if( sis.getItemSpriteNumber() == 0 && block != null && IRenderHelper.renderItemIn3d(
* blk.getRenderType() ) )
* {
* GL11.glRotatef( 25.0f, 1.0f, 0.0f, 0.0f );
* GL11.glRotatef( 15.0f, 0.0f, 1.0f, 0.0f );
* GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
* }
*/
// << 20 | light << 4;
final int br = tile.getWorld().getCombinedLight( tile.getPos(), 0 );

View file

@ -44,11 +44,11 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
public boolean renderInWorld( final BlockController blk, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
final boolean xx = this.getTileEntity( world, pos.offset( EnumFacing.WEST ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.EAST ) ) instanceof TileController;
final boolean xx = this.getTileEntity( world, pos.offset( EnumFacing.WEST ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.EAST ) ) instanceof TileController;
final boolean yy = this.getTileEntity( world, pos.offset( EnumFacing.DOWN ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.UP ) ) instanceof TileController;
final boolean zz = this.getTileEntity( world, pos.offset( EnumFacing.SOUTH )) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.NORTH ) ) instanceof TileController;
final boolean zz = this.getTileEntity( world, pos.offset( EnumFacing.SOUTH ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.NORTH ) ) instanceof TileController;
final BlockController.ControllerBlockState meta = ( ControllerBlockState ) world.getBlockState( pos ).getValue( BlockController.CONTROLLER_STATE );
final BlockController.ControllerBlockState meta = (ControllerBlockState) world.getBlockState( pos ).getValue( BlockController.CONTROLLER_STATE );
final boolean hasPower = meta != BlockController.ControllerBlockState.OFFLINE;
final boolean isConflict = meta == BlockController.ControllerBlockState.CONFLICTED;

View file

@ -94,29 +94,27 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
GL11.glScalef( -1, 1, 1 );
GL11.glTranslated( -0.5, 0, -0.5 );
//tess.setTranslation( -tc.getPos().getX(), -tc.getPos().getY(), -tc.getPos().getZ() );
//tess.startDrawingQuads();
// tess.setTranslation( -tc.getPos().getX(), -tc.getPos().getY(), -tc.getPos().getZ() );
// tess.startDrawingQuads();
final RenderItem ri = Minecraft.getMinecraft().getRenderItem();
final ItemStack stack = new ItemStack( blk );
final IBakedModel model = ri.getItemModelMesher().getItemModel( stack );
Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor( model, 1.0F, 1.0F, 1.0F, 1.0F );
Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor( model, 1.0F, 1.0F, 1.0F, 1.0F );
/*
renderBlocks.renderAllFaces = true;
renderBlocks.blockAccess = tc.getWorld();
* renderBlocks.renderAllFaces = true;
* renderBlocks.blockAccess = tc.getWorld();
* renderBlocks.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
* renderBlocks.renderStandardBlock( blk, tc.getPos());
* renderBlocks.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D +
* 0.05 );
* renderBlocks.renderStandardBlock( blk, tc.getPos() );
*/
renderBlocks.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
renderBlocks.renderStandardBlock( blk, tc.getPos());
renderBlocks.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 );
renderBlocks.renderStandardBlock( blk, tc.getPos() );
*/
//Tessellator.getInstance().draw();
//tess.setTranslation( 0, 0, 0 );
// Tessellator.getInstance().draw();
// tess.setTranslation( 0, 0, 0 );
RenderHelper.enableStandardItemLighting();
}
}

View file

@ -74,19 +74,19 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
// sides...
this.setInvRenderBounds( renderer, 3, 1, 0, 13, 15, 3 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.setInvRenderBounds( renderer, 0, 1, 0, 3, 15, 16 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.setInvRenderBounds( renderer, 13, 1, 0, 16, 15, 16 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.setInvRenderBounds( renderer, 1, 0, 1, 15, 2, 15 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.setInvRenderBounds( renderer, 1, 14, 1, 15, 16, 15 );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockInscriberInside.getIcon() );
@ -252,7 +252,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
}
}
this.renderItem( is, 0.0f, block, tile, tess, x,y,z, f, renderer );
this.renderItem( is, 0.0f, block, tile, tess, x, y, z, f, renderer );
}
else
{
@ -279,12 +279,14 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
final Block blk = Block.getBlockFromItem( sis.getItem() );
/*
if( sis.getItemSpriteNumber() == 0 && block != null && IRenderHelper.renderItemIn3d( blk.getRenderType() ) )
{
GL11.glRotatef( 25.0f, 1.0f, 0.0f, 0.0f );
GL11.glRotatef( 15.0f, 0.0f, 1.0f, 0.0f );
GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
}*/
* if( sis.getItemSpriteNumber() == 0 && block != null && IRenderHelper.renderItemIn3d(
* blk.getRenderType() ) )
* {
* GL11.glRotatef( 25.0f, 1.0f, 0.0f, 0.0f );
* GL11.glRotatef( 15.0f, 0.0f, 1.0f, 0.0f );
* GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
* }
*/
GL11.glRotatef( 90.0f, 1, 0, 0 );

View file

@ -59,25 +59,25 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
@Override
public void renderInventory( final BlockSkyChest blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
//GL11.glEnable( GL12.GL_RESCALE_NORMAL );
//GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
// GL11.glEnable( GL12.GL_RESCALE_NORMAL );
// GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
//final int metaData = is.getItemDamage();
//final ResourceLocation loc = METADATA_TO_TEXTURE[metaData];
// final int metaData = is.getItemDamage();
// final ResourceLocation loc = METADATA_TO_TEXTURE[metaData];
//Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
// Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
//final float lidAngle = 0.0f;
// final float lidAngle = 0.0f;
//GL11.glScalef( 1.0F, -1F, -1F );
//GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
// GL11.glScalef( 1.0F, -1F, -1F );
// GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
//this.model.chestLid.offsetY = -( 0.9f / 16.0f );
//this.model.chestLid.rotateAngleX = -( ( lidAngle * 3.141593F ) / 2.0F );
//this.model.renderAll();
// this.model.chestLid.offsetY = -( 0.9f / 16.0f );
// this.model.chestLid.rotateAngleX = -( ( lidAngle * 3.141593F ) / 2.0F );
// this.model.renderAll();
//GL11.glDisable( GL12.GL_RESCALE_NORMAL );
//GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
// GL11.glDisable( GL12.GL_RESCALE_NORMAL );
// GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
}
@Override
@ -103,7 +103,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
final IBlockState metaData = skyChest.getWorld().getBlockState( skyChest.getPos() );
final ResourceLocation loc = METADATA_TO_TEXTURE[ ((BlockSkyChest)metaData.getBlock()).type == SkyChestType.BLOCK ? 1 : 0 ];
final ResourceLocation loc = METADATA_TO_TEXTURE[( (BlockSkyChest) metaData.getBlock() ).type == SkyChestType.BLOCK ? 1 : 0];
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );

View file

@ -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;
this.center = new BlockPos(0,0,0);
this.center = new BlockPos( 0, 0, 0 );
this.hasChan = false;
this.hasPower = false;
final BlockRenderInfo ri = blk.getRendererInstance();
@ -74,7 +74,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
this.renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
//renderer.startDrawingQuads();
// renderer.startDrawingQuads();
ri.setTemporaryRenderIcon( null );
this.renderTorchAtAngle( renderer, EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
super.postRenderInWorld( renderer );
@ -88,7 +88,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
for( final AEPartLocation side : sides )
{
this.renderBlockBounds( renderer, 8 + ( side.xOffset != 0 ? side.xOffset * 2 : -2 ), 8 + ( side.yOffset != 0 ? side.yOffset * 2 : -2 ), 2 + ( side.zOffset != 0 ? side.zOffset * 2 : -1 ) + s, 8 + ( side.xOffset != 0 ? side.xOffset * 4 : 2 ), 8 + ( side.yOffset != 0 ? side.yOffset * 4 : 2 ), 2 + ( side.zOffset != 0 ? side.zOffset * 5 : 1 ) + s, EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
}
s = 3;
@ -250,7 +250,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
}
renderer.setColorOpaque_I( 0xffffff );
this.renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x,y,z );
this.renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z );
this.renderFace( this.center, this.blk, sides, renderer, y );
this.renderFace( this.center, this.blk, sides, renderer, y.getOpposite() );

View file

@ -191,7 +191,6 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
break;
}
double u1 = ico.getInterpolatedU( ( spin % 4 < 2 ) ? 1 : 6 );
double u2 = ico.getInterpolatedU( ( ( spin + 1 ) % 4 < 2 ) ? 1 : 6 );
double u3 = ico.getInterpolatedU( ( ( spin + 2 ) % 4 < 2 ) ? 1 : 6 );
@ -210,49 +209,49 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
double v3 = ico.getInterpolatedV( ( ( spin + 3 ) % 4 < 2 ) ? m : mx );
double v4 = ico.getInterpolatedV( ( ( spin ) % 4 < 2 ) ? m : mx );
final int x= pos.getX();
final int y= pos.getY();
final int z= pos.getZ();
final int x = pos.getX();
final int y = pos.getY();
final int z = pos.getZ();
renderer.setBrightness( b );
renderer.setColorOpaque_I( 0xffffff );
switch( forward.getFrontOffsetX() + forward.getFrontOffsetY() * 2 + forward.getFrontOffsetZ() * 3 )
{
case 1:
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case -1:
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case -2:
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case 2:
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case 3:
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
break;
case -3:
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
break;
}
@ -304,39 +303,39 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
{
case 1:
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case -1:
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case -2:
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case 2:
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
break;
case 3:
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
break;
case -3:
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u3, v3 );
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
break;
}
}

View file

@ -79,7 +79,7 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
{
final EnumSet<AEPartLocation> sides = tqb.getConnections();
this.renderCableAt( 0.11D, world, pos, block, renderer, renderer.getIcon( parts.cableGlass().stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
this.renderCableAt( 0.11D, world, pos, block, renderer, renderer.getIcon( parts.cableGlass().stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
final Item transCoveredCable = parts.cableCovered().item( AEColor.Transparent );
this.renderCableAt( 0.188D, world, pos, block, renderer, renderer.getIcon( parts.cableCovered().stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );

View file

@ -78,7 +78,7 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
final int u = offsets[cx][cy][cz] % 4;
final int v = offsets[9 - cx][9 - cy][9 - cz] % 4;
switch( Math.abs( ( offsets[cx][cy][cz] + ( pos.getX()+pos.getY()+pos.getZ() ) ) % 4 ) )
switch( Math.abs( ( offsets[cx][cy][cz] + ( pos.getX() + pos.getY() + pos.getZ() ) ) % 4 ) )
{
case 0:
renderer.setOverrideBlockTexture( new OffsetIcon( renderer.getIcon( world.getBlockState( pos ) )[0], u / 2, v / 2 ) );
@ -216,20 +216,20 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
private boolean isFlush( final QuartzGlassBlock imb, final IBlockAccess world, final int x, final int y, final int z )
{
return this.isGlass( imb, world, new BlockPos(x, y, z) );
return this.isGlass( imb, world, new BlockPos( x, y, z ) );
}
private boolean isGlass( final QuartzGlassBlock imb, final IBlockAccess world, final BlockPos pos)
private boolean isGlass( final QuartzGlassBlock imb, final IBlockAccess world, final BlockPos pos )
{
return this.isQuartzGlass( world, pos ) || this.isVibrantQuartzGlass( world, pos );
}
private boolean isQuartzGlass( final IBlockAccess world, final BlockPos pos)
private boolean isQuartzGlass( final IBlockAccess world, final BlockPos pos )
{
return AEApi.instance().definitions().blocks().quartzGlass().isSameAs( world, pos );
}
private boolean isVibrantQuartzGlass( final IBlockAccess world, final BlockPos pos)
private boolean isVibrantQuartzGlass( final IBlockAccess world, final BlockPos pos )
{
return AEApi.instance().definitions().blocks().quartzVibrantGlass().isSameAs( world, pos );
}

View file

@ -76,7 +76,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
final float Point2 = 6.0f / 16.0f;
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
@ -154,7 +154,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
if( te != null )
{
final AEPartLocation forward = AEPartLocation.fromFacing( te.getUp());
final AEPartLocation forward = AEPartLocation.fromFacing( te.getUp() );
switch( forward )
{
case EAST:

View file

@ -56,13 +56,13 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
{
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
final TileSpatialPylon sp = imb.getTileEntity( world, pos );
final TileSpatialPylon sp = imb.getTileEntity( world, pos );
final int displayBits = ( sp == null ) ? 0 : sp.getDisplayBits();
if( displayBits != 0 )
{
EnumFacing ori = null;//AEPartLocation.INTERNAL;
EnumFacing ori = null;// AEPartLocation.INTERNAL;
if( ( displayBits & TileSpatialPylon.DISPLAY_Z ) == TileSpatialPylon.DISPLAY_X )
{
ori = EnumFacing.EAST;
@ -125,7 +125,7 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
final BlockRenderInfo bri = imb.getRendererInstance();
bri.setTemporaryRenderIcon( null );
bri.setTemporaryRenderIcons( this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.UP, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.DOWN, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.SOUTH, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.NORTH, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.EAST, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.WEST , renderer) );
bri.setTemporaryRenderIcons( this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.UP, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.DOWN, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.SOUTH, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.NORTH, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.EAST, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.WEST, renderer ) );
final boolean r = renderer.renderStandardBlock( imb, pos );
@ -137,13 +137,13 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
for( final EnumFacing d : EnumFacing.VALUES )
{
this.renderFace( pos, imb, this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, d,renderer ), renderer, d );
this.renderFace( pos, imb, this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, d, renderer ), renderer, d );
}
}
else
{
bri.setTemporaryRenderIcon( null );
bri.setTemporaryRenderIcons( this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.UP,renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.DOWN,renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.SOUTH,renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.NORTH,renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.EAST,renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.WEST,renderer ) );
bri.setTemporaryRenderIcons( this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.UP, renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.DOWN, renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.SOUTH, renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.NORTH, renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.EAST, renderer ), this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, EnumFacing.WEST, renderer ) );
renderer.renderStandardBlock( imb, pos );
}
@ -154,7 +154,7 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
return r;
}
renderer.setOverrideBlockTexture( renderer.getIcon( world.getBlockState( pos ) )[0] );//imb.getIcon( 0, 0 );
renderer.setOverrideBlockTexture( renderer.getIcon( world.getBlockState( pos ) )[0] );// imb.getIcon( 0, 0 );
boolean result = renderer.renderStandardBlock( imb, pos );
renderer.setOverrideBlockTexture( ExtraBlockTextures.BlockSpatialPylon_dim.getIcon() );
@ -210,6 +210,6 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
}
return renderer.getIcon( blk.getDefaultState() )[0];//blk.getIcon( 0, 0 );
return renderer.getIcon( blk.getDefaultState() )[0];// blk.getIcon( 0, 0 );
}
}

View file

@ -43,7 +43,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
@Override
public void renderInventory( final BlockTinyTNT block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() )) );
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
super.renderInventory( block, is, renderer, type, obj );
}
@ -51,7 +51,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
@Override
public boolean renderInWorld( final BlockTinyTNT imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() )) );
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() ) ) );
renderer.setRenderAllFaces( true );
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
final boolean out = super.renderInWorld( imb, world, pos, renderer );

View file

@ -73,8 +73,8 @@ public class AssemblerFX extends EntityFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
this.time += l;
if( this.time > 4.0 )
{

View file

@ -68,8 +68,8 @@ public class CraftingFx extends EntityBreakingFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz)
{
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz )
{
if( partialTick < 0 || partialTick > 1 )
{
return;

View file

@ -67,8 +67,8 @@ public class EnergyFx extends EntityBreakingFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7)
{
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
{
final float f6 = this.particleTextureIndex.getMinU();
final float f7 = this.particleTextureIndex.getMaxU();
final float f8 = this.particleTextureIndex.getMinV();

View file

@ -84,8 +84,8 @@ public class LightningFX extends EntityFX
}
@Override
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
final float j = 1.0f;
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
if( this.particleAge == 3 )

View file

@ -70,8 +70,8 @@ public class MatterCannonFX extends EntityBreakingFX
}
@Override
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
{
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
{
final float f6 = this.particleTextureIndex.getMinU();
final float f7 = this.particleTextureIndex.getMaxU();
final float f8 = this.particleTextureIndex.getMinV();

View file

@ -124,4 +124,4 @@ package appeng.client.render.items;
// GL11.glPopAttrib();
// GL11.glPopMatrix();
// }
//}
// }

View file

@ -42,108 +42,95 @@ public class ToolBiometricCardRender implements IItemRenderer // TileEntityItemS
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
{
/*
TextureAtlasSprite par2Icon = item.getIconIndex();
float f4 = par2Icon.getMinU();
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance;
GL11.glPushMatrix();
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
if( type == ItemRenderType.INVENTORY )
{
GL11.glColor4f( 1, 1, 1, 1.0F );
GL11.glScalef( 16F, 16F, 10F );
GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
GL11.glEnable( GL11.GL_ALPHA_TEST );
tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw();
}
else
{
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F );
GL11.glScalef( 1F, 1.1F, 1F );
GL11.glTranslatef( 0.0F, 1.07F, f12 / -2.0f );
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
}
float u = ExtraItemTextures.White.getIcon().getInterpolatedU( 8.1 );
float v = ExtraItemTextures.White.getIcon().getInterpolatedV( 8.1 );
String username = "";
if( item.getItem() instanceof IBiometricCard )
{
GameProfile gp = ( (IBiometricCard) item.getItem() ).getProfile( item );
if( gp != null )
{
username = gp.getName();
}
}
int hash = username.length() > 0 ? username.hashCode() : 0;
GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
GL11.glTranslatef( 4, 6, 0 );
GL11.glDisable( GL11.GL_LIGHTING );
tessellator.startDrawingQuads();
float z = 0;
AEColor col = AEColor.values()[Math.abs( 3 + hash ) % AEColor.values().length];
if( hash == 0 )
{
col = AEColor.Black;
}
for( int x = 0; x < 8; x++ )// 8
{
for( int y = 0; y < 6; y++ )// 6
{
boolean isLit = false;
float scale = 0.3f / 255.0f;
if( x == 0 || y == 0 || x == 7 || y == 5 )
{
isLit = false;
}
else
{
isLit = ( hash & ( 1 << x ) ) != 0 || ( hash & ( 1 << y ) ) != 0;
}
if( isLit )
{
tessellator.setColorOpaque_I( col.mediumVariant );
}
else
{
tessellator.setColorOpaque_F( ( ( col.blackVariant >> 16 ) & 0xff ) * scale, ( ( col.blackVariant >> 8 ) & 0xff ) * scale, ( col.blackVariant & 0xff ) * scale );
}
tessellator.addVertexWithUV( x, y, z, u, v );
tessellator.addVertexWithUV( x + 1, y, z, u, v );
tessellator.addVertexWithUV( x + 1, y + 1, z, u, v );
tessellator.addVertexWithUV( x, y + 1, z, u, v );
}
}
tessellator.draw();
GL11.glPopAttrib();
GL11.glPopMatrix();
*/
* TextureAtlasSprite par2Icon = item.getIconIndex();
* float f4 = par2Icon.getMinU();
* float f5 = par2Icon.getMaxU();
* float f6 = par2Icon.getMinV();
* float f7 = par2Icon.getMaxV();
* float f12 = 0.0625F;
* Tessellator tessellator = Tessellator.instance;
* GL11.glPushMatrix();
* GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
* if( type == ItemRenderType.INVENTORY )
* {
* GL11.glColor4f( 1, 1, 1, 1.0F );
* GL11.glScalef( 16F, 16F, 10F );
* GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
* GL11.glEnable( GL11.GL_ALPHA_TEST );
* tessellator.startDrawingQuads();
* tessellator.setNormal( 0.0F, 1.0F, 0.0F );
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
* tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
* tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
* tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
* tessellator.draw();
* }
* else
* {
* GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
* ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(),
* f12 );
* GL11.glDisable( GL11.GL_CULL_FACE );
* GL11.glColor4f( 1, 1, 1, 1.0F );
* GL11.glScalef( 1F, 1.1F, 1F );
* GL11.glTranslatef( 0.0F, 1.07F, f12 / -2.0f );
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
* }
* float u = ExtraItemTextures.White.getIcon().getInterpolatedU( 8.1 );
* float v = ExtraItemTextures.White.getIcon().getInterpolatedV( 8.1 );
* String username = "";
* if( item.getItem() instanceof IBiometricCard )
* {
* GameProfile gp = ( (IBiometricCard) item.getItem() ).getProfile( item );
* if( gp != null )
* {
* username = gp.getName();
* }
* }
* int hash = username.length() > 0 ? username.hashCode() : 0;
* GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
* GL11.glTranslatef( 4, 6, 0 );
* GL11.glDisable( GL11.GL_LIGHTING );
* tessellator.startDrawingQuads();
* float z = 0;
* AEColor col = AEColor.values()[Math.abs( 3 + hash ) % AEColor.values().length];
* if( hash == 0 )
* {
* col = AEColor.Black;
* }
* for( int x = 0; x < 8; x++ )// 8
* {
* for( int y = 0; y < 6; y++ )// 6
* {
* boolean isLit = false;
* float scale = 0.3f / 255.0f;
* if( x == 0 || y == 0 || x == 7 || y == 5 )
* {
* isLit = false;
* }
* else
* {
* isLit = ( hash & ( 1 << x ) ) != 0 || ( hash & ( 1 << y ) ) != 0;
* }
* if( isLit )
* {
* tessellator.setColorOpaque_I( col.mediumVariant );
* }
* else
* {
* tessellator.setColorOpaque_F( ( ( col.blackVariant >> 16 ) & 0xff ) * scale, ( ( col.blackVariant >> 8 ) &
* 0xff ) * scale, ( col.blackVariant & 0xff ) * scale );
* }
* tessellator.addVertexWithUV( x, y, z, u, v );
* tessellator.addVertexWithUV( x + 1, y, z, u, v );
* tessellator.addVertexWithUV( x + 1, y + 1, z, u, v );
* tessellator.addVertexWithUV( x, y + 1, z, u, v );
* }
* }
* tessellator.draw();
* GL11.glPopAttrib();
* GL11.glPopMatrix();
*/
}
}

View file

@ -42,114 +42,97 @@ public class ToolColorApplicatorRender implements IItemRenderer
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
{
/*
TextureAtlasSprite par2Icon = item.getIconIndex();
float f4 = par2Icon.getMinU();
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f12 = 0.0625F;
Tessellator tessellator = Tessellator.instance;
GL11.glPushMatrix();
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
if( type == ItemRenderType.INVENTORY )
{
GL11.glColor4f( 1, 1, 1, 1.0F );
GL11.glScalef( 16F, 16F, 10F );
GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
GL11.glEnable( GL11.GL_ALPHA_TEST );
tessellator.startDrawingQuads();
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
tessellator.draw();
}
else
{
if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
{
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
}
else if( type == ItemRenderType.EQUIPPED )
{
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
}
else
{
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
}
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
GL11.glColor4f( 1, 1, 1, 1.0F );
GL11.glScalef( -1F, -1F, 1F );
GL11.glTranslatef( -1.125F, 0.0f, f12 / -2.0f );
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
}
TextureAtlasSprite dark = ExtraItemTextures.ToolColorApplicatorTip_Dark.getIcon();
TextureAtlasSprite med = ExtraItemTextures.ToolColorApplicatorTip_Medium.getIcon();
TextureAtlasSprite light = ExtraItemTextures.ToolColorApplicatorTip_Light.getIcon();
GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
if( type != ItemRenderType.INVENTORY )
{
GL11.glTranslatef( 2, 0, 0 );
}
GL11.glDisable( GL11.GL_LIGHTING );
AEColor col = null;
col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
if( col != null )
{
tessellator.startDrawingQuads();
f4 = dark.getMinU();
f5 = dark.getMaxU();
f6 = dark.getMinV();
f7 = dark.getMaxV();
tessellator.setColorOpaque_I( col.blackVariant );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
f4 = light.getMinU();
f5 = light.getMaxU();
f6 = light.getMinV();
f7 = light.getMaxV();
tessellator.setColorOpaque_I( col.whiteVariant );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
f4 = med.getMinU();
f5 = med.getMaxU();
f6 = med.getMinV();
f7 = med.getMaxV();
tessellator.setColorOpaque_I( col.mediumVariant );
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
tessellator.draw();
}
GL11.glPopAttrib();
GL11.glPopMatrix();
*/
* TextureAtlasSprite par2Icon = item.getIconIndex();
* float f4 = par2Icon.getMinU();
* float f5 = par2Icon.getMaxU();
* float f6 = par2Icon.getMinV();
* float f7 = par2Icon.getMaxV();
* float f12 = 0.0625F;
* Tessellator tessellator = Tessellator.instance;
* GL11.glPushMatrix();
* GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
* if( type == ItemRenderType.INVENTORY )
* {
* GL11.glColor4f( 1, 1, 1, 1.0F );
* GL11.glScalef( 16F, 16F, 10F );
* GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
* GL11.glEnable( GL11.GL_ALPHA_TEST );
* tessellator.startDrawingQuads();
* tessellator.setNormal( 0.0F, 1.0F, 0.0F );
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
* tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
* tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
* tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
* tessellator.draw();
* }
* else
* {
* if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
* {
* GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
* }
* else if( type == ItemRenderType.EQUIPPED )
* {
* GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
* }
* else
* {
* GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
* }
* ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(),
* f12 );
* GL11.glDisable( GL11.GL_CULL_FACE );
* GL11.glColor4f( 1, 1, 1, 1.0F );
* GL11.glScalef( -1F, -1F, 1F );
* GL11.glTranslatef( -1.125F, 0.0f, f12 / -2.0f );
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
* }
* TextureAtlasSprite dark = ExtraItemTextures.ToolColorApplicatorTip_Dark.getIcon();
* TextureAtlasSprite med = ExtraItemTextures.ToolColorApplicatorTip_Medium.getIcon();
* TextureAtlasSprite light = ExtraItemTextures.ToolColorApplicatorTip_Light.getIcon();
* GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
* if( type != ItemRenderType.INVENTORY )
* {
* GL11.glTranslatef( 2, 0, 0 );
* }
* GL11.glDisable( GL11.GL_LIGHTING );
* AEColor col = null;
* col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
* if( col != null )
* {
* tessellator.startDrawingQuads();
* f4 = dark.getMinU();
* f5 = dark.getMaxU();
* f6 = dark.getMinV();
* f7 = dark.getMaxV();
* tessellator.setColorOpaque_I( col.blackVariant );
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
* tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
* tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
* tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
* f4 = light.getMinU();
* f5 = light.getMaxU();
* f6 = light.getMinV();
* f7 = light.getMaxV();
* tessellator.setColorOpaque_I( col.whiteVariant );
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
* tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
* tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
* tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
* f4 = med.getMinU();
* f5 = med.getMaxU();
* f6 = med.getMinV();
* f7 = med.getMaxV();
* tessellator.setColorOpaque_I( col.mediumVariant );
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
* tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
* tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
* tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
* tessellator.draw();
* }
* GL11.glPopAttrib();
* GL11.glPopMatrix();
*/
}
}

View file

@ -1,7 +1,10 @@
package appeng.client.texture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
public class BaseIcon implements IAESprite
{
private final TextureAtlasSprite spite;

View file

@ -1,7 +1,10 @@
package appeng.client.texture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
public interface IAESprite
{

View file

@ -42,8 +42,7 @@ public class MissingIcon implements IAESprite
}
@SideOnly( Side.CLIENT )
public
static TextureAtlasSprite getMissing()
public static TextureAtlasSprite getMissing()
{
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
}

View file

@ -75,7 +75,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
@Override
/**
* Overridden super.setupConfig to prevent setting up the fake slots
*/ protected void setupConfig()
*/protected void setupConfig()
{
this.setupUpgrades();
}
@ -126,10 +126,10 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
{
final boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
final boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orNull() ) ) && // and...
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
if( matchA || matchB )
{

View file

@ -46,7 +46,7 @@ public class ContainerSkyChest extends AEBaseContainer
}
}
this.chest.openInventory(ip.player);
this.chest.openInventory( ip.player );
this.bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
}
@ -55,6 +55,6 @@ public class ContainerSkyChest extends AEBaseContainer
public void onContainerClosed( final EntityPlayer par1EntityPlayer )
{
super.onContainerClosed( par1EntityPlayer );
this.chest.closeInventory(par1EntityPlayer);
this.chest.closeInventory( par1EntityPlayer );
}
}

View file

@ -142,43 +142,43 @@ public class AppEngCraftingSlot extends AppEngSlot
@Override
public void onPickupFromSlot( final EntityPlayer playerIn, final ItemStack stack )
{
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, this.craftMatrix );
this.onCrafting(stack);
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(playerIn);
final InventoryCrafting ic = new InventoryCrafting( this.getContainer(), 3, 3 );
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent( playerIn, stack, this.craftMatrix );
this.onCrafting( stack );
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( playerIn );
final InventoryCrafting ic = new InventoryCrafting( this.getContainer(), 3, 3 );
for ( int x=0; x < this.craftMatrix.getSizeInventory(); x++ )
ic.setInventorySlotContents( x, this.craftMatrix.getStackInSlot( x ) );
for( int x = 0; x < this.craftMatrix.getSizeInventory(); x++ )
ic.setInventorySlotContents( x, this.craftMatrix.getStackInSlot( x ) );
final ItemStack[] aitemstack = CraftingManager.getInstance().func_180303_b(ic, playerIn.worldObj);
final ItemStack[] aitemstack = CraftingManager.getInstance().func_180303_b( ic, playerIn.worldObj );
for ( int x=0; x < this.craftMatrix.getSizeInventory(); x++ )
for( int x = 0; x < this.craftMatrix.getSizeInventory(); x++ )
this.craftMatrix.setInventorySlotContents( x, ic.getStackInSlot( x ) );
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(null);
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( null );
for (int i = 0; i < aitemstack.length; ++i)
{
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i);
final ItemStack itemstack2 = aitemstack[i];
for( int i = 0; i < aitemstack.length; ++i )
{
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot( i );
final ItemStack itemstack2 = aitemstack[i];
if (itemstack1 != null)
{
this.craftMatrix.decrStackSize(i, 1);
}
if( itemstack1 != null )
{
this.craftMatrix.decrStackSize( i, 1 );
}
if (itemstack2 != null)
{
if (this.craftMatrix.getStackInSlot(i) == null)
{
this.craftMatrix.setInventorySlotContents(i, itemstack2);
}
else if (!this.thePlayer.inventory.addItemStackToInventory(itemstack2))
{
this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false);
}
}
}
if( itemstack2 != null )
{
if( this.craftMatrix.getStackInSlot( i ) == null )
{
this.craftMatrix.setInventorySlotContents( i, itemstack2 );
}
else if( !this.thePlayer.inventory.addItemStackToInventory( itemstack2 ) )
{
this.thePlayer.dropPlayerItemWithRandomChoice( itemstack2, false );
}
}
}
}
/**

View file

@ -21,8 +21,8 @@ package appeng.container.slot;
import net.minecraft.inventory.IInventory;
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
public class SlotPlayerInv extends AppEngSlot
{

View file

@ -144,7 +144,8 @@ public class SlotRestrictedInput extends AppEngSlot
{
return true;
}
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem)
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ?
// ((ICraftingPatternItem)
// i.getItem()).getPatternForItem( i ) : null;
return false;// pattern != null;
}
@ -178,8 +179,8 @@ public class SlotRestrictedInput extends AppEngSlot
case INSCRIBER_INPUT:
return true;/*
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return true;
*
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return
* true;
* return false;
*/

View file

@ -81,7 +81,7 @@ public final class Api implements IAppEngApi
@Override
public IGridNode createGridNode( final IGridBlock blk )
{
if ( Platform.isClient() )
if( Platform.isClient() )
{
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
}

View file

@ -48,7 +48,7 @@ public abstract class CommonHelper
public abstract World getWorld();
public abstract void bindTileEntitySpecialRenderer( Class <? extends TileEntity> tile, AEBaseBlock blk );
public abstract void bindTileEntitySpecialRenderer( Class<? extends TileEntity> tile, AEBaseBlock blk );
public abstract List<EntityPlayer> getPlayers();
@ -72,7 +72,7 @@ public abstract class CommonHelper
public abstract void missingCoreMod();
public abstract void configureIcon(Object item, String name );
public abstract void configureIcon( Object item, String name );
public abstract ResourceLocation addIcon(
String string );

View file

@ -70,7 +70,8 @@ public class IMCHandler
}
/**
* Tries to find every message matching the internal IMC keys. When found the corresponding handler will process the attached message.
* Tries to find every message matching the internal IMC keys. When found the corresponding handler will process the
* attached message.
*
* @param event Event carrying the identifier and message for the handlers
*/

View file

@ -144,15 +144,15 @@ public final class ApiBlocks implements IBlocks
private final IBlockDefinition chiseledQuartzStair;
private final IBlockDefinition quartzPillarStair;
/*
private final IBlockDefinition skyStoneSlab;
private final IBlockDefinition skyStoneBlockSlab;
private final IBlockDefinition skyStoneBrickSlab;
private final IBlockDefinition skyStoneSmallBrickSlab;
private final IBlockDefinition fluixSlab;
private final IBlockDefinition quartzSlab;
private final IBlockDefinition chiseledQuartzSlab;
private final IBlockDefinition quartzPillarSlab;
*/
* private final IBlockDefinition skyStoneSlab;
* private final IBlockDefinition skyStoneBlockSlab;
* private final IBlockDefinition skyStoneBrickSlab;
* private final IBlockDefinition skyStoneSmallBrickSlab;
* private final IBlockDefinition fluixSlab;
* private final IBlockDefinition quartzSlab;
* private final IBlockDefinition chiseledQuartzSlab;
* private final IBlockDefinition quartzPillarSlab;
*/
private final IBlockDefinition itemGen;
private final IBlockDefinition chunkLoader;
@ -161,7 +161,7 @@ public final class ApiBlocks implements IBlocks
public ApiBlocks( final DefinitionConstructor constructor )
{
// this.quartzOre = new BlockDefinition( "ore.quartz", new OreQuartz() );
// this.quartzOre = new BlockDefinition( "ore.quartz", new OreQuartz() );
this.quartzOre = constructor.registerBlockDefinition( new QuartzOreBlock() );
this.quartzOreCharged = constructor.registerBlockDefinition( new ChargedQuartzOreBlock() );
this.matrixFrame = constructor.registerBlockDefinition( new BlockMatrixFrame() );
@ -226,15 +226,23 @@ public final class ApiBlocks implements IBlocks
// TODO Re-Add Slabs...
/*
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_stone, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_block, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_brick, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_smallbrick, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) )
*/
* this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_stone,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
* this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_block,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
* this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_brick,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
* this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_smallbrick,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
* this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
* this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
* this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
* this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar,
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) )
*/
this.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
@ -403,54 +411,47 @@ public final class ApiBlocks implements IBlocks
}
/*
@Override
public IBlockDefinition skyStoneSlab()
{
return this.skyStoneSlab;
}
@Override
public IBlockDefinition skyStoneBlockSlab()
{
return this.skyStoneBlockSlab;
}
@Override
public IBlockDefinition skyStoneBrickSlab()
{
return this.skyStoneBrickSlab;
}
@Override
public IBlockDefinition skyStoneSmallBrickSlab()
{
return this.skyStoneSmallBrickSlab;
}
@Override
public IBlockDefinition fluixSlab()
{
return this.fluixSlab;
}
@Override
public IBlockDefinition quartzSlab()
{
return this.quartzSlab;
}
@Override
public IBlockDefinition chiseledQuartzSlab()
{
return this.chiseledQuartzSlab;
}
@Override
public IBlockDefinition quartzPillarSlab()
{
return this.quartzPillarSlab;
}
*/
* @Override
* public IBlockDefinition skyStoneSlab()
* {
* return this.skyStoneSlab;
* }
* @Override
* public IBlockDefinition skyStoneBlockSlab()
* {
* return this.skyStoneBlockSlab;
* }
* @Override
* public IBlockDefinition skyStoneBrickSlab()
* {
* return this.skyStoneBrickSlab;
* }
* @Override
* public IBlockDefinition skyStoneSmallBrickSlab()
* {
* return this.skyStoneSmallBrickSlab;
* }
* @Override
* public IBlockDefinition fluixSlab()
* {
* return this.fluixSlab;
* }
* @Override
* public IBlockDefinition quartzSlab()
* {
* return this.quartzSlab;
* }
* @Override
* public IBlockDefinition chiseledQuartzSlab()
* {
* return this.chiseledQuartzSlab;
* }
* @Override
* public IBlockDefinition quartzPillarSlab()
* {
* return this.quartzPillarSlab;
* }
*/
@Override
public ITileDefinition grindStone()

View file

@ -126,7 +126,6 @@ public final class ApiMaterials implements IMaterials
this.logicProcessorPrint = new DamagedItemDefinition( "material.print.processor.logic", materials.createMaterial( MaterialType.LogicProcessorPrint ) );
this.siliconPrint = new DamagedItemDefinition( "material.print.silicon", materials.createMaterial( MaterialType.SiliconPrint ) );
this.logicProcessor = new DamagedItemDefinition( "material.processor.logic", materials.createMaterial( MaterialType.LogicProcessor ) );
this.calcProcessor = new DamagedItemDefinition( "material.processor.calculation", materials.createMaterial( MaterialType.CalcProcessor ) );
this.engProcessor = new DamagedItemDefinition( "material.processor.engineering", materials.createMaterial( MaterialType.EngProcessor ) );

View file

@ -57,11 +57,11 @@ public final class ApiParts implements IParts
private final IItemDefinition p2PTunnelRedstone;
private final IItemDefinition p2PTunnelItems;
private final IItemDefinition p2PTunnelLiquids;
//private final IItemDefinition p2PTunnelEU;
//private final IItemDefinition p2PTunnelRF;
// private final IItemDefinition p2PTunnelEU;
// private final IItemDefinition p2PTunnelRF;
private final IItemDefinition p2PTunnelLight;
// private final IItemDefinition p2PTunnelOpenComputers;
// private final IItemDefinition p2PTunnelPneumaticCraft;
// private final IItemDefinition p2PTunnelOpenComputers;
// private final IItemDefinition p2PTunnelPneumaticCraft;
private final IItemDefinition cableAnchor;
private final IItemDefinition monitor;
private final IItemDefinition semiDarkMonitor;
@ -101,11 +101,13 @@ public final class ApiParts implements IParts
this.p2PTunnelRedstone = new DamagedItemDefinition( "part.tunnel.redstone", itemMultiPart.createPart( PartType.P2PTunnelRedstone ) );
this.p2PTunnelItems = new DamagedItemDefinition( "part.tunnel.item", itemMultiPart.createPart( PartType.P2PTunnelItems ) );
this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemMultiPart.createPart( PartType.P2PTunnelLiquids ) );
//this.p2PTunnelEU = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelEU ) );
//this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
// this.p2PTunnelEU = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelEU ) );
// this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemMultiPart.createPart( PartType.P2PTunnelLight ) );
//this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
// this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelPressure ) );
// this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart(
// PartType.P2PTunnelOpenComputers ) );
// this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart(
// PartType.P2PTunnelPressure ) );
this.cableAnchor = new DamagedItemDefinition( "part.cable_anchor", itemMultiPart.createPart( PartType.CableAnchor ) );
this.monitor = new DamagedItemDefinition( "part.monitor", itemMultiPart.createPart( PartType.Monitor ) );
this.semiDarkMonitor = new DamagedItemDefinition( "part.monitor.semi_dark", itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
@ -260,19 +262,18 @@ public final class ApiParts implements IParts
return this.p2PTunnelLiquids;
}
/*
@Override
public IItemDefinition p2PTunnelEU()
{
return this.p2PTunnelEU;
}
@Override
public IItemDefinition p2PTunnelRF()
{
return this.p2PTunnelRF;
}
*/
/*
* @Override
* public IItemDefinition p2PTunnelEU()
* {
* return this.p2PTunnelEU;
* }
* @Override
* public IItemDefinition p2PTunnelRF()
* {
* return this.p2PTunnelRF;
* }
*/
@Override
public IItemDefinition p2PTunnelLight()
@ -280,19 +281,18 @@ public final class ApiParts implements IParts
return this.p2PTunnelLight;
}
/*
@Override
public IItemDefinition p2PTunnelOpenComputers()
{
return this.p2PTunnelOpenComputers;
}
@Override
public IItemDefinition p2PTunnelPneumaticCraft()
{
return this.p2PTunnelPneumaticCraft;
}
*/
/*
* @Override
* public IItemDefinition p2PTunnelOpenComputers()
* {
* return this.p2PTunnelOpenComputers;
* }
* @Override
* public IItemDefinition p2PTunnelPneumaticCraft()
* {
* return this.p2PTunnelPneumaticCraft;
* }
*/
@Override
public IItemDefinition cableAnchor()

View file

@ -53,7 +53,7 @@ public class DefinitionConstructor
if( definition instanceof ITileDefinition )
{
return ( (ITileDefinition) definition );
return( (ITileDefinition) definition );
}
throw new IllegalStateException( "No tile definition for " + feature );
@ -65,7 +65,7 @@ public class DefinitionConstructor
if( definition instanceof IBlockDefinition )
{
return ( (IBlockDefinition) definition );
return( (IBlockDefinition) definition );
}
throw new IllegalStateException( "No block definition for " + feature );

View file

@ -18,35 +18,35 @@
/* Example:
NBTTagCompound msg = new NBTTagCompound();
NBTTagCompound in = new NBTTagCompound();
NBTTagCompound out = new NBTTagCompound();
NBTTagCompound msg = new NBTTagCompound();
NBTTagCompound in = new NBTTagCompound();
NBTTagCompound out = new NBTTagCompound();
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
new ItemStack( Items.iron_ingot ).writeToNBT( out );
msg.setTag( "in", in );
msg.setTag( "out", out );
msg.setInteger( "turns", 8 );
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
new ItemStack( Items.iron_ingot ).writeToNBT( out );
msg.setTag( "in", in );
msg.setTag( "out", out );
msg.setInteger( "turns", 8 );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
-- or --
NBTTagCompound msg = new NBTTagCompound();
NBTTagCompound in = new NBTTagCompound();
NBTTagCompound out = new NBTTagCompound();
NBTTagCompound optional = new NBTTagCompound();
NBTTagCompound msg = new NBTTagCompound();
NBTTagCompound in = new NBTTagCompound();
NBTTagCompound out = new NBTTagCompound();
NBTTagCompound optional = new NBTTagCompound();
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
new ItemStack( Items.iron_ingot ).writeToNBT( out );
new ItemStack( Blocks.gravel ).writeToNBT( optional );
msg.setTag( "in", in );
msg.setTag( "out", out );
msg.setTag( "optional", optional );
msg.setFloat( "chance", 0.5 );
msg.setInteger( "turns", 8 );
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
new ItemStack( Items.iron_ingot ).writeToNBT( out );
new ItemStack( Blocks.gravel ).writeToNBT( optional );
msg.setTag( "in", in );
msg.setTag( "out", out );
msg.setTag( "optional", optional );
msg.setFloat( "chance", 0.5 );
msg.setInteger( "turns", 8 );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
*/

View file

@ -18,14 +18,14 @@
/* Example:
NBTTagCompound msg = new NBTTagCompound();
NBTTagCompound item = new NBTTagCompound();
NBTTagCompound msg = new NBTTagCompound();
NBTTagCompound item = new NBTTagCompound();
new ItemStack( Blocks.anvil ).writeToNBT( item );
msg.setTag( "item", item );
msg.setDouble( "weight", 32.0 );
new ItemStack( Blocks.anvil ).writeToNBT( item );
msg.setTag( "item", item );
msg.setDouble( "weight", 32.0 );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
*/

View file

@ -18,12 +18,12 @@
/* Example:
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
*/

View file

@ -18,7 +18,7 @@
/* Example:
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
*/

View file

@ -1,3 +1,4 @@
package appeng.core.crash;

View file

@ -1,3 +1,4 @@
package appeng.core.crash;
@ -7,7 +8,7 @@ import appeng.core.AEConfig;
public class ModCrashEnhancement extends BaseCrashEnhancement
{
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
+ net.minecraftforge.common.ForgeVersion.buildVersion;

View file

@ -69,7 +69,7 @@ public final class AECableBusFeatureHandler implements IFeatureHandler
* Registration of the {@link TileEntity} will actually be handled by {@link BlockCableBus#setupTile()}.
*/
@Override
public void register( final Side side)
public void register( final Side side )
{
if( this.enabled )
{
@ -90,11 +90,11 @@ public final class AECableBusFeatureHandler implements IFeatureHandler
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
// register the block/item conversion...
if ( this.featured != null && this.definition.maybeItem().isPresent() )
GameData.getBlockItemMap().put( this.featured, this.definition.maybeItem().get() );
if( this.featured != null && this.definition.maybeItem().isPresent() )
GameData.getBlockItemMap().put( this.featured, this.definition.maybeItem().get() );
if ( side == Side.CLIENT)
CommonHelper.proxy.configureIcon( this.featured, name );
if( side == Side.CLIENT )
CommonHelper.proxy.configureIcon( this.featured, name );
}
}
}

View file

@ -51,11 +51,11 @@ public class FeatureNameExtractor
{
name = PATTERN_ITEM_MULTI_MATERIAL.matcher( name ).replaceAll( "ItemMaterial" );
}
else if ( name.startsWith( "BlockStairCommon" ) )
else if( name.startsWith( "BlockStairCommon" ) )
{
name = "stair";
}
else if ( name.startsWith( "BlockFluix" ) )
else if( name.startsWith( "BlockFluix" ) )
{
name = "fluix";
}

View file

@ -29,5 +29,5 @@ public interface IFeatureHandler
IItemDefinition getDefinition();
void register(Side side );
void register( Side side );
}

View file

@ -71,7 +71,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
String name = this.extractor.get();
final String itemPhysicalName = name;
//this.item.setTextureName( "appliedenergistics2:" + name );
// this.item.setTextureName( "appliedenergistics2:" + name );
this.item.setUnlocalizedName( "appliedenergistics2." + name );
if( this.item instanceof ItemFacade )
@ -92,7 +92,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
name = "ItemMultiPart";
}
// "item." +
// "item." +
GameRegistry.registerItem( this.item, name );
if( side == Side.CLIENT )

View file

@ -165,7 +165,7 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
return null;
}
final ItemStack myItemStack = new ItemStack( item, 1, meta );
final ItemStack myItemStack = new ItemStack( item, 1, meta );
return myItemStack;
}

View file

@ -1,3 +1,4 @@
package appeng.core.features.registries.entries;

View file

@ -1,3 +1,4 @@
package appeng.core.features.registries.entries;
@ -93,7 +94,7 @@ public class InscriberRecipe implements IInscriberRecipe
{
return true;
}
if( !(o instanceof IInscriberRecipe) )
if( !( o instanceof IInscriberRecipe ) )
{
return false;
}
@ -112,7 +113,7 @@ public class InscriberRecipe implements IInscriberRecipe
{
return false;
}
if( !this.maybeBot.equals( that.getBottomOptional()) )
if( !this.maybeBot.equals( that.getBottomOptional() ) )
{
return false;
}

View file

@ -30,7 +30,7 @@ public enum PlayerMessages
isNowLocked, isNowUnlocked,
AmmoDepleted,
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
SettingCleared,;
SettingCleared, ;
public IChatComponent get()
{

View file

@ -33,14 +33,17 @@ public class PlayerDifferentiator
{
/**
* Can determine if an {@link net.minecraft.entity.player.EntityPlayer} is not a real player.
* This is based on if the {@param player} is:
* This is based on if the
*
* @param player is:
* - null
* - dead
* - fake
*
* @param player to be checked player
*
* @return true if {@param player} is not a real player
* @return true if
* @param player is not a real player
*/
boolean isNoPlayer( final EntityPlayer player )
{

View file

@ -36,20 +36,25 @@ import appeng.core.features.AEFeature;
public class PlayerStatsRegistration
{
/**
* {@link net.minecraftforge.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the feature is enabled
* {@link net.minecraftforge.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending
* if the feature is enabled
*/
private final EventBus bus;
/**
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the {@param config}
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the
*
* @param config}
*/
private final boolean isAchievementFeatureEnabled;
/**
* Constructs this with an {@link net.minecraftforge.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
* Constructs this with an {@link net.minecraftforge.fml.common.eventhandler.EventBus} and
* {@link appeng.core.AEConfig}.
*
* @param bus {@see #bus}
* @param config {@link appeng.core.AEConfig} which is used to determine if the {@link appeng.core.features.AEFeature#Achievements} is enabled
* @param bus {@see #bus}
* @param config {@link appeng.core.AEConfig} which is used to determine if the
* {@link appeng.core.features.AEFeature#Achievements} is enabled
*/
public PlayerStatsRegistration( final EventBus bus, final AEConfig config )
{
@ -58,7 +63,9 @@ public class PlayerStatsRegistration
}
/**
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is true.
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and
* {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is
* true.
*/
public void registerAchievementHandlers()
{
@ -74,7 +81,8 @@ public class PlayerStatsRegistration
}
/**
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements} to a new {@link net.minecraftforge.common.AchievementPage}.
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements}
* to a new {@link net.minecraftforge.common.AchievementPage}.
*/
public void registerAchievements()
{

View file

@ -56,7 +56,6 @@ public class AppEngPacketHandlerBase
{
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
public enum PacketTypes
{
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),

View file

@ -268,7 +268,7 @@ public enum GuiBridge implements IGuiHandler
}
if( ID.type.isTile() )
{
final TileEntity TE = w.getTileEntity( new BlockPos(x,y,z) );
final TileEntity TE = w.getTileEntity( new BlockPos( x, y, z ) );
if( TE instanceof IPartHost )
{
( (IPartHost) TE ).getPart( side );
@ -295,7 +295,7 @@ public enum GuiBridge implements IGuiHandler
{
if( it.getItem() instanceof IGuiItem )
{
return ( (IGuiItem) it.getItem() ).getGuiObject( it, w, new BlockPos(x,y,z) );
return ( (IGuiItem) it.getItem() ).getGuiObject( it, w, new BlockPos( x, y, z ) );
}
final IWirelessTermHandler wh = AEApi.instance().registries().wireless().getWirelessTerminalHandler( it );
@ -450,7 +450,7 @@ public enum GuiBridge implements IGuiHandler
}
if( ID.type.isTile() )
{
final TileEntity TE = w.getTileEntity( new BlockPos(x,y,z) );
final TileEntity TE = w.getTileEntity( new BlockPos( x, y, z ) );
if( TE instanceof IPartHost )
{
( (IPartHost) TE ).getPart( side );
@ -499,7 +499,7 @@ public enum GuiBridge implements IGuiHandler
public boolean hasPermissions( final TileEntity te, final int x, final int y, final int z, final AEPartLocation side, final EntityPlayer player )
{
final World w = player.getEntityWorld();
final BlockPos pos = new BlockPos(x,y,z);
final BlockPos pos = new BlockPos( x, y, z );
if( Platform.hasPermissions( te != null ? new DimensionalCoord( te ) : new DimensionalCoord( player.worldObj, pos ), player ) )
{

View file

@ -1,9 +1,10 @@
package appeng.core.sync;
public abstract class PacketCallState
{
public abstract void call( AppEngPacket appEngPacket );
}

View file

@ -52,17 +52,17 @@ public class AppEngClientPacketHandler extends AppEngPacketHandlerBase implement
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
final PacketCallState callState =
new PacketCallState(){
new PacketCallState(){
@Override
public void call(
final AppEngPacket appEngPacket )
{
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
}
};
@Override
public void call(
final AppEngPacket appEngPacket )
{
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
}
};
pack.setCallParam(callState);
pack.setCallParam( callState );
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, Minecraft.getMinecraft() );
callState.call( pack );
}

View file

@ -48,18 +48,18 @@ public final class AppEngServerPacketHandler extends AppEngPacketHandlerBase imp
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
final PacketCallState callState =
new PacketCallState(){
new PacketCallState(){
@Override
public void call(
final AppEngPacket appEngPacket )
{
appEngPacket.serverPacketData( manager, appEngPacket, player);
}
};
@Override
public void call(
final AppEngPacket appEngPacket )
{
appEngPacket.serverPacketData( manager, appEngPacket, player );
}
};
pack.setCallParam(callState);
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ((EntityPlayerMP)player).getServerForPlayer() );
pack.setCallParam( callState );
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ( (EntityPlayerMP) player ).getServerForPlayer() );
callState.call( pack );
}
catch( final InstantiationException e )

View file

@ -34,6 +34,7 @@ import net.minecraftforge.fml.common.network.NetworkRegistry;
import appeng.core.sync.AppEngPacket;
import appeng.core.worlddata.WorldData;
public class NetworkHandler
{
public static NetworkHandler instance;
@ -103,7 +104,7 @@ public class NetworkHandler
{
this.serveHandler.onPacketData( null, ev.handler, ev.packet, srv.playerEntity );
}
catch ( final ThreadQuickExitException ignored )
catch( final ThreadQuickExitException ignored )
{
}
@ -119,7 +120,7 @@ public class NetworkHandler
{
this.clientHandler.onPacketData( null, ev.handler, ev.packet, null );
}
catch ( final ThreadQuickExitException ignored )
catch( final ThreadQuickExitException ignored )
{
}

View file

@ -90,7 +90,7 @@ public class PacketClick extends AppEngPacket
if( is.getItem() instanceof ToolNetworkTool )
{
final ToolNetworkTool tnt = (ToolNetworkTool) is.getItem();
tnt.serverSideToolLogic( is, player, player.worldObj, new BlockPos( this.x, this.y, this.z), EnumFacing.VALUES[ this.side ], this.hitX, this.hitY, this.hitZ );
tnt.serverSideToolLogic( is, player, player.worldObj, new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.side], this.hitX, this.hitY, this.hitZ );
}
else if( maybeMemoryCard.isSameAs( is ) )

View file

@ -65,7 +65,7 @@ public final class PacketConfigButton extends AppEngPacket
public void serverPacketData( final INetworkInfo manager, final AppEngPacket packet, final EntityPlayer player )
{
final EntityPlayerMP sender = (EntityPlayerMP) player;
if ( sender.openContainer instanceof AEBaseContainer )
if( sender.openContainer instanceof AEBaseContainer )
{
final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
if( baseContainer.getTarget() instanceof IConfigurableObject )

View file

@ -48,7 +48,7 @@ public interface IWorldPlayerMapping
/**
* Put in new players when they join the server
*
* @param id id of new player
* @param id id of new player
* @param uuid UUID of new player
*/
void put( int id, @Nonnull UUID uuid );

View file

@ -65,10 +65,11 @@ public class MeteorDataNameEncoder
/**
* @param dimension ID of the processed dimension. Can be any integer
* @param chunkX X coordinate of the chunk. Can be any integer
* @param chunkZ Z coordinate of the chunk. Can be any integer
* @param chunkX X coordinate of the chunk. Can be any integer
* @param chunkZ Z coordinate of the chunk. Can be any integer
*
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be shifted to stay conform with the vanilla chunk system
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be
* shifted to stay conform with the vanilla chunk system
*
* @since rv3 05.06.2015
*/

View file

@ -57,7 +57,8 @@ final class SpawnData implements IWorldSpawnData
}
@Override
public void setGenerated( final int dim, final int chunkX, final int chunkZ ) {
public void setGenerated( final int dim, final int chunkX, final int chunkZ )
{
synchronized( SpawnData.class )
{
final NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );

View file

@ -58,7 +58,7 @@ public class ToolMeteoritePlacer extends AEBaseItem
}
final MeteoritePlacer mp = new MeteoritePlacer();
final boolean worked = mp.spawnMeteorite( new StandardWorld( world ), pos.getX(),pos.getY(),pos.getZ() );
final boolean worked = mp.spawnMeteorite( new StandardWorld( world ), pos.getX(), pos.getY(), pos.getZ() );
if( !worked )
{

View file

@ -140,7 +140,7 @@ public class ToolReplicatorCard extends AEBaseItem
{
for( int k = 1; k < scale_z; k++ )
{
final BlockPos p = new BlockPos( min_x + i, min_y + j, min_z + k );
final BlockPos p = new BlockPos( min_x + i, min_y + j, min_z + k );
final BlockPos d = new BlockPos( i + rel_x, j + rel_y, k + rel_z );
final IBlockState state = src_w.getBlockState( p );
final Block blk = state.getBlock();

View file

@ -61,7 +61,7 @@ public final class ChargedQuartzOreBlock extends QuartzOreBlock
public int damageDropped(
final IBlockState state )
{
for ( final ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
for( final ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
{
return crystalStack.getItemDamage();
}
@ -76,7 +76,7 @@ public final class ChargedQuartzOreBlock extends QuartzOreBlock
final IBlockState state,
final Random r )
{
if ( !AEConfig.instance.enableEffects )
if( !AEConfig.instance.enableEffects )
{
return;
}

View file

@ -1,3 +1,4 @@
package appeng.decorative.solid;

View file

@ -1,3 +1,4 @@
package appeng.decorative.solid;

View file

@ -60,7 +60,7 @@ public class QuartzPillarBlock extends AEBaseBlock implements IOrientableBlock
@Override
protected IProperty[] getAEStates()
{
return new IProperty[]{ AXIS_ORIENTATION };
return new IProperty[] { AXIS_ORIENTATION };
}
@Override
@ -72,7 +72,7 @@ public class QuartzPillarBlock extends AEBaseBlock implements IOrientableBlock
@Override
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{
return new MetaRotation( w, pos,false );
return new MetaRotation( w, pos, false );
}
}

View file

@ -1,3 +1,4 @@
package appeng.decorative.stair;
@ -23,14 +24,14 @@ import appeng.decorative.solid.Identifier;
*/
public enum DecorativeStairIdentifier implements Identifier
{
FLUIX("stair.fluix"),
CHISELED_CERTUS_QUARTZ("stair.quartz.certus.chiseled"),
CERTUS_QUARTZ("stair.quartz.certus"),
CERTUS_QUARTZ_PILLAR("stair.quartz.certus.pillar"),
SKYSTONE("stair.skystone"),
SKYSTONE_BLOCK("stair.skystone.block"),
SKYSTONE_BRICK("stair.skystone.brick"),
SKYSTONE_SMALL_BRICK("stair.skystone.brick.small");
FLUIX( "stair.fluix" ),
CHISELED_CERTUS_QUARTZ( "stair.quartz.certus.chiseled" ),
CERTUS_QUARTZ( "stair.quartz.certus" ),
CERTUS_QUARTZ_PILLAR( "stair.quartz.certus.pillar" ),
SKYSTONE( "stair.skystone" ),
SKYSTONE_BLOCK( "stair.skystone.block" ),
SKYSTONE_BRICK( "stair.skystone.brick" ),
SKYSTONE_SMALL_BRICK( "stair.skystone.brick.small" );
private final String name;

View file

@ -1,3 +1,4 @@
package appeng.decorative.stair;

View file

@ -1,3 +1,4 @@
package appeng.decorative.stair;

View file

@ -1,3 +1,4 @@
package appeng.decorative.stair;

View file

@ -1,3 +1,4 @@
package appeng.decorative.stair;

View file

@ -1,3 +1,4 @@
package appeng.decorative.stair;

View file

@ -57,7 +57,7 @@ public final class EntityTinyTNTPrimed extends EntityTNTPrimed implements IEntit
{
super( w, x, y, z, igniter );
this.setSize( 0.55F, 0.55F );
//this.yOffset = this.height / 2.0F;
// this.yOffset = this.height / 2.0F;
}
/**
@ -147,7 +147,7 @@ public final class EntityTinyTNTPrimed extends EntityTNTPrimed implements IEntit
{
for( int z = (int) ( this.posZ - 2 ); z <= this.posZ + 2; z++ )
{
final BlockPos point = new BlockPos( x,y,z);
final BlockPos point = new BlockPos( x, y, z );
final IBlockState state = this.worldObj.getBlockState( point );
final Block block = state.getBlock();
if( block != null && !block.isAir( this.worldObj, point ) )

View file

@ -147,8 +147,7 @@ public class FacadeContainer implements IFacadeContainer
this.storage.setFacade( x, created );
}
else
if( !isBC )
else if( !isBC )
{
for( final Item facadeItem : AEApi.instance().definitions().items().facade().maybeItem().asSet() )
{

View file

@ -1269,7 +1269,6 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
}
}
private class InterfaceInventory extends MEMonitorIInventory
{

Some files were not shown because too many files have changed in this diff Show more