Formatted code
This commit is contained in:
parent
e94a0cfccf
commit
c9e8a6e939
|
@ -88,7 +88,7 @@ public class AEBaseItemBlock extends ItemBlock
|
||||||
{
|
{
|
||||||
return this.blockType.getUnlocalizedName( is );
|
return this.blockType.getUnlocalizedName( is );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean placeBlockAt(
|
public boolean placeBlockAt(
|
||||||
final ItemStack stack,
|
final ItemStack stack,
|
||||||
|
|
|
@ -95,7 +95,6 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||||
this.setTileProvider( this.hasBlockTileEntity() );
|
this.setTileProvider( this.hasBlockTileEntity() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// update Block value.
|
// update Block value.
|
||||||
private void setTileProvider( final boolean b )
|
private void setTileProvider( final boolean b )
|
||||||
{
|
{
|
||||||
|
@ -115,7 +114,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||||
@Nullable
|
@Nullable
|
||||||
public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final int x, final int y, final int z )
|
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
|
@Nullable
|
||||||
|
@ -163,7 +162,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||||
final BlockPos pos,
|
final BlockPos pos,
|
||||||
final IBlockState state )
|
final IBlockState state )
|
||||||
{
|
{
|
||||||
final AEBaseTile te = this.getTileEntity( w,pos );
|
final AEBaseTile te = this.getTileEntity( w, pos );
|
||||||
if( te != null )
|
if( te != null )
|
||||||
{
|
{
|
||||||
final ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
final ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
||||||
|
@ -183,7 +182,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||||
// super will remove the TE, as it is not an instance of BlockContainer
|
// super will remove the TE, as it is not an instance of BlockContainer
|
||||||
super.breakBlock( w, pos, state );
|
super.breakBlock( w, pos, state );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final EnumFacing[] getValidRotations( final World w, final BlockPos pos )
|
public final EnumFacing[] getValidRotations( final World w, final BlockPos pos )
|
||||||
{
|
{
|
||||||
|
@ -219,7 +218,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.recolorBlock( world, pos, side, color);
|
return super.recolorBlock( world, pos, side, color );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -243,7 +242,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||||
final int eventID,
|
final int eventID,
|
||||||
final int eventParam )
|
final int eventParam )
|
||||||
{
|
{
|
||||||
super.onBlockEventReceived( worldIn, pos, state ,eventID, eventParam);
|
super.onBlockEventReceived( worldIn, pos, state, eventID, eventParam );
|
||||||
final TileEntity tileentity = worldIn.getTileEntity( pos );
|
final TileEntity tileentity = worldIn.getTileEntity( pos );
|
||||||
return tileentity != null ? tileentity.receiveClientEvent( eventID, eventParam ) : false;
|
return tileentity != null ? tileentity.receiveClientEvent( eventID, eventParam ) : false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
|
|
||||||
package appeng.block;
|
package appeng.block;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||||
|
|
||||||
|
|
||||||
public final class UnlistedBlockAccess implements IUnlistedProperty<IBlockAccess>
|
public final class UnlistedBlockAccess implements IUnlistedProperty<IBlockAccess>
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
|
|
||||||
package appeng.block;
|
package appeng.block;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||||
|
|
||||||
|
|
||||||
public final class UnlistedBlockPos implements IUnlistedProperty<BlockPos>
|
public final class UnlistedBlockPos implements IUnlistedProperty<BlockPos>
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -60,10 +60,10 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
|
||||||
{
|
{
|
||||||
for( final Block craftingUnitBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
|
for( final Block craftingUnitBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
|
||||||
{
|
{
|
||||||
return ( (BlockCraftingUnit)craftingUnitBlock ).getIcon( side, state );
|
return ( (BlockCraftingUnit) craftingUnitBlock ).getIcon( side, state );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ExtraBlockTextures.BlockCraftingMonitorFit_Light.getIcon();
|
return ExtraBlockTextures.BlockCraftingMonitorFit_Light.getIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,10 @@ import appeng.tile.crafting.TileCraftingStorageTile;
|
||||||
|
|
||||||
public class BlockCraftingStorage extends BlockCraftingUnit
|
public class BlockCraftingStorage extends BlockCraftingUnit
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockCraftingStorage( final CraftingUnitType type )
|
public BlockCraftingStorage( final CraftingUnitType type )
|
||||||
{
|
{
|
||||||
super(type );
|
super( type );
|
||||||
this.setTileEntity( TileCraftingStorageTile.class );
|
this.setTileEntity( TileCraftingStorageTile.class );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,29 +46,29 @@ public class BlockCraftingStorage extends BlockCraftingUnit
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 );
|
final boolean formed = (boolean) state.getValue( FORMED );
|
||||||
switch( this.type )
|
switch( this.type )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case STORAGE_1K:
|
case STORAGE_1K:
|
||||||
return formed ?
|
return formed ?
|
||||||
super.getIcon( side,state ) :
|
super.getIcon( side, state ) :
|
||||||
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
|
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
|
||||||
case STORAGE_4K:
|
case STORAGE_4K:
|
||||||
return formed ?
|
return formed ?
|
||||||
ExtraBlockTextures.BlockCraftingStorage4k.getIcon() :
|
ExtraBlockTextures.BlockCraftingStorage4k.getIcon() :
|
||||||
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
|
ExtraBlockTextures.BlockCraftingStorage1kFit.getIcon();
|
||||||
case STORAGE_16K:
|
case STORAGE_16K:
|
||||||
return formed ?
|
return formed ?
|
||||||
ExtraBlockTextures.BlockCraftingStorage16k.getIcon() :
|
ExtraBlockTextures.BlockCraftingStorage16k.getIcon() :
|
||||||
ExtraBlockTextures.BlockCraftingStorage16kFit.getIcon();
|
ExtraBlockTextures.BlockCraftingStorage16kFit.getIcon();
|
||||||
case STORAGE_64K:
|
case STORAGE_64K:
|
||||||
return formed ?
|
return formed ?
|
||||||
ExtraBlockTextures.BlockCraftingStorage64k.getIcon() :
|
ExtraBlockTextures.BlockCraftingStorage64k.getIcon() :
|
||||||
ExtraBlockTextures.BlockCraftingStorage64kFit.getIcon();
|
ExtraBlockTextures.BlockCraftingStorage64kFit.getIcon();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class BlockCrank extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
return RenderBlockCrank.class;
|
return RenderBlockCrank.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated(
|
public boolean onActivated(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -95,7 +95,7 @@ public class BlockCrank extends AEBaseTileBlock
|
||||||
world.destroyBlock( pos, true ); // w.destroyBlock( x, y, z, true );
|
world.destroyBlock( pos, true ); // w.destroyBlock( x, y, z, true );
|
||||||
world.markBlockForUpdate( pos );
|
world.markBlockForUpdate( pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(
|
public void onBlockPlacedBy(
|
||||||
final World world,
|
final World world,
|
||||||
|
@ -120,7 +120,7 @@ public class BlockCrank extends AEBaseTileBlock
|
||||||
this.dropCrank( world, pos );
|
this.dropCrank( world, pos );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidOrientation(
|
public boolean isValidOrientation(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -146,12 +146,12 @@ public class BlockCrank extends AEBaseTileBlock
|
||||||
|
|
||||||
private boolean isCrankable( final World world, final BlockPos pos, final EnumFacing offset )
|
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 );
|
final TileEntity te = world.getTileEntity( o );
|
||||||
|
|
||||||
return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() );
|
return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(
|
public void onNeighborBlockChange(
|
||||||
final World world,
|
final World world,
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class BlockGrinder extends AEBaseTileBlock
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return super.onBlockActivated( worldIn, pos, state, playerIn, side, hitX, hitY, hitZ );
|
return super.onBlockActivated( worldIn, pos, state, playerIn, side, hitX, hitY, hitZ );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated(
|
public boolean onActivated(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -95,8 +95,8 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
public void randomDisplayTick(
|
public void randomDisplayTick(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class BlockInscriber extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
return RenderBlockInscriber.class;
|
return RenderBlockInscriber.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated(
|
public boolean onActivated(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -45,7 +45,7 @@ import appeng.helpers.MetaRotation;
|
||||||
import appeng.tile.misc.TileLightDetector;
|
import appeng.tile.misc.TileLightDetector;
|
||||||
|
|
||||||
|
|
||||||
public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBlock,ICustomCollision
|
public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBlock, ICustomCollision
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockLightDetector()
|
public BlockLightDetector()
|
||||||
|
@ -66,18 +66,18 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBlockState getStateFromMeta(
|
public IBlockState getStateFromMeta(
|
||||||
final int meta )
|
final int meta )
|
||||||
{
|
{
|
||||||
return this.getDefaultState();
|
return this.getDefaultState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IProperty[] getAEStates()
|
protected IProperty[] getAEStates()
|
||||||
{
|
{
|
||||||
return new IProperty[]{ BlockTorch.FACING };
|
return new IProperty[] { BlockTorch.FACING };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -140,7 +140,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||||
{
|
{
|
||||||
return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false );
|
return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -168,7 +168,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||||
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(
|
public void onNeighborBlockChange(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -188,7 +188,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||||
w.destroyBlock( pos, true );
|
w.destroyBlock( pos, true );
|
||||||
w.markBlockForUpdate( pos );
|
w.markBlockForUpdate( pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlaceBlockAt(
|
public boolean canPlaceBlockAt(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -213,6 +213,6 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||||
@Override
|
@Override
|
||||||
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
||||||
{
|
{
|
||||||
return new MetaRotation( w, pos,true );
|
return new MetaRotation( w, pos, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class BlockPaint extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getCollisionBoundingBox(
|
public AxisAlignedBB getCollisionBoundingBox(
|
||||||
final World worldIn,
|
final World worldIn,
|
||||||
|
@ -127,9 +127,9 @@ public class BlockPaint extends AEBaseTileBlock
|
||||||
final float chance,
|
final float chance,
|
||||||
final int fortune )
|
final int fortune )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillWithRain(
|
public void fillWithRain(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -140,7 +140,7 @@ public class BlockPaint extends AEBaseTileBlock
|
||||||
w.setBlockToAir( pos );
|
w.setBlockToAir( pos );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLightValue(
|
public int getLightValue(
|
||||||
final IBlockAccess w,
|
final IBlockAccess w,
|
||||||
|
@ -163,7 +163,7 @@ public class BlockPaint extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isReplaceable(
|
public boolean isReplaceable(
|
||||||
final World worldIn,
|
final World worldIn,
|
||||||
|
@ -171,5 +171,5 @@ public class BlockPaint extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,25 +63,25 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||||
this.setFullSize( false );
|
this.setFullSize( false );
|
||||||
this.setOpaque( false );
|
this.setOpaque( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetaFromState(
|
public int getMetaFromState(
|
||||||
final IBlockState state )
|
final IBlockState state )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBlockState getStateFromMeta(
|
public IBlockState getStateFromMeta(
|
||||||
final int meta )
|
final int meta )
|
||||||
{
|
{
|
||||||
return this.getDefaultState();
|
return this.getDefaultState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IProperty[] getAEStates()
|
protected IProperty[] getAEStates()
|
||||||
{
|
{
|
||||||
return new IProperty[]{ BlockTorch.FACING };
|
return new IProperty[] { BlockTorch.FACING };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -120,7 +120,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||||
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
public void randomDisplayTick(
|
public void randomDisplayTick(
|
||||||
|
@ -196,6 +196,6 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||||
@Override
|
@Override
|
||||||
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
||||||
{
|
{
|
||||||
return new MetaRotation( w, pos,true );
|
return new MetaRotation( w, pos, true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class BlockSecurity extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
return RendererSecurity.class;
|
return RendererSecurity.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated(
|
public boolean onActivated(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -183,6 +183,6 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||||
final List<AxisAlignedBB> out,
|
final List<AxisAlignedBB> out,
|
||||||
final Entity e )
|
final Entity e )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,9 +52,9 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||||
this.setHardness( 4.2F );
|
this.setHardness( 4.2F );
|
||||||
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 IAESprite ico = super.getIcon( w, pos, side );
|
||||||
final TileVibrationChamber tvc = this.getTileEntity( w, pos );
|
final TileVibrationChamber tvc = this.getTileEntity( w, pos );
|
||||||
|
|
|
@ -49,36 +49,36 @@ public class BlockController extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
return this.name();
|
return this.name();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final PropertyEnum CONTROLLER_STATE = PropertyEnum.create("state",ControllerBlockState.class);
|
public static final PropertyEnum CONTROLLER_STATE = PropertyEnum.create( "state", ControllerBlockState.class );
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IProperty[] getAEStates()
|
protected IProperty[] getAEStates()
|
||||||
{
|
{
|
||||||
return new IProperty[]{ CONTROLLER_STATE };
|
return new IProperty[] { CONTROLLER_STATE };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetaFromState(
|
public int getMetaFromState(
|
||||||
final IBlockState state )
|
final IBlockState state )
|
||||||
{
|
{
|
||||||
return ((ControllerBlockState)state.getValue( CONTROLLER_STATE )).ordinal();
|
return ( (ControllerBlockState) state.getValue( CONTROLLER_STATE ) ).ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBlockState getStateFromMeta( final int meta )
|
public IBlockState getStateFromMeta( final int meta )
|
||||||
{
|
{
|
||||||
return this.getDefaultState().withProperty( CONTROLLER_STATE, ControllerBlockState.OFFLINE );
|
return this.getDefaultState().withProperty( CONTROLLER_STATE, ControllerBlockState.OFFLINE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumWorldBlockLayer getBlockLayer()
|
public EnumWorldBlockLayer getBlockLayer()
|
||||||
{
|
{
|
||||||
return EnumWorldBlockLayer.CUTOUT;
|
return EnumWorldBlockLayer.CUTOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockController()
|
public BlockController()
|
||||||
{
|
{
|
||||||
super( Material.iron );
|
super( Material.iron );
|
||||||
|
|
|
@ -36,9 +36,9 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -59,7 +59,7 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
|
||||||
return ExtraBlockTextures.MEDenseEnergyCell7.getIcon();
|
return ExtraBlockTextures.MEDenseEnergyCell7.getIcon();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getMaxPower()
|
public double getMaxPower()
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,15 +52,15 @@ public class BlockEnergyCell extends AEBaseTileBlock
|
||||||
public int getMetaFromState(
|
public int getMetaFromState(
|
||||||
final IBlockState state )
|
final IBlockState state )
|
||||||
{
|
{
|
||||||
return (int)state.getValue( ENERGY_STORAGE );
|
return (int) state.getValue( ENERGY_STORAGE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBlockState getStateFromMeta( final int meta )
|
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()
|
public BlockEnergyCell()
|
||||||
{
|
{
|
||||||
super( AEGlassMaterial.INSTANCE );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
|
@ -76,9 +76,9 @@ public class BlockEnergyCell extends AEBaseTileBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -122,7 +122,7 @@ public class BlockEnergyCell extends AEBaseTileBlock
|
||||||
@Override
|
@Override
|
||||||
protected IProperty[] getAEStates()
|
protected IProperty[] getAEStates()
|
||||||
{
|
{
|
||||||
return new IProperty[]{ENERGY_STORAGE};
|
return new IProperty[] { ENERGY_STORAGE };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||||
{
|
{
|
||||||
return EnumWorldBlockLayer.CUTOUT;
|
return EnumWorldBlockLayer.CUTOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(
|
public boolean onBlockActivated(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -53,7 +53,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
||||||
{
|
{
|
||||||
return EnumWorldBlockLayer.CUTOUT;
|
return EnumWorldBlockLayer.CUTOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(
|
public void onNeighborBlockChange(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
||||||
{
|
{
|
||||||
super( AEGlassMaterial.INSTANCE );
|
super( AEGlassMaterial.INSTANCE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void randomDisplayTick(
|
public void randomDisplayTick(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -105,7 +105,7 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
||||||
final double onePixel = 2.0 / 16.0;
|
final double onePixel = 2.0 / 16.0;
|
||||||
return Collections.singletonList( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
return Collections.singletonList( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCollidingBlockToList(
|
public void addCollidingBlockToList(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||||
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
|
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
|
||||||
// } );
|
// } );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCollidingBlockToList(
|
public void addCollidingBlockToList(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class BlockSpatialPylon extends AEBaseTileBlock
|
||||||
tsp.onNeighborBlockChange();
|
tsp.onNeighborBlockChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLightValue(
|
public int getLightValue(
|
||||||
final IBlockAccess w,
|
final IBlockAccess w,
|
||||||
|
|
|
@ -43,7 +43,7 @@ import appeng.util.Platform;
|
||||||
|
|
||||||
public class BlockChest extends AEBaseTileBlock
|
public class BlockChest extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockChest()
|
public BlockChest()
|
||||||
{
|
{
|
||||||
super( Material.iron );
|
super( Material.iron );
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class BlockDrive extends AEBaseTileBlock
|
||||||
{
|
{
|
||||||
return RenderDrive.class;
|
return RenderDrive.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated(
|
public boolean onActivated(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class BlockIOPort extends AEBaseTileBlock
|
||||||
this.setTileEntity( TileIOPort.class );
|
this.setTileEntity( TileIOPort.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
|
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(
|
public void onNeighborBlockChange(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -59,7 +59,7 @@ public class BlockIOPort extends AEBaseTileBlock
|
||||||
te.updateRedstoneState();
|
te.updateRedstoneState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated(
|
public boolean onActivated(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -46,14 +46,14 @@ import appeng.util.Platform;
|
||||||
|
|
||||||
public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||||
{
|
{
|
||||||
|
|
||||||
public static enum SkyChestType
|
public static enum SkyChestType
|
||||||
{
|
{
|
||||||
STONE, BLOCK
|
STONE, BLOCK
|
||||||
};
|
};
|
||||||
|
|
||||||
public final SkyChestType type;
|
public final SkyChestType type;
|
||||||
|
|
||||||
public BlockSkyChest( final SkyChestType type )
|
public BlockSkyChest( final SkyChestType type )
|
||||||
{
|
{
|
||||||
super( Material.rock, Optional.of( type.name() ) );
|
super( Material.rock, Optional.of( type.name() ) );
|
||||||
|
@ -90,7 +90,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||||
final World w,
|
final World w,
|
||||||
|
@ -113,7 +113,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||||
final double sc = 0.06;
|
final double sc = 0.06;
|
||||||
return Collections.singletonList( AxisAlignedBB.fromBounds( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) );
|
return Collections.singletonList( AxisAlignedBB.fromBounds( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCollidingBlockToList(
|
public void addCollidingBlockToList(
|
||||||
final World w,
|
final World w,
|
||||||
|
|
|
@ -123,23 +123,24 @@ public class ClientHelper extends ServerHelper
|
||||||
@Override
|
@Override
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
// final Block fluixBlock = GameRegistry.findBlock( "appliedenergistics2", "fluix" );
|
// final Block fluixBlock = GameRegistry.findBlock( "appliedenergistics2", "fluix" );
|
||||||
// Item fluixItem = Item.getItemFromBlock( fluixBlock );
|
// Item fluixItem = Item.getItemFromBlock( fluixBlock );
|
||||||
// ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation( "appliedenergistics2:fluix", "inventory" );
|
// ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation( "appliedenergistics2:fluix",
|
||||||
// final int DEFAULT_ITEM_SUBTYPE = 0;
|
// "inventory" );
|
||||||
// final ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
|
// final int DEFAULT_ITEM_SUBTYPE = 0;
|
||||||
// // mesher.register( fluixItem, DEFAULT_ITEM_SUBTYPE, itemModelResourceLocation );
|
// 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" );
|
// final ResourceLocation resource = new ResourceLocation( "appliedenergistics2", "stair.fluix" );
|
||||||
// AELog.info( "FluixStairModel: " + fluixStairModel );
|
// 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 )
|
// 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 );
|
// AELog.info( "Registering with %s with unlocalized %s", item, item.getUnlocalizedName() );
|
||||||
// }
|
// mesher.register( item, DEFAULT_ITEM_SUBTYPE, fluixStairModel );
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -258,7 +259,7 @@ public class ClientHelper extends ServerHelper
|
||||||
@Override
|
@Override
|
||||||
public void postInit()
|
public void postInit()
|
||||||
{
|
{
|
||||||
//RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE );
|
// RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE );
|
||||||
final RenderManager inst = Minecraft.getMinecraft().getRenderManager();
|
final RenderManager inst = Minecraft.getMinecraft().getRenderManager();
|
||||||
|
|
||||||
inst.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed( inst ) );
|
inst.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed( inst ) );
|
||||||
|
@ -573,7 +574,7 @@ public class ClientHelper extends ServerHelper
|
||||||
|
|
||||||
this.extraIcons.forEach( ev.map::registerSprite );
|
this.extraIcons.forEach( ev.map::registerSprite );
|
||||||
|
|
||||||
//if( ev.map.getTextureType() == ITEM_RENDERER )
|
// if( ev.map.getTextureType() == ITEM_RENDERER )
|
||||||
{
|
{
|
||||||
for( final ExtraItemTextures et : ExtraItemTextures.values() )
|
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() )
|
for( final ExtraBlockTextures et : ExtraBlockTextures.values() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||||
{
|
{
|
||||||
super.initGui();
|
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.setEnableBackgroundDrawing( false );
|
||||||
this.name.setMaxStringLength( 32 );
|
this.name.setMaxStringLength( 32 );
|
||||||
this.name.setTextColor( 0xFFFFFF );
|
this.name.setTextColor( 0xFFFFFF );
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class GuiUpgradeable extends AEBaseGui
|
||||||
}
|
}
|
||||||
if( this.schedulingMode != null )
|
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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -416,7 +416,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class ButtonAppearance
|
private static class ButtonAppearance
|
||||||
{
|
{
|
||||||
public int index;
|
public int index;
|
||||||
|
|
|
@ -55,11 +55,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||||
/**
|
/**
|
||||||
* Using itemstack as an icon
|
* Using itemstack as an icon
|
||||||
*
|
*
|
||||||
* @param x x pos of button
|
* @param x x pos of button
|
||||||
* @param y y pos of button
|
* @param y y pos of button
|
||||||
* @param ico used icon
|
* @param ico used icon
|
||||||
* @param message mouse over message
|
* @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 )
|
public GuiTabButton( final int x, final int y, final ItemStack ico, final String message, final RenderItem ir )
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,10 +45,10 @@ public class MEGuiTextField extends GuiTextField
|
||||||
* Pays attention to the '_' caret.
|
* Pays attention to the '_' caret.
|
||||||
*
|
*
|
||||||
* @param fontRenderer renderer for the strings
|
* @param fontRenderer renderer for the strings
|
||||||
* @param xPos absolute left position
|
* @param xPos absolute left position
|
||||||
* @param yPos absolute top position
|
* @param yPos absolute top position
|
||||||
* @param width absolute width
|
* @param width absolute width
|
||||||
* @param height absolute height
|
* @param height absolute height
|
||||||
*/
|
*/
|
||||||
public MEGuiTextField( final FontRenderer fontRenderer, final int xPos, final int yPos, final int width, final int height )
|
public MEGuiTextField( final FontRenderer fontRenderer, final int xPos, final int yPos, final int width, final int height )
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||||
private final FloatBuffer rotMat = BufferUtils.createFloatBuffer( 16 );
|
private final FloatBuffer rotMat = BufferUtils.createFloatBuffer( 16 );
|
||||||
|
|
||||||
private static int dynRender = 0;
|
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()
|
public BaseBlockRender()
|
||||||
{
|
{
|
||||||
|
@ -330,7 +330,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||||
return ORIENTATION_MAP[a][b][c];
|
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 )
|
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 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 ) )
|
if( sides.contains( AEPartLocation.DOWN ) )
|
||||||
{
|
{
|
||||||
tess.setNormal( 0.0F, -1.0F, 0.0F );
|
tess.setNormal( 0.0F, -1.0F, 0.0F );
|
||||||
tess.setColorOpaque_I( color );
|
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 ) )
|
if( sides.contains( AEPartLocation.UP ) )
|
||||||
{
|
{
|
||||||
tess.setNormal( 0.0F, 1.0F, 0.0F );
|
tess.setNormal( 0.0F, 1.0F, 0.0F );
|
||||||
tess.setColorOpaque_I( color );
|
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 ) )
|
if( sides.contains( AEPartLocation.NORTH ) )
|
||||||
{
|
{
|
||||||
tess.setNormal( 0.0F, 0.0F, -1.0F );
|
tess.setNormal( 0.0F, 0.0F, -1.0F );
|
||||||
tess.setColorOpaque_I( color );
|
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 ) )
|
if( sides.contains( AEPartLocation.SOUTH ) )
|
||||||
{
|
{
|
||||||
tess.setNormal( 0.0F, 0.0F, 1.0F );
|
tess.setNormal( 0.0F, 0.0F, 1.0F );
|
||||||
tess.setColorOpaque_I( color );
|
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 ) )
|
if( sides.contains( AEPartLocation.WEST ) )
|
||||||
{
|
{
|
||||||
tess.setNormal( -1.0F, 0.0F, 0.0F );
|
tess.setNormal( -1.0F, 0.0F, 0.0F );
|
||||||
tess.setColorOpaque_I( color );
|
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 ) )
|
if( sides.contains( AEPartLocation.EAST ) )
|
||||||
{
|
{
|
||||||
tess.setNormal( 1.0F, 0.0F, 0.0F );
|
tess.setNormal( 1.0F, 0.0F, 0.0F );
|
||||||
tess.setColorOpaque_I( color );
|
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 layerBX = 0.0;
|
||||||
final double layerAY = 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
|
// u -> u
|
||||||
0, 1.0,
|
0, 1.0,
|
||||||
// v -> v
|
// v -> v
|
||||||
0, edgeThickness, ico, flip );
|
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
|
// u -> u
|
||||||
0.0, edgeThickness,
|
0.0, edgeThickness,
|
||||||
// v -> v
|
// v -> v
|
||||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
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
|
// u -> u
|
||||||
1.0 - edgeThickness, 1.0,
|
1.0 - edgeThickness, 1.0,
|
||||||
// v -> v
|
// v -> v
|
||||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
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
|
// u -> u
|
||||||
0, 1.0,
|
0, 1.0,
|
||||||
// v -> v
|
// v -> v
|
||||||
|
@ -583,14 +583,14 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly( Side.CLIENT )
|
@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 )
|
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 * 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 * 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 * 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 * ub + bx * va, offsetY + ay * ub + by * va, offsetZ + az * ub + bz * va, ico.getInterpolatedU( ub * 16.0 ), ico.getInterpolatedV( va * 16.0 ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -691,7 +691,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
|
|
||||||
final BlockPos pos = tile.getPos();
|
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...
|
// note that this is a terrible approach...
|
||||||
renderer.setRenderBoundsFromBlock( block );
|
renderer.setRenderBoundsFromBlock( block );
|
||||||
|
@ -753,9 +753,9 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef( 0, -0.14F, 0 );
|
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 );
|
Minecraft.getMinecraft().getRenderManager().renderEntityWithPosYaw( entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F );
|
||||||
//RenderItem.renderInFrame = false;
|
// RenderItem.renderInFrame = false;
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
|
|
||||||
package appeng.client.render;
|
package appeng.client.render;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
|
|
||||||
public interface ISimpleBlockRenderingHandler
|
public interface ISimpleBlockRenderingHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
package appeng.client.render;
|
package appeng.client.render;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
import appeng.client.texture.IAESprite;
|
import appeng.client.texture.IAESprite;
|
||||||
|
|
||||||
|
@ -71,17 +72,17 @@ public class IconUnwrapper extends TextureAtlasSprite
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getInterpolatedU( final double d)
|
public float getInterpolatedU( final double d )
|
||||||
{
|
{
|
||||||
final float f = this.max_u - this.min_u;
|
final float f = this.max_u - this.min_u;
|
||||||
return this.min_u + f * (float)d / 16.0F;
|
return this.min_u + f * (float) d / 16.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getInterpolatedV( final double d)
|
public float getInterpolatedV( final double d )
|
||||||
{
|
{
|
||||||
final float f = this.max_v - this.min_v;
|
final float f = this.max_v - this.min_v;
|
||||||
return this.min_v + f * ((float)d / 16.0F);
|
return this.min_v + f * ( (float) d / 16.0F );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
|
|
||||||
package appeng.client.render;
|
package appeng.client.render;
|
||||||
|
|
||||||
|
|
||||||
import javax.vecmath.Vector3f;
|
import javax.vecmath.Vector3f;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
|
||||||
|
|
||||||
public class SMFace
|
public class SMFace
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -21,7 +24,7 @@ public class SMFace
|
||||||
private final int color;
|
private final int color;
|
||||||
|
|
||||||
public SMFace(
|
public SMFace(
|
||||||
final EnumFacing face , final boolean isEdge,
|
final EnumFacing face, final boolean isEdge,
|
||||||
final int color,
|
final int color,
|
||||||
final Vector3f to,
|
final Vector3f to,
|
||||||
final Vector3f from,
|
final Vector3f from,
|
||||||
|
@ -29,10 +32,10 @@ public class SMFace
|
||||||
final TextureAtlasSprite iconUnwrapper )
|
final TextureAtlasSprite iconUnwrapper )
|
||||||
{
|
{
|
||||||
this.color = color;
|
this.color = color;
|
||||||
this.face=face;
|
this.face = face;
|
||||||
this.isEdge = isEdge;
|
this.isEdge = isEdge;
|
||||||
this.to=to;
|
this.to = to;
|
||||||
this.from=from;
|
this.from = from;
|
||||||
this.uv = defUVs2;
|
this.uv = defUVs2;
|
||||||
this.spite = iconUnwrapper;
|
this.spite = iconUnwrapper;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class SpatialSkyRender extends IRenderHandler
|
||||||
GL11.glDepthMask( false );
|
GL11.glDepthMask( false );
|
||||||
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
|
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||||
final Tessellator tessellator = Tessellator.getInstance();
|
final Tessellator tessellator = Tessellator.getInstance();
|
||||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
|
|
||||||
for( int i = 0; i < 6; ++i )
|
for( int i = 0; i < 6; ++i )
|
||||||
{
|
{
|
||||||
|
@ -145,8 +145,8 @@ public class SpatialSkyRender extends IRenderHandler
|
||||||
private void renderTwinkles()
|
private void renderTwinkles()
|
||||||
{
|
{
|
||||||
final Tessellator tessellator = Tessellator.getInstance();
|
final Tessellator tessellator = Tessellator.getInstance();
|
||||||
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||||
worldrenderer.startDrawingQuads();
|
worldrenderer.startDrawingQuads();
|
||||||
|
|
||||||
for( int i = 0; i < 50; ++i )
|
for( int i = 0; i < 50; ++i )
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,20 +63,20 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
||||||
blk.getRendererInstance().setTemporaryRenderIcons( ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null, null );
|
blk.getRendererInstance().setTemporaryRenderIcons( ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null, null );
|
||||||
|
|
||||||
this.setInvRenderBounds( renderer, 2, 0, 2, 14, 3, 14 );
|
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.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().setTemporaryRenderIcon( null );
|
||||||
|
|
||||||
blk.getRendererInstance().setTemporaryRenderIcons( null, ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null );
|
blk.getRendererInstance().setTemporaryRenderIcons( null, ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null );
|
||||||
|
|
||||||
this.setInvRenderBounds( renderer, 2, 13, 2, 14, 16, 14 );
|
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.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 );
|
renderer.setRenderAllFaces( false );
|
||||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||||
|
@ -140,14 +140,15 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
||||||
|
|
||||||
final Block blk = Block.getBlockFromItem( sis.getItem() );
|
final Block blk = Block.getBlockFromItem( sis.getItem() );
|
||||||
/*
|
/*
|
||||||
if( sis.getItemSpriteNumber() == 0 && block != null && IRenderHelper.renderItemIn3d( blk.getRenderType() ) )
|
* 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( 25.0f, 1.0f, 0.0f, 0.0f );
|
||||||
GL11.glRotatef( 30.0f, 0.0f, 1.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;
|
// << 20 | light << 4;
|
||||||
final int br = tile.getWorld().getCombinedLight( tile.getPos(), 0 );
|
final int br = tile.getWorld().getCombinedLight( tile.getPos(), 0 );
|
||||||
final int var11 = br % 65536;
|
final int var11 = br % 65536;
|
||||||
|
|
|
@ -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 )
|
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 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 hasPower = meta != BlockController.ControllerBlockState.OFFLINE;
|
||||||
final boolean isConflict = meta == BlockController.ControllerBlockState.CONFLICTED;
|
final boolean isConflict = meta == BlockController.ControllerBlockState.CONFLICTED;
|
||||||
|
|
||||||
|
|
|
@ -94,29 +94,27 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
|
||||||
GL11.glScalef( -1, 1, 1 );
|
GL11.glScalef( -1, 1, 1 );
|
||||||
GL11.glTranslated( -0.5, 0, -0.5 );
|
GL11.glTranslated( -0.5, 0, -0.5 );
|
||||||
|
|
||||||
//tess.setTranslation( -tc.getPos().getX(), -tc.getPos().getY(), -tc.getPos().getZ() );
|
// tess.setTranslation( -tc.getPos().getX(), -tc.getPos().getY(), -tc.getPos().getZ() );
|
||||||
//tess.startDrawingQuads();
|
// tess.startDrawingQuads();
|
||||||
|
|
||||||
final RenderItem ri = Minecraft.getMinecraft().getRenderItem();
|
final RenderItem ri = Minecraft.getMinecraft().getRenderItem();
|
||||||
|
|
||||||
final ItemStack stack = new ItemStack( blk );
|
final ItemStack stack = new ItemStack( blk );
|
||||||
final IBakedModel model = ri.getItemModelMesher().getItemModel( stack );
|
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.renderAllFaces = true;
|
||||||
renderBlocks.blockAccess = tc.getWorld();
|
* 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 );
|
// Tessellator.getInstance().draw();
|
||||||
|
// tess.setTranslation( 0, 0, 0 );
|
||||||
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 );
|
|
||||||
RenderHelper.enableStandardItemLighting();
|
RenderHelper.enableStandardItemLighting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,19 +74,19 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||||
|
|
||||||
// sides...
|
// sides...
|
||||||
this.setInvRenderBounds( renderer, 3, 1, 0, 13, 15, 3 );
|
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.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.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.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.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() );
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -279,12 +279,14 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||||
final Block blk = Block.getBlockFromItem( sis.getItem() );
|
final Block blk = Block.getBlockFromItem( sis.getItem() );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if( sis.getItemSpriteNumber() == 0 && block != null && IRenderHelper.renderItemIn3d( blk.getRenderType() ) )
|
* 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( 25.0f, 1.0f, 0.0f, 0.0f );
|
||||||
GL11.glRotatef( 30.0f, 0.0f, 1.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 );
|
GL11.glRotatef( 90.0f, 1, 0, 0 );
|
||||||
|
|
||||||
|
|
|
@ -59,25 +59,25 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
|
||||||
@Override
|
@Override
|
||||||
public void renderInventory( final BlockSkyChest blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
|
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.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||||
//GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
// GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
|
|
||||||
//final int metaData = is.getItemDamage();
|
// final int metaData = is.getItemDamage();
|
||||||
//final ResourceLocation loc = METADATA_TO_TEXTURE[metaData];
|
// 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.glScalef( 1.0F, -1F, -1F );
|
||||||
//GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
|
// GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
|
||||||
|
|
||||||
//this.model.chestLid.offsetY = -( 0.9f / 16.0f );
|
// this.model.chestLid.offsetY = -( 0.9f / 16.0f );
|
||||||
//this.model.chestLid.rotateAngleX = -( ( lidAngle * 3.141593F ) / 2.0F );
|
// this.model.chestLid.rotateAngleX = -( ( lidAngle * 3.141593F ) / 2.0F );
|
||||||
//this.model.renderAll();
|
// this.model.renderAll();
|
||||||
|
|
||||||
//GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
// GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||||
//GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
// GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -103,7 +103,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
|
||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
|
|
||||||
final IBlockState metaData = skyChest.getWorld().getBlockState( skyChest.getPos() );
|
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 );
|
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
|
||||||
|
|
||||||
|
|
|
@ -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 )
|
public void renderInventory( final BlockWireless blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
|
||||||
{
|
{
|
||||||
this.blk = blk;
|
this.blk = blk;
|
||||||
this.center = new BlockPos(0,0,0);
|
this.center = new BlockPos( 0, 0, 0 );
|
||||||
this.hasChan = false;
|
this.hasChan = false;
|
||||||
this.hasPower = false;
|
this.hasPower = false;
|
||||||
final BlockRenderInfo ri = blk.getRendererInstance();
|
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.renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, 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 );
|
||||||
|
|
||||||
//renderer.startDrawingQuads();
|
// renderer.startDrawingQuads();
|
||||||
ri.setTemporaryRenderIcon( null );
|
ri.setTemporaryRenderIcon( null );
|
||||||
this.renderTorchAtAngle( renderer, EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
|
this.renderTorchAtAngle( renderer, EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
|
||||||
super.postRenderInWorld( renderer );
|
super.postRenderInWorld( renderer );
|
||||||
|
@ -88,7 +88,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||||
for( final AEPartLocation side : sides )
|
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.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;
|
s = 3;
|
||||||
|
@ -250,7 +250,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.setColorOpaque_I( 0xffffff );
|
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 );
|
||||||
this.renderFace( this.center, this.blk, sides, renderer, y.getOpposite() );
|
this.renderFace( this.center, this.blk, sides, renderer, y.getOpposite() );
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,6 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double u1 = ico.getInterpolatedU( ( spin % 4 < 2 ) ? 1 : 6 );
|
double u1 = ico.getInterpolatedU( ( spin % 4 < 2 ) ? 1 : 6 );
|
||||||
double u2 = ico.getInterpolatedU( ( ( spin + 1 ) % 4 < 2 ) ? 1 : 6 );
|
double u2 = ico.getInterpolatedU( ( ( spin + 1 ) % 4 < 2 ) ? 1 : 6 );
|
||||||
double u3 = ico.getInterpolatedU( ( ( spin + 2 ) % 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 v3 = ico.getInterpolatedV( ( ( spin + 3 ) % 4 < 2 ) ? m : mx );
|
||||||
double v4 = ico.getInterpolatedV( ( ( spin ) % 4 < 2 ) ? m : mx );
|
double v4 = ico.getInterpolatedV( ( ( spin ) % 4 < 2 ) ? m : mx );
|
||||||
|
|
||||||
final int x= pos.getX();
|
final int x = pos.getX();
|
||||||
final int y= pos.getY();
|
final int y = pos.getY();
|
||||||
final int z= pos.getZ();
|
final int z = pos.getZ();
|
||||||
|
|
||||||
renderer.setBrightness( b );
|
renderer.setBrightness( b );
|
||||||
renderer.setColorOpaque_I( 0xffffff );
|
renderer.setColorOpaque_I( 0xffffff );
|
||||||
switch( forward.getFrontOffsetX() + forward.getFrontOffsetY() * 2 + forward.getFrontOffsetZ() * 3 )
|
switch( forward.getFrontOffsetX() + forward.getFrontOffsetY() * 2 + forward.getFrontOffsetZ() * 3 )
|
||||||
{
|
{
|
||||||
case 1:
|
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.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.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.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.getRenderMinY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case -1:
|
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.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.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.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.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case -2:
|
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.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.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.getRenderMaxZ(), u3, v3 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case 2:
|
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.getRenderMinZ(), u1, v1 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
|
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.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.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
|
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.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.getRenderMaxZ(), u3, v3 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
|
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.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.getRenderMaxZ(), u3, v3 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,39 +303,39 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
|
||||||
{
|
{
|
||||||
case 1:
|
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.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.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.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.getRenderMinY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case -1:
|
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.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.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.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.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case -2:
|
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.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.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.getRenderMaxZ(), u3, v3 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case 2:
|
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.getRenderMinZ(), u1, v1 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMaxY(), z + renderer.getRenderMaxZ(), u2, v2 );
|
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.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.getRenderMaxY(), z + renderer.getRenderMinZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
|
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.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.getRenderMaxZ(), u3, v3 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
renderer.addVertexWithUV( forward, x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMinX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u1, v1 );
|
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.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.getRenderMaxZ(), u3, v3 );
|
||||||
renderer.addVertexWithUV( forward,x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
renderer.addVertexWithUV( forward, x + renderer.getRenderMaxX(), y + renderer.getRenderMinY(), z + renderer.getRenderMaxZ(), u4, v4 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||||
{
|
{
|
||||||
final EnumSet<AEPartLocation> sides = tqb.getConnections();
|
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 );
|
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 );
|
this.renderCableAt( 0.188D, world, pos, block, renderer, renderer.getIcon( parts.cableCovered().stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
|
||||||
final int u = offsets[cx][cy][cz] % 4;
|
final int u = offsets[cx][cy][cz] % 4;
|
||||||
final int v = offsets[9 - cx][9 - cy][9 - 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:
|
case 0:
|
||||||
renderer.setOverrideBlockTexture( new OffsetIcon( renderer.getIcon( world.getBlockState( pos ) )[0], u / 2, v / 2 ) );
|
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 )
|
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 );
|
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 );
|
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 );
|
return AEApi.instance().definitions().blocks().quartzVibrantGlass().isSameAs( world, pos );
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||||
final float Point2 = 6.0f / 16.0f;
|
final float Point2 = 6.0f / 16.0f;
|
||||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
|
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 );
|
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
|
||||||
|
|
||||||
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
|
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
|
||||||
|
@ -154,7 +154,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||||
|
|
||||||
if( te != null )
|
if( te != null )
|
||||||
{
|
{
|
||||||
final AEPartLocation forward = AEPartLocation.fromFacing( te.getUp());
|
final AEPartLocation forward = AEPartLocation.fromFacing( te.getUp() );
|
||||||
switch( forward )
|
switch( forward )
|
||||||
{
|
{
|
||||||
case EAST:
|
case EAST:
|
||||||
|
|
|
@ -56,13 +56,13 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
|
||||||
{
|
{
|
||||||
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
|
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();
|
final int displayBits = ( sp == null ) ? 0 : sp.getDisplayBits();
|
||||||
|
|
||||||
if( displayBits != 0 )
|
if( displayBits != 0 )
|
||||||
{
|
{
|
||||||
EnumFacing ori = null;//AEPartLocation.INTERNAL;
|
EnumFacing ori = null;// AEPartLocation.INTERNAL;
|
||||||
if( ( displayBits & TileSpatialPylon.DISPLAY_Z ) == TileSpatialPylon.DISPLAY_X )
|
if( ( displayBits & TileSpatialPylon.DISPLAY_Z ) == TileSpatialPylon.DISPLAY_X )
|
||||||
{
|
{
|
||||||
ori = EnumFacing.EAST;
|
ori = EnumFacing.EAST;
|
||||||
|
@ -125,7 +125,7 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
|
||||||
|
|
||||||
final BlockRenderInfo bri = imb.getRendererInstance();
|
final BlockRenderInfo bri = imb.getRendererInstance();
|
||||||
bri.setTemporaryRenderIcon( null );
|
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 );
|
final boolean r = renderer.renderStandardBlock( imb, pos );
|
||||||
|
|
||||||
|
@ -137,13 +137,13 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
|
||||||
|
|
||||||
for( final EnumFacing d : EnumFacing.VALUES )
|
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
|
else
|
||||||
{
|
{
|
||||||
bri.setTemporaryRenderIcon( null );
|
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 );
|
renderer.renderStandardBlock( imb, pos );
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
|
||||||
return r;
|
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 );
|
boolean result = renderer.renderStandardBlock( imb, pos );
|
||||||
|
|
||||||
renderer.setOverrideBlockTexture( ExtraBlockTextures.BlockSpatialPylon_dim.getIcon() );
|
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 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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
|
||||||
@Override
|
@Override
|
||||||
public void renderInventory( final BlockTinyTNT block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
|
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 );
|
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||||
super.renderInventory( block, is, renderer, type, obj );
|
super.renderInventory( block, is, renderer, type, obj );
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
|
||||||
@Override
|
@Override
|
||||||
public boolean renderInWorld( final BlockTinyTNT imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
|
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.setRenderAllFaces( true );
|
||||||
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||||
final boolean out = super.renderInWorld( imb, world, pos, renderer );
|
final boolean out = super.renderInWorld( imb, world, pos, renderer );
|
||||||
|
|
|
@ -73,8 +73,8 @@ public class AssemblerFX extends EntityFX
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
this.time += l;
|
||||||
if( this.time > 4.0 )
|
if( this.time > 4.0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,8 +68,8 @@ public class CraftingFx extends EntityBreakingFX
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 )
|
if( partialTick < 0 || partialTick > 1 )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -67,8 +67,8 @@ public class EnergyFx extends EntityBreakingFX
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 f6 = this.particleTextureIndex.getMinU();
|
||||||
final float f7 = this.particleTextureIndex.getMaxU();
|
final float f7 = this.particleTextureIndex.getMaxU();
|
||||||
final float f8 = this.particleTextureIndex.getMinV();
|
final float f8 = this.particleTextureIndex.getMinV();
|
||||||
|
|
|
@ -84,8 +84,8 @@ public class LightningFX extends EntityFX
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
final float j = 1.0f;
|
||||||
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
|
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
|
||||||
if( this.particleAge == 3 )
|
if( this.particleAge == 3 )
|
||||||
|
|
|
@ -70,8 +70,8 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 f6 = this.particleTextureIndex.getMinU();
|
||||||
final float f7 = this.particleTextureIndex.getMaxU();
|
final float f7 = this.particleTextureIndex.getMaxU();
|
||||||
final float f8 = this.particleTextureIndex.getMinV();
|
final float f8 = this.particleTextureIndex.getMinV();
|
||||||
|
|
|
@ -124,4 +124,4 @@ package appeng.client.render.items;
|
||||||
// GL11.glPopAttrib();
|
// GL11.glPopAttrib();
|
||||||
// GL11.glPopMatrix();
|
// GL11.glPopMatrix();
|
||||||
// }
|
// }
|
||||||
//}
|
// }
|
||||||
|
|
|
@ -42,108 +42,95 @@ public class ToolBiometricCardRender implements IItemRenderer // TileEntityItemS
|
||||||
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
|
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
TextureAtlasSprite par2Icon = item.getIconIndex();
|
* TextureAtlasSprite par2Icon = item.getIconIndex();
|
||||||
|
* float f4 = par2Icon.getMinU();
|
||||||
float f4 = par2Icon.getMinU();
|
* float f5 = par2Icon.getMaxU();
|
||||||
float f5 = par2Icon.getMaxU();
|
* float f6 = par2Icon.getMinV();
|
||||||
float f6 = par2Icon.getMinV();
|
* float f7 = par2Icon.getMaxV();
|
||||||
float f7 = par2Icon.getMaxV();
|
* float f12 = 0.0625F;
|
||||||
float f12 = 0.0625F;
|
* Tessellator tessellator = Tessellator.instance;
|
||||||
|
* GL11.glPushMatrix();
|
||||||
Tessellator tessellator = Tessellator.instance;
|
* GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||||
GL11.glPushMatrix();
|
* if( type == ItemRenderType.INVENTORY )
|
||||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
* {
|
||||||
|
* GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||||
if( type == ItemRenderType.INVENTORY )
|
* GL11.glScalef( 16F, 16F, 10F );
|
||||||
{
|
* GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
|
||||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
||||||
GL11.glScalef( 16F, 16F, 10F );
|
* GL11.glEnable( GL11.GL_ALPHA_TEST );
|
||||||
GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
|
* tessellator.startDrawingQuads();
|
||||||
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
* tessellator.setNormal( 0.0F, 1.0F, 0.0F );
|
||||||
GL11.glEnable( GL11.GL_ALPHA_TEST );
|
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||||
|
* tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
|
||||||
tessellator.startDrawingQuads();
|
* tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
|
||||||
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
|
* tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
|
||||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
* tessellator.draw();
|
||||||
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
|
* }
|
||||||
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
|
* else
|
||||||
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
|
* {
|
||||||
tessellator.draw();
|
* GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
|
||||||
}
|
* ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(),
|
||||||
else
|
* f12 );
|
||||||
{
|
* GL11.glDisable( GL11.GL_CULL_FACE );
|
||||||
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
|
* GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
|
* GL11.glScalef( 1F, 1.1F, 1F );
|
||||||
|
* GL11.glTranslatef( 0.0F, 1.07F, f12 / -2.0f );
|
||||||
GL11.glDisable( GL11.GL_CULL_FACE );
|
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
||||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
* }
|
||||||
GL11.glScalef( 1F, 1.1F, 1F );
|
* float u = ExtraItemTextures.White.getIcon().getInterpolatedU( 8.1 );
|
||||||
GL11.glTranslatef( 0.0F, 1.07F, f12 / -2.0f );
|
* float v = ExtraItemTextures.White.getIcon().getInterpolatedV( 8.1 );
|
||||||
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
* String username = "";
|
||||||
}
|
* if( item.getItem() instanceof IBiometricCard )
|
||||||
|
* {
|
||||||
float u = ExtraItemTextures.White.getIcon().getInterpolatedU( 8.1 );
|
* GameProfile gp = ( (IBiometricCard) item.getItem() ).getProfile( item );
|
||||||
float v = ExtraItemTextures.White.getIcon().getInterpolatedV( 8.1 );
|
* if( gp != null )
|
||||||
|
* {
|
||||||
String username = "";
|
* username = gp.getName();
|
||||||
if( item.getItem() instanceof IBiometricCard )
|
* }
|
||||||
{
|
* }
|
||||||
GameProfile gp = ( (IBiometricCard) item.getItem() ).getProfile( item );
|
* int hash = username.length() > 0 ? username.hashCode() : 0;
|
||||||
if( gp != null )
|
* GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
|
||||||
{
|
* GL11.glTranslatef( 4, 6, 0 );
|
||||||
username = gp.getName();
|
* GL11.glDisable( GL11.GL_LIGHTING );
|
||||||
}
|
* tessellator.startDrawingQuads();
|
||||||
}
|
* float z = 0;
|
||||||
int hash = username.length() > 0 ? username.hashCode() : 0;
|
* AEColor col = AEColor.values()[Math.abs( 3 + hash ) % AEColor.values().length];
|
||||||
|
* if( hash == 0 )
|
||||||
GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
|
* {
|
||||||
GL11.glTranslatef( 4, 6, 0 );
|
* col = AEColor.Black;
|
||||||
GL11.glDisable( GL11.GL_LIGHTING );
|
* }
|
||||||
|
* for( int x = 0; x < 8; x++ )// 8
|
||||||
tessellator.startDrawingQuads();
|
* {
|
||||||
float z = 0;
|
* for( int y = 0; y < 6; y++ )// 6
|
||||||
|
* {
|
||||||
AEColor col = AEColor.values()[Math.abs( 3 + hash ) % AEColor.values().length];
|
* boolean isLit = false;
|
||||||
if( hash == 0 )
|
* float scale = 0.3f / 255.0f;
|
||||||
{
|
* if( x == 0 || y == 0 || x == 7 || y == 5 )
|
||||||
col = AEColor.Black;
|
* {
|
||||||
}
|
* isLit = false;
|
||||||
|
* }
|
||||||
for( int x = 0; x < 8; x++ )// 8
|
* else
|
||||||
{
|
* {
|
||||||
for( int y = 0; y < 6; y++ )// 6
|
* isLit = ( hash & ( 1 << x ) ) != 0 || ( hash & ( 1 << y ) ) != 0;
|
||||||
{
|
* }
|
||||||
boolean isLit = false;
|
* if( isLit )
|
||||||
float scale = 0.3f / 255.0f;
|
* {
|
||||||
|
* tessellator.setColorOpaque_I( col.mediumVariant );
|
||||||
if( x == 0 || y == 0 || x == 7 || y == 5 )
|
* }
|
||||||
{
|
* else
|
||||||
isLit = false;
|
* {
|
||||||
}
|
* tessellator.setColorOpaque_F( ( ( col.blackVariant >> 16 ) & 0xff ) * scale, ( ( col.blackVariant >> 8 ) &
|
||||||
else
|
* 0xff ) * scale, ( col.blackVariant & 0xff ) * scale );
|
||||||
{
|
* }
|
||||||
isLit = ( hash & ( 1 << x ) ) != 0 || ( hash & ( 1 << y ) ) != 0;
|
* tessellator.addVertexWithUV( x, y, z, u, v );
|
||||||
}
|
* tessellator.addVertexWithUV( x + 1, y, z, u, v );
|
||||||
|
* tessellator.addVertexWithUV( x + 1, y + 1, z, u, v );
|
||||||
if( isLit )
|
* tessellator.addVertexWithUV( x, y + 1, z, u, v );
|
||||||
{
|
* }
|
||||||
tessellator.setColorOpaque_I( col.mediumVariant );
|
* }
|
||||||
}
|
* tessellator.draw();
|
||||||
else
|
* GL11.glPopAttrib();
|
||||||
{
|
* GL11.glPopMatrix();
|
||||||
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();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,114 +42,97 @@ public class ToolColorApplicatorRender implements IItemRenderer
|
||||||
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
|
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
TextureAtlasSprite par2Icon = item.getIconIndex();
|
* TextureAtlasSprite par2Icon = item.getIconIndex();
|
||||||
|
* float f4 = par2Icon.getMinU();
|
||||||
float f4 = par2Icon.getMinU();
|
* float f5 = par2Icon.getMaxU();
|
||||||
float f5 = par2Icon.getMaxU();
|
* float f6 = par2Icon.getMinV();
|
||||||
float f6 = par2Icon.getMinV();
|
* float f7 = par2Icon.getMaxV();
|
||||||
float f7 = par2Icon.getMaxV();
|
* float f12 = 0.0625F;
|
||||||
float f12 = 0.0625F;
|
* Tessellator tessellator = Tessellator.instance;
|
||||||
|
* GL11.glPushMatrix();
|
||||||
Tessellator tessellator = Tessellator.instance;
|
* GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||||
GL11.glPushMatrix();
|
* if( type == ItemRenderType.INVENTORY )
|
||||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
* {
|
||||||
|
* GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||||
if( type == ItemRenderType.INVENTORY )
|
* GL11.glScalef( 16F, 16F, 10F );
|
||||||
{
|
* GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
|
||||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
||||||
GL11.glScalef( 16F, 16F, 10F );
|
* GL11.glEnable( GL11.GL_ALPHA_TEST );
|
||||||
GL11.glTranslatef( 0.0F, 1.0F, 0.0F );
|
* tessellator.startDrawingQuads();
|
||||||
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
* tessellator.setNormal( 0.0F, 1.0F, 0.0F );
|
||||||
GL11.glEnable( GL11.GL_ALPHA_TEST );
|
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||||
|
* tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
|
||||||
tessellator.startDrawingQuads();
|
* tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
|
||||||
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
|
* tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
|
||||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
* tessellator.draw();
|
||||||
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
|
* }
|
||||||
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
|
* else
|
||||||
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
|
* {
|
||||||
tessellator.draw();
|
* if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
|
||||||
}
|
* {
|
||||||
else
|
* GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
|
||||||
{
|
* }
|
||||||
if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
|
* else if( type == ItemRenderType.EQUIPPED )
|
||||||
{
|
* {
|
||||||
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
|
* GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
|
||||||
}
|
* }
|
||||||
else if( type == ItemRenderType.EQUIPPED )
|
* else
|
||||||
{
|
* {
|
||||||
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
|
* GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
|
||||||
}
|
* }
|
||||||
else
|
* ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(),
|
||||||
{
|
* f12 );
|
||||||
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
|
* GL11.glDisable( GL11.GL_CULL_FACE );
|
||||||
}
|
* GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
|
* GL11.glScalef( -1F, -1F, 1F );
|
||||||
|
* GL11.glTranslatef( -1.125F, 0.0f, f12 / -2.0f );
|
||||||
GL11.glDisable( GL11.GL_CULL_FACE );
|
* GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
||||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
* }
|
||||||
GL11.glScalef( -1F, -1F, 1F );
|
* TextureAtlasSprite dark = ExtraItemTextures.ToolColorApplicatorTip_Dark.getIcon();
|
||||||
GL11.glTranslatef( -1.125F, 0.0f, f12 / -2.0f );
|
* TextureAtlasSprite med = ExtraItemTextures.ToolColorApplicatorTip_Medium.getIcon();
|
||||||
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
* TextureAtlasSprite light = ExtraItemTextures.ToolColorApplicatorTip_Light.getIcon();
|
||||||
}
|
* GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
|
||||||
|
* if( type != ItemRenderType.INVENTORY )
|
||||||
TextureAtlasSprite dark = ExtraItemTextures.ToolColorApplicatorTip_Dark.getIcon();
|
* {
|
||||||
TextureAtlasSprite med = ExtraItemTextures.ToolColorApplicatorTip_Medium.getIcon();
|
* GL11.glTranslatef( 2, 0, 0 );
|
||||||
TextureAtlasSprite light = ExtraItemTextures.ToolColorApplicatorTip_Light.getIcon();
|
* }
|
||||||
|
* GL11.glDisable( GL11.GL_LIGHTING );
|
||||||
GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
|
* AEColor col = null;
|
||||||
if( type != ItemRenderType.INVENTORY )
|
* col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
|
||||||
{
|
* if( col != null )
|
||||||
GL11.glTranslatef( 2, 0, 0 );
|
* {
|
||||||
}
|
* tessellator.startDrawingQuads();
|
||||||
GL11.glDisable( GL11.GL_LIGHTING );
|
* f4 = dark.getMinU();
|
||||||
|
* f5 = dark.getMaxU();
|
||||||
AEColor col = null;
|
* f6 = dark.getMinV();
|
||||||
|
* f7 = dark.getMaxV();
|
||||||
col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
|
* tessellator.setColorOpaque_I( col.blackVariant );
|
||||||
|
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||||
if( col != null )
|
* tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
||||||
{
|
* tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
||||||
tessellator.startDrawingQuads();
|
* tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
||||||
|
* f4 = light.getMinU();
|
||||||
f4 = dark.getMinU();
|
* f5 = light.getMaxU();
|
||||||
f5 = dark.getMaxU();
|
* f6 = light.getMinV();
|
||||||
f6 = dark.getMinV();
|
* f7 = light.getMaxV();
|
||||||
f7 = dark.getMaxV();
|
* tessellator.setColorOpaque_I( col.whiteVariant );
|
||||||
|
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||||
tessellator.setColorOpaque_I( col.blackVariant );
|
* tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
||||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
* tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
||||||
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
* tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
||||||
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
* f4 = med.getMinU();
|
||||||
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
* f5 = med.getMaxU();
|
||||||
|
* f6 = med.getMinV();
|
||||||
f4 = light.getMinU();
|
* f7 = med.getMaxV();
|
||||||
f5 = light.getMaxU();
|
* tessellator.setColorOpaque_I( col.mediumVariant );
|
||||||
f6 = light.getMinV();
|
* tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||||
f7 = light.getMaxV();
|
* tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
||||||
|
* tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
||||||
tessellator.setColorOpaque_I( col.whiteVariant );
|
* tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
||||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
* tessellator.draw();
|
||||||
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
* }
|
||||||
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
* GL11.glPopAttrib();
|
||||||
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
* GL11.glPopMatrix();
|
||||||
|
*/
|
||||||
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();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
|
|
||||||
package appeng.client.texture;
|
package appeng.client.texture;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
|
|
||||||
|
|
||||||
public class BaseIcon implements IAESprite
|
public class BaseIcon implements IAESprite
|
||||||
{
|
{
|
||||||
private final TextureAtlasSprite spite;
|
private final TextureAtlasSprite spite;
|
||||||
|
|
||||||
public BaseIcon( final TextureAtlasSprite src )
|
public BaseIcon( final TextureAtlasSprite src )
|
||||||
{
|
{
|
||||||
this.spite = src;
|
this.spite = src;
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class FullIcon implements IAESprite
|
||||||
{
|
{
|
||||||
return this.p;
|
return this.p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIconWidth()
|
public int getIconWidth()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
|
|
||||||
package appeng.client.texture;
|
package appeng.client.texture;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
|
|
||||||
|
|
||||||
public interface IAESprite
|
public interface IAESprite
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,7 @@ public class MissingIcon implements IAESprite
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
public
|
public static TextureAtlasSprite getMissing()
|
||||||
static TextureAtlasSprite getMissing()
|
|
||||||
{
|
{
|
||||||
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
return ( (TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture( TextureMap.locationBlocksTexture ) ).getAtlasSprite( "missingno" );
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class TaughtIcon implements IAESprite
|
||||||
{
|
{
|
||||||
return this.icon.getAtlas();
|
return this.icon.getAtlas();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TaughtIcon( final IAESprite iIcon, final float tightness )
|
public TaughtIcon( final IAESprite iIcon, final float tightness )
|
||||||
{
|
{
|
||||||
if( iIcon == null )
|
if( iIcon == null )
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||||
@Override
|
@Override
|
||||||
/**
|
/**
|
||||||
* Overridden super.setupConfig to prevent setting up the fake slots
|
* Overridden super.setupConfig to prevent setting up the fake slots
|
||||||
*/ protected void setupConfig()
|
*/protected void setupConfig()
|
||||||
{
|
{
|
||||||
this.setupUpgrades();
|
this.setupUpgrades();
|
||||||
}
|
}
|
||||||
|
@ -126,10 +126,10 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||||
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||||
{
|
{
|
||||||
final boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
|
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...
|
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 )
|
if( matchA || matchB )
|
||||||
{
|
{
|
||||||
|
|
|
@ -230,16 +230,16 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||||
public void openInventory(
|
public void openInventory(
|
||||||
final EntityPlayer player )
|
final EntityPlayer player )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeInventory(
|
public void closeInventory(
|
||||||
final EntityPlayer player )
|
final EntityPlayer player )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot( final int var1, final ItemStack var2 )
|
public boolean isItemValidForSlot( final int var1, final ItemStack var2 )
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||||
final int id,
|
final int id,
|
||||||
final int value )
|
final int value )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -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 );
|
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 )
|
public void onContainerClosed( final EntityPlayer par1EntityPlayer )
|
||||||
{
|
{
|
||||||
super.onContainerClosed( par1EntityPlayer );
|
super.onContainerClosed( par1EntityPlayer );
|
||||||
this.chest.closeInventory(par1EntityPlayer);
|
this.chest.closeInventory( par1EntityPlayer );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,43 +142,43 @@ public class AppEngCraftingSlot extends AppEngSlot
|
||||||
@Override
|
@Override
|
||||||
public void onPickupFromSlot( final EntityPlayer playerIn, final ItemStack stack )
|
public void onPickupFromSlot( final EntityPlayer playerIn, final ItemStack stack )
|
||||||
{
|
{
|
||||||
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, this.craftMatrix );
|
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent( playerIn, stack, this.craftMatrix );
|
||||||
this.onCrafting(stack);
|
this.onCrafting( stack );
|
||||||
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(playerIn);
|
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( playerIn );
|
||||||
final InventoryCrafting ic = new InventoryCrafting( this.getContainer(), 3, 3 );
|
final InventoryCrafting ic = new InventoryCrafting( this.getContainer(), 3, 3 );
|
||||||
|
|
||||||
for ( int x=0; x < this.craftMatrix.getSizeInventory(); x++ )
|
for( int x = 0; x < this.craftMatrix.getSizeInventory(); x++ )
|
||||||
ic.setInventorySlotContents( x, this.craftMatrix.getStackInSlot( 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 ) );
|
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)
|
for( int i = 0; i < aitemstack.length; ++i )
|
||||||
{
|
{
|
||||||
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i);
|
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot( i );
|
||||||
final ItemStack itemstack2 = aitemstack[i];
|
final ItemStack itemstack2 = aitemstack[i];
|
||||||
|
|
||||||
if (itemstack1 != null)
|
if( itemstack1 != null )
|
||||||
{
|
{
|
||||||
this.craftMatrix.decrStackSize(i, 1);
|
this.craftMatrix.decrStackSize( i, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemstack2 != null)
|
if( itemstack2 != null )
|
||||||
{
|
{
|
||||||
if (this.craftMatrix.getStackInSlot(i) == null)
|
if( this.craftMatrix.getStackInSlot( i ) == null )
|
||||||
{
|
{
|
||||||
this.craftMatrix.setInventorySlotContents(i, itemstack2);
|
this.craftMatrix.setInventorySlotContents( i, itemstack2 );
|
||||||
}
|
}
|
||||||
else if (!this.thePlayer.inventory.addItemStackToInventory(itemstack2))
|
else if( !this.thePlayer.inventory.addItemStackToInventory( itemstack2 ) )
|
||||||
{
|
{
|
||||||
this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false);
|
this.thePlayer.dropPlayerItemWithRandomChoice( itemstack2, false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,8 +21,8 @@ package appeng.container.slot;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
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
|
public class SlotPlayerInv extends AppEngSlot
|
||||||
{
|
{
|
||||||
|
|
|
@ -144,7 +144,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem)
|
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ?
|
||||||
|
// ((ICraftingPatternItem)
|
||||||
// i.getItem()).getPatternForItem( i ) : null;
|
// i.getItem()).getPatternForItem( i ) : null;
|
||||||
return false;// pattern != null;
|
return false;// pattern != null;
|
||||||
}
|
}
|
||||||
|
@ -178,8 +179,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||||
|
|
||||||
case INSCRIBER_INPUT:
|
case INSCRIBER_INPUT:
|
||||||
return true;/*
|
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;
|
* return false;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public final class Api implements IAppEngApi
|
||||||
@Override
|
@Override
|
||||||
public IGridNode createGridNode( final IGridBlock blk )
|
public IGridNode createGridNode( final IGridBlock blk )
|
||||||
{
|
{
|
||||||
if ( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
{
|
{
|
||||||
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ public abstract class CommonHelper
|
||||||
|
|
||||||
public abstract World getWorld();
|
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();
|
public abstract List<EntityPlayer> getPlayers();
|
||||||
|
|
||||||
|
@ -71,8 +71,8 @@ public abstract class CommonHelper
|
||||||
public abstract void updateRenderMode( EntityPlayer player );
|
public abstract void updateRenderMode( EntityPlayer player );
|
||||||
|
|
||||||
public abstract void missingCoreMod();
|
public abstract void missingCoreMod();
|
||||||
|
|
||||||
public abstract void configureIcon(Object item, String name );
|
public abstract void configureIcon( Object item, String name );
|
||||||
|
|
||||||
public abstract ResourceLocation addIcon(
|
public abstract ResourceLocation addIcon(
|
||||||
String string );
|
String string );
|
||||||
|
|
|
@ -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
|
* @param event Event carrying the identifier and message for the handlers
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -144,15 +144,15 @@ public final class ApiBlocks implements IBlocks
|
||||||
private final IBlockDefinition chiseledQuartzStair;
|
private final IBlockDefinition chiseledQuartzStair;
|
||||||
private final IBlockDefinition quartzPillarStair;
|
private final IBlockDefinition quartzPillarStair;
|
||||||
/*
|
/*
|
||||||
private final IBlockDefinition skyStoneSlab;
|
* private final IBlockDefinition skyStoneSlab;
|
||||||
private final IBlockDefinition skyStoneBlockSlab;
|
* private final IBlockDefinition skyStoneBlockSlab;
|
||||||
private final IBlockDefinition skyStoneBrickSlab;
|
* private final IBlockDefinition skyStoneBrickSlab;
|
||||||
private final IBlockDefinition skyStoneSmallBrickSlab;
|
* private final IBlockDefinition skyStoneSmallBrickSlab;
|
||||||
private final IBlockDefinition fluixSlab;
|
* private final IBlockDefinition fluixSlab;
|
||||||
private final IBlockDefinition quartzSlab;
|
* private final IBlockDefinition quartzSlab;
|
||||||
private final IBlockDefinition chiseledQuartzSlab;
|
* private final IBlockDefinition chiseledQuartzSlab;
|
||||||
private final IBlockDefinition quartzPillarSlab;
|
* private final IBlockDefinition quartzPillarSlab;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private final IBlockDefinition itemGen;
|
private final IBlockDefinition itemGen;
|
||||||
private final IBlockDefinition chunkLoader;
|
private final IBlockDefinition chunkLoader;
|
||||||
|
@ -161,7 +161,7 @@ public final class ApiBlocks implements IBlocks
|
||||||
|
|
||||||
public ApiBlocks( final DefinitionConstructor constructor )
|
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.quartzOre = constructor.registerBlockDefinition( new QuartzOreBlock() );
|
||||||
this.quartzOreCharged = constructor.registerBlockDefinition( new ChargedQuartzOreBlock() );
|
this.quartzOreCharged = constructor.registerBlockDefinition( new ChargedQuartzOreBlock() );
|
||||||
this.matrixFrame = constructor.registerBlockDefinition( new BlockMatrixFrame() );
|
this.matrixFrame = constructor.registerBlockDefinition( new BlockMatrixFrame() );
|
||||||
|
@ -226,15 +226,23 @@ public final class ApiBlocks implements IBlocks
|
||||||
|
|
||||||
// TODO Re-Add Slabs...
|
// TODO Re-Add Slabs...
|
||||||
/*
|
/*
|
||||||
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_stone, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
|
* this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_stone,
|
||||||
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_block, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
|
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
|
||||||
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_brick, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
|
* this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_block,
|
||||||
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_smallbrick, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
|
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
|
||||||
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
|
* this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_brick,
|
||||||
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
|
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
|
||||||
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
|
* this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_smallbrick,
|
||||||
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) )
|
* 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.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
||||||
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
||||||
|
@ -403,54 +411,47 @@ public final class ApiBlocks implements IBlocks
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@Override
|
* @Override
|
||||||
public IBlockDefinition skyStoneSlab()
|
* public IBlockDefinition skyStoneSlab()
|
||||||
{
|
* {
|
||||||
return this.skyStoneSlab;
|
* return this.skyStoneSlab;
|
||||||
}
|
* }
|
||||||
|
* @Override
|
||||||
@Override
|
* public IBlockDefinition skyStoneBlockSlab()
|
||||||
public IBlockDefinition skyStoneBlockSlab()
|
* {
|
||||||
{
|
* return this.skyStoneBlockSlab;
|
||||||
return this.skyStoneBlockSlab;
|
* }
|
||||||
}
|
* @Override
|
||||||
|
* public IBlockDefinition skyStoneBrickSlab()
|
||||||
@Override
|
* {
|
||||||
public IBlockDefinition skyStoneBrickSlab()
|
* return this.skyStoneBrickSlab;
|
||||||
{
|
* }
|
||||||
return this.skyStoneBrickSlab;
|
* @Override
|
||||||
}
|
* public IBlockDefinition skyStoneSmallBrickSlab()
|
||||||
|
* {
|
||||||
@Override
|
* return this.skyStoneSmallBrickSlab;
|
||||||
public IBlockDefinition skyStoneSmallBrickSlab()
|
* }
|
||||||
{
|
* @Override
|
||||||
return this.skyStoneSmallBrickSlab;
|
* public IBlockDefinition fluixSlab()
|
||||||
}
|
* {
|
||||||
|
* return this.fluixSlab;
|
||||||
@Override
|
* }
|
||||||
public IBlockDefinition fluixSlab()
|
* @Override
|
||||||
{
|
* public IBlockDefinition quartzSlab()
|
||||||
return this.fluixSlab;
|
* {
|
||||||
}
|
* return this.quartzSlab;
|
||||||
|
* }
|
||||||
@Override
|
* @Override
|
||||||
public IBlockDefinition quartzSlab()
|
* public IBlockDefinition chiseledQuartzSlab()
|
||||||
{
|
* {
|
||||||
return this.quartzSlab;
|
* return this.chiseledQuartzSlab;
|
||||||
}
|
* }
|
||||||
|
* @Override
|
||||||
@Override
|
* public IBlockDefinition quartzPillarSlab()
|
||||||
public IBlockDefinition chiseledQuartzSlab()
|
* {
|
||||||
{
|
* return this.quartzPillarSlab;
|
||||||
return this.chiseledQuartzSlab;
|
* }
|
||||||
}
|
*/
|
||||||
|
|
||||||
@Override
|
|
||||||
public IBlockDefinition quartzPillarSlab()
|
|
||||||
{
|
|
||||||
return this.quartzPillarSlab;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITileDefinition grindStone()
|
public ITileDefinition grindStone()
|
||||||
|
|
|
@ -126,7 +126,6 @@ public final class ApiMaterials implements IMaterials
|
||||||
this.logicProcessorPrint = new DamagedItemDefinition( "material.print.processor.logic", materials.createMaterial( MaterialType.LogicProcessorPrint ) );
|
this.logicProcessorPrint = new DamagedItemDefinition( "material.print.processor.logic", materials.createMaterial( MaterialType.LogicProcessorPrint ) );
|
||||||
this.siliconPrint = new DamagedItemDefinition( "material.print.silicon", materials.createMaterial( MaterialType.SiliconPrint ) );
|
this.siliconPrint = new DamagedItemDefinition( "material.print.silicon", materials.createMaterial( MaterialType.SiliconPrint ) );
|
||||||
|
|
||||||
|
|
||||||
this.logicProcessor = new DamagedItemDefinition( "material.processor.logic", materials.createMaterial( MaterialType.LogicProcessor ) );
|
this.logicProcessor = new DamagedItemDefinition( "material.processor.logic", materials.createMaterial( MaterialType.LogicProcessor ) );
|
||||||
this.calcProcessor = new DamagedItemDefinition( "material.processor.calculation", materials.createMaterial( MaterialType.CalcProcessor ) );
|
this.calcProcessor = new DamagedItemDefinition( "material.processor.calculation", materials.createMaterial( MaterialType.CalcProcessor ) );
|
||||||
this.engProcessor = new DamagedItemDefinition( "material.processor.engineering", materials.createMaterial( MaterialType.EngProcessor ) );
|
this.engProcessor = new DamagedItemDefinition( "material.processor.engineering", materials.createMaterial( MaterialType.EngProcessor ) );
|
||||||
|
|
|
@ -57,11 +57,11 @@ public final class ApiParts implements IParts
|
||||||
private final IItemDefinition p2PTunnelRedstone;
|
private final IItemDefinition p2PTunnelRedstone;
|
||||||
private final IItemDefinition p2PTunnelItems;
|
private final IItemDefinition p2PTunnelItems;
|
||||||
private final IItemDefinition p2PTunnelLiquids;
|
private final IItemDefinition p2PTunnelLiquids;
|
||||||
//private final IItemDefinition p2PTunnelEU;
|
// private final IItemDefinition p2PTunnelEU;
|
||||||
//private final IItemDefinition p2PTunnelRF;
|
// private final IItemDefinition p2PTunnelRF;
|
||||||
private final IItemDefinition p2PTunnelLight;
|
private final IItemDefinition p2PTunnelLight;
|
||||||
// private final IItemDefinition p2PTunnelOpenComputers;
|
// private final IItemDefinition p2PTunnelOpenComputers;
|
||||||
// private final IItemDefinition p2PTunnelPneumaticCraft;
|
// private final IItemDefinition p2PTunnelPneumaticCraft;
|
||||||
private final IItemDefinition cableAnchor;
|
private final IItemDefinition cableAnchor;
|
||||||
private final IItemDefinition monitor;
|
private final IItemDefinition monitor;
|
||||||
private final IItemDefinition semiDarkMonitor;
|
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.p2PTunnelRedstone = new DamagedItemDefinition( "part.tunnel.redstone", itemMultiPart.createPart( PartType.P2PTunnelRedstone ) );
|
||||||
this.p2PTunnelItems = new DamagedItemDefinition( "part.tunnel.item", itemMultiPart.createPart( PartType.P2PTunnelItems ) );
|
this.p2PTunnelItems = new DamagedItemDefinition( "part.tunnel.item", itemMultiPart.createPart( PartType.P2PTunnelItems ) );
|
||||||
this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemMultiPart.createPart( PartType.P2PTunnelLiquids ) );
|
this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemMultiPart.createPart( PartType.P2PTunnelLiquids ) );
|
||||||
//this.p2PTunnelEU = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelEU ) );
|
// this.p2PTunnelEU = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelEU ) );
|
||||||
//this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
// this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||||
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
||||||
//this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
|
// this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart(
|
||||||
// this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelPressure ) );
|
// PartType.P2PTunnelOpenComputers ) );
|
||||||
|
// this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart(
|
||||||
|
// PartType.P2PTunnelPressure ) );
|
||||||
this.cableAnchor = new DamagedItemDefinition( "part.cable_anchor", itemMultiPart.createPart( PartType.CableAnchor ) );
|
this.cableAnchor = new DamagedItemDefinition( "part.cable_anchor", itemMultiPart.createPart( PartType.CableAnchor ) );
|
||||||
this.monitor = new DamagedItemDefinition( "part.monitor", itemMultiPart.createPart( PartType.Monitor ) );
|
this.monitor = new DamagedItemDefinition( "part.monitor", itemMultiPart.createPart( PartType.Monitor ) );
|
||||||
this.semiDarkMonitor = new DamagedItemDefinition( "part.monitor.semi_dark", itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
this.semiDarkMonitor = new DamagedItemDefinition( "part.monitor.semi_dark", itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
||||||
|
@ -259,41 +261,39 @@ public final class ApiParts implements IParts
|
||||||
{
|
{
|
||||||
return this.p2PTunnelLiquids;
|
return this.p2PTunnelLiquids;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
@Override
|
|
||||||
public IItemDefinition p2PTunnelEU()
|
|
||||||
{
|
|
||||||
return this.p2PTunnelEU;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
/*
|
||||||
public IItemDefinition p2PTunnelRF()
|
* @Override
|
||||||
{
|
* public IItemDefinition p2PTunnelEU()
|
||||||
return this.p2PTunnelRF;
|
* {
|
||||||
}
|
* return this.p2PTunnelEU;
|
||||||
*/
|
* }
|
||||||
|
* @Override
|
||||||
|
* public IItemDefinition p2PTunnelRF()
|
||||||
|
* {
|
||||||
|
* return this.p2PTunnelRF;
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemDefinition p2PTunnelLight()
|
public IItemDefinition p2PTunnelLight()
|
||||||
{
|
{
|
||||||
return this.p2PTunnelLight;
|
return this.p2PTunnelLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
@Override
|
|
||||||
public IItemDefinition p2PTunnelOpenComputers()
|
|
||||||
{
|
|
||||||
return this.p2PTunnelOpenComputers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
/*
|
||||||
public IItemDefinition p2PTunnelPneumaticCraft()
|
* @Override
|
||||||
{
|
* public IItemDefinition p2PTunnelOpenComputers()
|
||||||
return this.p2PTunnelPneumaticCraft;
|
* {
|
||||||
}
|
* return this.p2PTunnelOpenComputers;
|
||||||
*/
|
* }
|
||||||
|
* @Override
|
||||||
|
* public IItemDefinition p2PTunnelPneumaticCraft()
|
||||||
|
* {
|
||||||
|
* return this.p2PTunnelPneumaticCraft;
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemDefinition cableAnchor()
|
public IItemDefinition cableAnchor()
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class DefinitionConstructor
|
||||||
|
|
||||||
if( definition instanceof ITileDefinition )
|
if( definition instanceof ITileDefinition )
|
||||||
{
|
{
|
||||||
return ( (ITileDefinition) definition );
|
return( (ITileDefinition) definition );
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalStateException( "No tile definition for " + feature );
|
throw new IllegalStateException( "No tile definition for " + feature );
|
||||||
|
@ -65,7 +65,7 @@ public class DefinitionConstructor
|
||||||
|
|
||||||
if( definition instanceof IBlockDefinition )
|
if( definition instanceof IBlockDefinition )
|
||||||
{
|
{
|
||||||
return ( (IBlockDefinition) definition );
|
return( (IBlockDefinition) definition );
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalStateException( "No block definition for " + feature );
|
throw new IllegalStateException( "No block definition for " + feature );
|
||||||
|
|
|
@ -18,35 +18,35 @@
|
||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound in = new NBTTagCompound();
|
NBTTagCompound in = new NBTTagCompound();
|
||||||
NBTTagCompound out = new NBTTagCompound();
|
NBTTagCompound out = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||||
msg.setTag( "in", in );
|
msg.setTag( "in", in );
|
||||||
msg.setTag( "out", out );
|
msg.setTag( "out", out );
|
||||||
msg.setInteger( "turns", 8 );
|
msg.setInteger( "turns", 8 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||||
|
|
||||||
-- or --
|
-- or --
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound in = new NBTTagCompound();
|
NBTTagCompound in = new NBTTagCompound();
|
||||||
NBTTagCompound out = new NBTTagCompound();
|
NBTTagCompound out = new NBTTagCompound();
|
||||||
NBTTagCompound optional = new NBTTagCompound();
|
NBTTagCompound optional = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||||
msg.setTag( "in", in );
|
msg.setTag( "in", in );
|
||||||
msg.setTag( "out", out );
|
msg.setTag( "out", out );
|
||||||
msg.setTag( "optional", optional );
|
msg.setTag( "optional", optional );
|
||||||
msg.setFloat( "chance", 0.5 );
|
msg.setFloat( "chance", 0.5 );
|
||||||
msg.setInteger( "turns", 8 );
|
msg.setInteger( "turns", 8 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound item = new NBTTagCompound();
|
NBTTagCompound item = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||||
msg.setTag( "item", item );
|
msg.setTag( "item", item );
|
||||||
msg.setDouble( "weight", 32.0 );
|
msg.setDouble( "weight", 32.0 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", 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-bc-power", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-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-redstone", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", 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-item", new ItemStack( myBlockOrItem ) );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
package appeng.core.crash;
|
package appeng.core.crash;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
package appeng.core.crash;
|
package appeng.core.crash;
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +8,7 @@ import appeng.core.AEConfig;
|
||||||
public class ModCrashEnhancement extends BaseCrashEnhancement
|
public class ModCrashEnhancement extends BaseCrashEnhancement
|
||||||
{
|
{
|
||||||
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
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.minorVersion + '.' // minorVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
||||||
|
|
|
@ -69,7 +69,7 @@ public final class AECableBusFeatureHandler implements IFeatureHandler
|
||||||
* Registration of the {@link TileEntity} will actually be handled by {@link BlockCableBus#setupTile()}.
|
* Registration of the {@link TileEntity} will actually be handled by {@link BlockCableBus#setupTile()}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void register( final Side side)
|
public void register( final Side side )
|
||||||
{
|
{
|
||||||
if( this.enabled )
|
if( this.enabled )
|
||||||
{
|
{
|
||||||
|
@ -88,13 +88,13 @@ public final class AECableBusFeatureHandler implements IFeatureHandler
|
||||||
// Bypass the forge magic with null to register our own itemblock later.
|
// Bypass the forge magic with null to register our own itemblock later.
|
||||||
GameRegistry.registerBlock( this.featured, null, registryName );
|
GameRegistry.registerBlock( this.featured, null, registryName );
|
||||||
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
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 ( side == Side.CLIENT)
|
// register the block/item conversion...
|
||||||
CommonHelper.proxy.configureIcon( this.featured, name );
|
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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ public final class AETileBlockFeatureHandler implements IFeatureHandler
|
||||||
GameRegistry.registerBlock( this.featured, null, registryName );
|
GameRegistry.registerBlock( this.featured, null, registryName );
|
||||||
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
||||||
AEBaseTile.registerTileItem( this.featured.getTileEntityClass(), new BlockStackSrc( this.featured, 0, ActivityState.from( this.isFeatureAvailable() ) ) );
|
AEBaseTile.registerTileItem( this.featured.getTileEntityClass(), new BlockStackSrc( this.featured, 0, ActivityState.from( this.isFeatureAvailable() ) ) );
|
||||||
|
|
||||||
// register the block/item conversion...
|
// register the block/item conversion...
|
||||||
if( this.definition.maybeItem().isPresent() )
|
if( this.definition.maybeItem().isPresent() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,11 +51,11 @@ public class FeatureNameExtractor
|
||||||
{
|
{
|
||||||
name = PATTERN_ITEM_MULTI_MATERIAL.matcher( name ).replaceAll( "ItemMaterial" );
|
name = PATTERN_ITEM_MULTI_MATERIAL.matcher( name ).replaceAll( "ItemMaterial" );
|
||||||
}
|
}
|
||||||
else if ( name.startsWith( "BlockStairCommon" ) )
|
else if( name.startsWith( "BlockStairCommon" ) )
|
||||||
{
|
{
|
||||||
name = "stair";
|
name = "stair";
|
||||||
}
|
}
|
||||||
else if ( name.startsWith( "BlockFluix" ) )
|
else if( name.startsWith( "BlockFluix" ) )
|
||||||
{
|
{
|
||||||
name = "fluix";
|
name = "fluix";
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,5 +29,5 @@ public interface IFeatureHandler
|
||||||
|
|
||||||
IItemDefinition getDefinition();
|
IItemDefinition getDefinition();
|
||||||
|
|
||||||
void register(Side side );
|
void register( Side side );
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
|
||||||
String name = this.extractor.get();
|
String name = this.extractor.get();
|
||||||
final String itemPhysicalName = name;
|
final String itemPhysicalName = name;
|
||||||
|
|
||||||
//this.item.setTextureName( "appliedenergistics2:" + name );
|
// this.item.setTextureName( "appliedenergistics2:" + name );
|
||||||
this.item.setUnlocalizedName( "appliedenergistics2." + name );
|
this.item.setUnlocalizedName( "appliedenergistics2." + name );
|
||||||
|
|
||||||
if( this.item instanceof ItemFacade )
|
if( this.item instanceof ItemFacade )
|
||||||
|
@ -92,7 +92,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
|
||||||
name = "ItemMultiPart";
|
name = "ItemMultiPart";
|
||||||
}
|
}
|
||||||
|
|
||||||
// "item." +
|
// "item." +
|
||||||
GameRegistry.registerItem( this.item, name );
|
GameRegistry.registerItem( this.item, name );
|
||||||
|
|
||||||
if( side == Side.CLIENT )
|
if( side == Side.CLIENT )
|
||||||
|
|
|
@ -164,8 +164,8 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ItemStack myItemStack = new ItemStack( item, 1, meta );
|
final ItemStack myItemStack = new ItemStack( item, 1, meta );
|
||||||
return myItemStack;
|
return myItemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
package appeng.core.features.registries.entries;
|
package appeng.core.features.registries.entries;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
package appeng.core.features.registries.entries;
|
package appeng.core.features.registries.entries;
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,7 +94,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if( !(o instanceof IInscriberRecipe) )
|
if( !( o instanceof IInscriberRecipe ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +113,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( !this.maybeBot.equals( that.getBottomOptional()) )
|
if( !this.maybeBot.equals( that.getBottomOptional() ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public enum PlayerMessages
|
||||||
isNowLocked, isNowUnlocked,
|
isNowLocked, isNowUnlocked,
|
||||||
AmmoDepleted,
|
AmmoDepleted,
|
||||||
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
||||||
SettingCleared,;
|
SettingCleared, ;
|
||||||
|
|
||||||
public IChatComponent get()
|
public IChatComponent get()
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,14 +33,17 @@ public class PlayerDifferentiator
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Can determine if an {@link net.minecraft.entity.player.EntityPlayer} is not a real player.
|
* 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
|
* - null
|
||||||
* - dead
|
* - dead
|
||||||
* - fake
|
* - fake
|
||||||
*
|
*
|
||||||
* @param player to be checked player
|
* @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 )
|
boolean isNoPlayer( final EntityPlayer player )
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,20 +36,25 @@ import appeng.core.features.AEFeature;
|
||||||
public class PlayerStatsRegistration
|
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;
|
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;
|
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 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 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 )
|
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()
|
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()
|
public void registerAchievements()
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,7 +56,6 @@ public class AppEngPacketHandlerBase
|
||||||
{
|
{
|
||||||
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
||||||
|
|
||||||
|
|
||||||
public enum PacketTypes
|
public enum PacketTypes
|
||||||
{
|
{
|
||||||
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
||||||
|
|
|
@ -268,7 +268,7 @@ public enum GuiBridge implements IGuiHandler
|
||||||
}
|
}
|
||||||
if( ID.type.isTile() )
|
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 )
|
if( TE instanceof IPartHost )
|
||||||
{
|
{
|
||||||
( (IPartHost) TE ).getPart( side );
|
( (IPartHost) TE ).getPart( side );
|
||||||
|
@ -295,7 +295,7 @@ public enum GuiBridge implements IGuiHandler
|
||||||
{
|
{
|
||||||
if( it.getItem() instanceof IGuiItem )
|
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 );
|
final IWirelessTermHandler wh = AEApi.instance().registries().wireless().getWirelessTerminalHandler( it );
|
||||||
|
@ -450,7 +450,7 @@ public enum GuiBridge implements IGuiHandler
|
||||||
}
|
}
|
||||||
if( ID.type.isTile() )
|
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 )
|
if( TE instanceof IPartHost )
|
||||||
{
|
{
|
||||||
( (IPartHost) TE ).getPart( side );
|
( (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 )
|
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 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 ) )
|
if( Platform.hasPermissions( te != null ? new DimensionalCoord( te ) : new DimensionalCoord( player.worldObj, pos ), player ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
|
||||||
package appeng.core.sync;
|
package appeng.core.sync;
|
||||||
|
|
||||||
|
|
||||||
public abstract class PacketCallState
|
public abstract class PacketCallState
|
||||||
{
|
{
|
||||||
|
|
||||||
public abstract void call( AppEngPacket appEngPacket );
|
public abstract void call( AppEngPacket appEngPacket );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,17 +52,17 @@ public class AppEngClientPacketHandler extends AppEngPacketHandlerBase implement
|
||||||
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
|
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
|
||||||
|
|
||||||
final PacketCallState callState =
|
final PacketCallState callState =
|
||||||
new PacketCallState(){
|
new PacketCallState(){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void call(
|
public void call(
|
||||||
final AppEngPacket appEngPacket )
|
final AppEngPacket appEngPacket )
|
||||||
{
|
{
|
||||||
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
|
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
pack.setCallParam(callState);
|
pack.setCallParam( callState );
|
||||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, Minecraft.getMinecraft() );
|
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, Minecraft.getMinecraft() );
|
||||||
callState.call( pack );
|
callState.call( pack );
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,20 +46,20 @@ public final class AppEngServerPacketHandler extends AppEngPacketHandlerBase imp
|
||||||
{
|
{
|
||||||
final int packetType = stream.readInt();
|
final int packetType = stream.readInt();
|
||||||
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
|
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
|
||||||
|
|
||||||
final PacketCallState callState =
|
final PacketCallState callState =
|
||||||
new PacketCallState(){
|
new PacketCallState(){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void call(
|
public void call(
|
||||||
final AppEngPacket appEngPacket )
|
final AppEngPacket appEngPacket )
|
||||||
{
|
{
|
||||||
appEngPacket.serverPacketData( manager, appEngPacket, player);
|
appEngPacket.serverPacketData( manager, appEngPacket, player );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
pack.setCallParam(callState);
|
pack.setCallParam( callState );
|
||||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ((EntityPlayerMP)player).getServerForPlayer() );
|
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ( (EntityPlayerMP) player ).getServerForPlayer() );
|
||||||
callState.call( pack );
|
callState.call( pack );
|
||||||
}
|
}
|
||||||
catch( final InstantiationException e )
|
catch( final InstantiationException e )
|
||||||
|
|
|
@ -34,6 +34,7 @@ import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||||
import appeng.core.sync.AppEngPacket;
|
import appeng.core.sync.AppEngPacket;
|
||||||
import appeng.core.worlddata.WorldData;
|
import appeng.core.worlddata.WorldData;
|
||||||
|
|
||||||
|
|
||||||
public class NetworkHandler
|
public class NetworkHandler
|
||||||
{
|
{
|
||||||
public static NetworkHandler instance;
|
public static NetworkHandler instance;
|
||||||
|
@ -103,9 +104,9 @@ public class NetworkHandler
|
||||||
{
|
{
|
||||||
this.serveHandler.onPacketData( null, ev.handler, ev.packet, srv.playerEntity );
|
this.serveHandler.onPacketData( null, ev.handler, ev.packet, srv.playerEntity );
|
||||||
}
|
}
|
||||||
catch ( final ThreadQuickExitException ignored )
|
catch( final ThreadQuickExitException ignored )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,9 +120,9 @@ public class NetworkHandler
|
||||||
{
|
{
|
||||||
this.clientHandler.onPacketData( null, ev.handler, ev.packet, null );
|
this.clientHandler.onPacketData( null, ev.handler, ev.packet, null );
|
||||||
}
|
}
|
||||||
catch ( final ThreadQuickExitException ignored )
|
catch( final ThreadQuickExitException ignored )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue