Always use qualified access for fields and methods
This commit is contained in:
@@ -111,7 +111,7 @@ public abstract class AEBaseBlock extends Block
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox( IBlockState state, IBlockAccess source, BlockPos pos )
|
||||
{
|
||||
return boundingBox;
|
||||
return this.boundingBox;
|
||||
}
|
||||
|
||||
@SuppressWarnings( "deprecation" )
|
||||
@@ -421,8 +421,8 @@ public abstract class AEBaseBlock extends Block
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
String regName = getRegistryName() != null ? getRegistryName().getResourcePath() : "unregistered";
|
||||
return getClass().getSimpleName() + "[" + regName + "]";
|
||||
String regName = this.getRegistryName() != null ? this.getRegistryName().getResourcePath() : "unregistered";
|
||||
return this.getClass().getSimpleName() + "[" + regName + "]";
|
||||
}
|
||||
|
||||
protected String getUnlocalizedName( final ItemStack is )
|
||||
|
||||
@@ -43,8 +43,8 @@ public abstract class AEBaseStairBlock extends BlockStairs
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
String regName = getRegistryName() != null ? getRegistryName().getResourcePath() : "unregistered";
|
||||
return getClass().getSimpleName() + "[" + regName + "]";
|
||||
String regName = this.getRegistryName() != null ? this.getRegistryName().getResourcePath() : "unregistered";
|
||||
return this.getClass().getSimpleName() + "[" + regName + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
|
||||
return state;
|
||||
}
|
||||
|
||||
AEBaseTile tile = getTileEntity( world, pos );
|
||||
AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
if( tile == null )
|
||||
{
|
||||
return state; // No info available
|
||||
@@ -99,7 +99,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, getAEStates(), new IUnlistedProperty[] {
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] {
|
||||
FORWARD,
|
||||
UP
|
||||
} );
|
||||
@@ -121,7 +121,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
|
||||
@Override
|
||||
public boolean hasTileEntity( IBlockState state )
|
||||
{
|
||||
return hasBlockTileEntity();
|
||||
return this.hasBlockTileEntity();
|
||||
}
|
||||
|
||||
private boolean hasBlockTileEntity()
|
||||
|
||||
@@ -36,7 +36,7 @@ public class UnlistedDirection implements IUnlistedProperty<EnumFacing>
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, getAEStates(), new IUnlistedProperty[] {
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] {
|
||||
STATE,
|
||||
COLOR,
|
||||
FORWARD,
|
||||
@@ -66,7 +66,7 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
|
||||
EnumFacing forward = EnumFacing.NORTH;
|
||||
EnumFacing up = EnumFacing.UP;
|
||||
|
||||
TileCraftingMonitorTile te = getTileEntity( world, pos );
|
||||
TileCraftingMonitorTile te = this.getTileEntity( world, pos );
|
||||
if( te != null )
|
||||
{
|
||||
color = te.getColor();
|
||||
|
||||
@@ -76,7 +76,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
{
|
||||
if( isConnected( world, pos, facing ) )
|
||||
if( this.isConnected( world, pos, facing ) )
|
||||
{
|
||||
connections.add( facing );
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, getAEStates(), new IUnlistedProperty[] { STATE } );
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] { STATE } );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -63,7 +63,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
||||
public IBlockState getActualState( IBlockState state, IBlockAccess worldIn, BlockPos pos )
|
||||
{
|
||||
boolean powered = false;
|
||||
TileMolecularAssembler te = getTileEntity( worldIn, pos );
|
||||
TileMolecularAssembler te = this.getTileEntity( worldIn, pos );
|
||||
if( te != null )
|
||||
{
|
||||
powered = te.isPowered();
|
||||
|
||||
@@ -78,7 +78,7 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
private void dropCrank( final World world, final BlockPos pos )
|
||||
{
|
||||
world.destroyBlock( pos, true ); // w.destroyBlock( x, y, z, true );
|
||||
world.notifyBlockUpdate( pos, getDefaultState(), world.getBlockState( pos ), 3 );
|
||||
world.notifyBlockUpdate( pos, this.getDefaultState(), world.getBlockState( pos ), 3 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,7 +61,7 @@ public class BlockInterface extends AEBaseTileBlock
|
||||
public IBlockState getActualState( IBlockState state, IBlockAccess world, BlockPos pos )
|
||||
{
|
||||
// Determine whether the interface is omni-directional or not
|
||||
TileInterface te = getTileEntity( world, pos );
|
||||
TileInterface te = this.getTileEntity( world, pos );
|
||||
boolean omniDirectional = true; // The default
|
||||
if( te != null )
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
EnumFacing facing = EnumFacing.values()[meta];
|
||||
return getDefaultState().withProperty( FACING, facing );
|
||||
return this.getDefaultState().withProperty( FACING, facing );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -92,7 +92,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock,
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
EnumFacing facing = EnumFacing.values()[meta];
|
||||
return getDefaultState().withProperty( FACING, facing );
|
||||
return this.getDefaultState().withProperty( FACING, facing );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,13 +52,13 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOr
|
||||
{
|
||||
super( Material.ROCK );
|
||||
this.setSoundType( SoundType.METAL );
|
||||
this.setDefaultState( getDefaultState().withProperty( POWERED, false ) );
|
||||
this.setDefaultState( this.getDefaultState().withProperty( POWERED, false ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState( IBlockState state, IBlockAccess world, BlockPos pos )
|
||||
{
|
||||
TileQuartzGrowthAccelerator te = getTileEntity( world, pos );
|
||||
TileQuartzGrowthAccelerator te = this.getTileEntity( world, pos );
|
||||
boolean powered = te != null && te.isPowered();
|
||||
|
||||
return super.getActualState( state, world, pos )
|
||||
|
||||
@@ -50,7 +50,7 @@ public class BlockSecurityStation extends AEBaseTileBlock
|
||||
{
|
||||
super( Material.IRON );
|
||||
|
||||
this.setDefaultState( getDefaultState().withProperty( POWERED, false ) );
|
||||
this.setDefaultState( this.getDefaultState().withProperty( POWERED, false ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,7 +69,7 @@ public class BlockSecurityStation extends AEBaseTileBlock
|
||||
public IBlockState getActualState( IBlockState state, IBlockAccess world, BlockPos pos )
|
||||
{
|
||||
boolean powered = false;
|
||||
TileSecurityStation te = getTileEntity( world, pos );
|
||||
TileSecurityStation te = this.getTileEntity( world, pos );
|
||||
if( te != null )
|
||||
{
|
||||
powered = te.isActive();
|
||||
|
||||
@@ -58,7 +58,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, getAEStates(), new IUnlistedProperty[] { FORWARD, UP, ROTATION } );
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] { FORWARD, UP, ROTATION } );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -55,7 +55,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
{
|
||||
super( Material.IRON );
|
||||
this.setHardness( 4.2F );
|
||||
this.setDefaultState( getDefaultState().withProperty( ACTIVE, false ) );
|
||||
this.setDefaultState( this.getDefaultState().withProperty( ACTIVE, false ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -118,7 +118,7 @@ public class BlockCableBus extends AEBaseTileBlock
|
||||
@Override
|
||||
public IBlockState getExtendedState( IBlockState state, IBlockAccess world, BlockPos pos )
|
||||
{
|
||||
CableBusRenderState renderState = cb( world, pos ).getRenderState();
|
||||
CableBusRenderState renderState = this.cb( world, pos ).getRenderState();
|
||||
return ( (IExtendedBlockState) state ).withProperty( RENDER_STATE_PROPERTY, renderState );
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ public class BlockCableBus extends AEBaseTileBlock
|
||||
ICableBusContainer cb = this.cb( world, target.getBlockPos() );
|
||||
|
||||
// Our built-in model has the actual baked sprites we need
|
||||
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( getDefaultState() );
|
||||
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( this.getDefaultState() );
|
||||
|
||||
// We cannot add the effect if we don't have the model
|
||||
if( !( model instanceof CableBusBakedModel ) )
|
||||
@@ -290,7 +290,7 @@ public class BlockCableBus extends AEBaseTileBlock
|
||||
ICableBusContainer cb = this.cb( world, pos );
|
||||
|
||||
// Our built-in model has the actual baked sprites we need
|
||||
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( getDefaultState() );
|
||||
IBakedModel model = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( this.getDefaultState() );
|
||||
|
||||
// We cannot add the effect if we dont have the model
|
||||
if( !( model instanceof CableBusBakedModel ) )
|
||||
@@ -320,7 +320,7 @@ public class BlockCableBus extends AEBaseTileBlock
|
||||
double d1 = (double) pos.getY() + ( (double) k + 0.5D ) / 4.0D;
|
||||
double d2 = (double) pos.getZ() + ( (double) l + 0.5D ) / 4.0D;
|
||||
ParticleDigging particle = new DestroyFX( world, d0, d1, d2, d0 - (double) pos.getX() - 0.5D, d1 - (double) pos
|
||||
.getY() - 0.5D, d2 - (double) pos.getZ() - 0.5D, getDefaultState() ).setBlockPos( pos );
|
||||
.getY() - 0.5D, d2 - (double) pos.getZ() - 0.5D, this.getDefaultState() ).setBlockPos( pos );
|
||||
particle.setParticleTexture( texture );
|
||||
effectRenderer.addEffect( particle );
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class BlockController extends AEBaseTileBlock
|
||||
{
|
||||
super( Material.IRON );
|
||||
this.setHardness( 6 );
|
||||
this.setDefaultState( getDefaultState()
|
||||
this.setDefaultState( this.getDefaultState()
|
||||
.withProperty( CONTROLLER_STATE, ControllerBlockState.offline )
|
||||
.withProperty( CONTROLLER_TYPE, ControllerRenderType.block ) );
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class BlockController extends AEBaseTileBlock
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new BlockStateContainer( this, getAEStates() );
|
||||
return new BlockStateContainer( this, this.getAEStates() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockEnergyCellRendering extends BlockRenderingCustomizer
|
||||
double fillFactor = getFillFactor( is );
|
||||
|
||||
int storageLevel = TileEnergyCell.getStorageLevelFromFillFactor( fillFactor );
|
||||
return new ModelResourceLocation( baseModel, "fullness=" + storageLevel );
|
||||
return new ModelResourceLocation( this.baseModel, "fullness=" + storageLevel );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return name().toLowerCase();
|
||||
return this.name().toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
this.setLightOpacity( 0 );
|
||||
this.setFullSize( false );
|
||||
this.setOpaque( false );
|
||||
this.setDefaultState( getDefaultState().withProperty( STATE, State.OFF ) );
|
||||
this.setDefaultState( this.getDefaultState().withProperty( STATE, State.OFF ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,7 +83,7 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
{
|
||||
State teState = State.OFF;
|
||||
|
||||
TileWireless te = getTileEntity( worldIn, pos );
|
||||
TileWireless te = this.getTileEntity( worldIn, pos );
|
||||
if( te != null )
|
||||
{
|
||||
if( te.isActive() )
|
||||
|
||||
@@ -45,7 +45,7 @@ public class CableBusRendering extends BlockRenderingCustomizer
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
|
||||
{
|
||||
rendering.builtInModel( "models/block/builtin/cable_bus", new CableBusModel( partModels ) );
|
||||
rendering.builtInModel( "models/block/builtin/cable_bus", new CableBusModel( this.partModels ) );
|
||||
rendering.blockColor( new CableBusColor() );
|
||||
rendering.modelCustomizer( ( loc, model ) -> model );
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
{
|
||||
IExtendedBlockState extState = (IExtendedBlockState) state;
|
||||
|
||||
TilePaint te = getTileEntity( world, pos );
|
||||
TilePaint te = this.getTileEntity( world, pos );
|
||||
|
||||
Collection<Splotch> splotches = Collections.emptyList();
|
||||
if( te != null )
|
||||
|
||||
@@ -66,7 +66,7 @@ class PaintBakedModel implements IBakedModel
|
||||
// This is the inventory model which should usually not be used other than in special cases
|
||||
List<BakedQuad> quads = new ArrayList<>( 1 );
|
||||
CubeBuilder builder = new CubeBuilder( this.vertexFormat, quads );
|
||||
builder.setTexture( textures[0] );
|
||||
builder.setTexture( this.textures[0] );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
return quads;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ class PaintBakedModel implements IBakedModel
|
||||
|
||||
List<Splotch> splotches = splotchesState.getSplotches();
|
||||
|
||||
CubeBuilder builder = new CubeBuilder( vertexFormat );
|
||||
CubeBuilder builder = new CubeBuilder( this.vertexFormat );
|
||||
|
||||
float offsetConstant = 0.001f;
|
||||
for( final Splotch s : splotches )
|
||||
@@ -109,7 +109,7 @@ class PaintBakedModel implements IBakedModel
|
||||
pos_x = Math.max( buffer, Math.min( 1.0f - buffer, pos_x ) );
|
||||
pos_y = Math.max( buffer, Math.min( 1.0f - buffer, pos_y ) );
|
||||
|
||||
TextureAtlasSprite ico = textures[s.getSeed() % textures.length];
|
||||
TextureAtlasSprite ico = this.textures[s.getSeed() % this.textures.length];
|
||||
builder.setTexture( ico );
|
||||
builder.setCustomUv( s.getSide().getOpposite(), 0, 0, 16, 16 );
|
||||
|
||||
@@ -176,7 +176,7 @@ class PaintBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return textures[0];
|
||||
return this.textures[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,7 @@ class PaintSplotches
|
||||
|
||||
List<Splotch> getSplotches()
|
||||
{
|
||||
return splotches;
|
||||
return this.splotches;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
||||
this.boundingBox = new AxisAlignedBB( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
|
||||
this.setLightOpacity( 0 );
|
||||
this.setFullSize( this.setOpaque( false ) );
|
||||
this.setDefaultState( getDefaultState().withProperty( FORMED, false ) );
|
||||
this.setDefaultState( this.getDefaultState().withProperty( FORMED, false ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,7 +65,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, getAEStates(), new IUnlistedProperty[] { FORMED_STATE } );
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] { FORMED_STATE } );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,7 +73,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
||||
{
|
||||
IExtendedBlockState extState = (IExtendedBlockState) state;
|
||||
|
||||
TileQuantumBridge bridge = getTileEntity( world, pos );
|
||||
TileQuantumBridge bridge = this.getTileEntity( world, pos );
|
||||
if( bridge != null )
|
||||
{
|
||||
QnbFormedState formedState = new QnbFormedState( bridge.getAdjacentQuantumBridges(), bridge.isCorner(), bridge.isPowered() );
|
||||
@@ -86,7 +86,7 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
||||
@Override
|
||||
public IBlockState getActualState( IBlockState state, IBlockAccess worldIn, BlockPos pos )
|
||||
{
|
||||
TileQuantumBridge bridge = getTileEntity( worldIn, pos );
|
||||
TileQuantumBridge bridge = this.getTileEntity( worldIn, pos );
|
||||
if( bridge != null )
|
||||
{
|
||||
state = state.withProperty( FORMED, bridge.isFormed() );
|
||||
|
||||
@@ -79,42 +79,42 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
// Get the correct base model
|
||||
if( !( state instanceof IExtendedBlockState ) )
|
||||
{
|
||||
return baseModel.getQuads( state, side, rand );
|
||||
return this.baseModel.getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
IExtendedBlockState extendedBlockState = (IExtendedBlockState) state;
|
||||
QnbFormedState formedState = extendedBlockState.getValue( BlockQuantumBase.FORMED_STATE );
|
||||
|
||||
return getQuads( formedState, state, side, rand );
|
||||
return this.getQuads( formedState, state, side, rand );
|
||||
}
|
||||
|
||||
private List<BakedQuad> getQuads( QnbFormedState formedState, IBlockState state, EnumFacing side, long rand )
|
||||
{
|
||||
CubeBuilder builder = new CubeBuilder( vertexFormat );
|
||||
CubeBuilder builder = new CubeBuilder( this.vertexFormat );
|
||||
|
||||
if( state.getBlock() == linkBlock )
|
||||
if( state.getBlock() == this.linkBlock )
|
||||
{
|
||||
Set<EnumFacing> sides = formedState.getAdjacentQuantumBridges();
|
||||
|
||||
this.renderCableAt( builder, 0.11f * 16, glassCableTexture, 0.141f * 16, sides );
|
||||
this.renderCableAt( builder, 0.11f * 16, this.glassCableTexture, 0.141f * 16, sides );
|
||||
|
||||
this.renderCableAt( builder, 0.188f * 16, coveredCableTexture, 0.1875f * 16, sides );
|
||||
this.renderCableAt( builder, 0.188f * 16, this.coveredCableTexture, 0.1875f * 16, sides );
|
||||
|
||||
builder.setTexture( linkTexture );
|
||||
builder.setTexture( this.linkTexture );
|
||||
builder.addCube( DEFAULT_RENDER_MIN, DEFAULT_RENDER_MIN, DEFAULT_RENDER_MIN, DEFAULT_RENDER_MAX, DEFAULT_RENDER_MAX, DEFAULT_RENDER_MAX );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( formedState.isCorner() )
|
||||
{
|
||||
this.renderCableAt( builder, 0.188f * 16, coveredCableTexture, 0.05f * 16, formedState.getAdjacentQuantumBridges() );
|
||||
this.renderCableAt( builder, 0.188f * 16, this.coveredCableTexture, 0.05f * 16, formedState.getAdjacentQuantumBridges() );
|
||||
|
||||
builder.setTexture( ringTexture );
|
||||
builder.setTexture( this.ringTexture );
|
||||
builder.addCube( DEFAULT_RENDER_MIN, DEFAULT_RENDER_MIN, DEFAULT_RENDER_MIN, DEFAULT_RENDER_MAX, DEFAULT_RENDER_MAX, DEFAULT_RENDER_MAX );
|
||||
|
||||
if( formedState.isPowered() )
|
||||
{
|
||||
builder.setTexture( lightCornerTexture );
|
||||
builder.setTexture( this.lightCornerTexture );
|
||||
builder.setRenderFullBright( true );
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
{
|
||||
@@ -133,7 +133,7 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.setTexture( ringTexture );
|
||||
builder.setTexture( this.ringTexture );
|
||||
|
||||
builder.addCube( 0, DEFAULT_RENDER_MIN, DEFAULT_RENDER_MIN, 16, DEFAULT_RENDER_MAX, DEFAULT_RENDER_MAX );
|
||||
|
||||
@@ -143,7 +143,7 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
|
||||
if( formedState.isPowered() )
|
||||
{
|
||||
builder.setTexture( lightTexture );
|
||||
builder.setTexture( this.lightTexture );
|
||||
builder.setRenderFullBright( true );
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
{
|
||||
@@ -203,7 +203,7 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
return this.baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -221,19 +221,19 @@ class QnbFormedBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return baseModel.getParticleTexture();
|
||||
return this.baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return baseModel.getItemCameraTransforms();
|
||||
return this.baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return baseModel.getOverrides();
|
||||
return this.baseModel.getOverrides();
|
||||
}
|
||||
|
||||
public static List<ResourceLocation> getRequiredTextures()
|
||||
|
||||
@@ -39,7 +39,7 @@ public class QnbFormedModel implements IModel
|
||||
@Override
|
||||
public IBakedModel bake( IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
IBakedModel ringModel = getBaseModel( MODEL_RING, state, format, bakedTextureGetter );
|
||||
IBakedModel ringModel = this.getBaseModel( MODEL_RING, state, format, bakedTextureGetter );
|
||||
return new QnbFormedBakedModel( format, ringModel, bakedTextureGetter );
|
||||
}
|
||||
|
||||
|
||||
@@ -25,17 +25,17 @@ public class QnbFormedState
|
||||
|
||||
public Set<EnumFacing> getAdjacentQuantumBridges()
|
||||
{
|
||||
return adjacentQuantumBridges;
|
||||
return this.adjacentQuantumBridges;
|
||||
}
|
||||
|
||||
public boolean isCorner()
|
||||
{
|
||||
return corner;
|
||||
return this.corner;
|
||||
}
|
||||
|
||||
public boolean isPowered()
|
||||
{
|
||||
return powered;
|
||||
return this.powered;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class BlockSpatialPylon extends AEBaseTileBlock
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, getAEStates(), new IUnlistedProperty[] { STATE } );
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] { STATE } );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -57,7 +57,7 @@ public class BlockSpatialPylon extends AEBaseTileBlock
|
||||
{
|
||||
IExtendedBlockState extState = (IExtendedBlockState) state;
|
||||
|
||||
return extState.withProperty( STATE, getDisplayState( world, pos ) );
|
||||
return extState.withProperty( STATE, this.getDisplayState( world, pos ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,7 +83,7 @@ public class BlockSpatialPylon extends AEBaseTileBlock
|
||||
|
||||
private int getDisplayState( IBlockAccess world, BlockPos pos )
|
||||
{
|
||||
TileSpatialPylon te = getTileEntity( world, pos );
|
||||
TileSpatialPylon te = this.getTileEntity( world, pos );
|
||||
|
||||
if( te == null )
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public class BlockChest extends AEBaseTileBlock
|
||||
public BlockChest()
|
||||
{
|
||||
super( Material.IRON );
|
||||
this.setDefaultState( getDefaultState().withProperty( SLOT_STATE, DriveSlotState.EMPTY ) );
|
||||
this.setDefaultState( this.getDefaultState().withProperty( SLOT_STATE, DriveSlotState.EMPTY ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,7 +72,7 @@ public class BlockChest extends AEBaseTileBlock
|
||||
{
|
||||
DriveSlotState slotState = DriveSlotState.EMPTY;
|
||||
|
||||
TileChest te = getTileEntity( worldIn, pos );
|
||||
TileChest te = this.getTileEntity( worldIn, pos );
|
||||
|
||||
if( te != null )
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ public class BlockDrive extends AEBaseTileBlock
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, getAEStates(), new IUnlistedProperty[] {
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] {
|
||||
SLOTS_STATE,
|
||||
FORWARD,
|
||||
UP
|
||||
@@ -73,7 +73,7 @@ public class BlockDrive extends AEBaseTileBlock
|
||||
@Override
|
||||
public IBlockState getExtendedState( IBlockState state, IBlockAccess world, BlockPos pos )
|
||||
{
|
||||
TileDrive te = getTileEntity( world, pos );
|
||||
TileDrive te = this.getTileEntity( world, pos );
|
||||
if( te == null )
|
||||
{
|
||||
return super.getExtendedState( state, world, pos );
|
||||
|
||||
@@ -88,7 +88,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity thePlayer, final boolean b )
|
||||
{
|
||||
final AxisAlignedBB aabb = computeAABB( w, pos );
|
||||
final AxisAlignedBB aabb = this.computeAABB( w, pos );
|
||||
|
||||
return Collections.singletonList( aabb );
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
final AxisAlignedBB aabb = computeAABB( w, pos );
|
||||
final AxisAlignedBB aabb = this.computeAABB( w, pos );
|
||||
|
||||
out.add( aabb );
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public enum DriveSlotState implements IStringSerializable
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public static DriveSlotState fromCellStatus( int cellStatus )
|
||||
|
||||
@@ -37,16 +37,16 @@ public class DriveSlotsState
|
||||
|
||||
public DriveSlotState getState( int index )
|
||||
{
|
||||
if( index >= slots.length )
|
||||
if( index >= this.slots.length )
|
||||
{
|
||||
return DriveSlotState.EMPTY;
|
||||
}
|
||||
return slots[index];
|
||||
return this.slots[index];
|
||||
}
|
||||
|
||||
public int getSlotCount()
|
||||
{
|
||||
return slots.length;
|
||||
return this.slots.length;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SkyChestRenderingCustomizer extends BlockRenderingCustomizer
|
||||
rendering.tesr( new SkyChestTESR() );
|
||||
|
||||
// Register a custom non-tesr item model
|
||||
String modelName = getModelFromType();
|
||||
String modelName = this.getModelFromType();
|
||||
ModelResourceLocation model = new ModelResourceLocation( "appliedenergistics2:" + modelName, "inventory" );
|
||||
itemRendering.model( model ).variants( model );
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class SkyChestRenderingCustomizer extends BlockRenderingCustomizer
|
||||
private String getModelFromType()
|
||||
{
|
||||
final String modelName;
|
||||
switch( type )
|
||||
switch( this.type )
|
||||
{
|
||||
default:
|
||||
case STONE:
|
||||
|
||||
@@ -97,36 +97,36 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
blockRendering = new BlockRendering();
|
||||
itemRendering = new ItemRendering();
|
||||
this.blockRendering = new BlockRendering();
|
||||
this.itemRendering = new ItemRendering();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockDefinitionBuilder preInit( BiConsumer<Block, Item> callback )
|
||||
{
|
||||
preInitCallbacks.add( callback );
|
||||
this.preInitCallbacks.add( callback );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockDefinitionBuilder init( BiConsumer<Block, Item> callback )
|
||||
{
|
||||
initCallbacks.add( callback );
|
||||
this.initCallbacks.add( callback );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockDefinitionBuilder modelRegInit( BiConsumer<Block, Item> callback )
|
||||
{
|
||||
modelRegCallbacks.add( callback );
|
||||
this.modelRegCallbacks.add( callback );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockDefinitionBuilder postInit( BiConsumer<Block, Item> callback )
|
||||
{
|
||||
postInitCallbacks.add( callback );
|
||||
this.postInitCallbacks.add( callback );
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
public IBlockBuilder features( AEFeature... features )
|
||||
{
|
||||
this.features.clear();
|
||||
addFeatures( features );
|
||||
this.addFeatures( features );
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
customizeForClient( callback );
|
||||
this.customizeForClient( callback );
|
||||
}
|
||||
|
||||
return this;
|
||||
@@ -166,13 +166,13 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
@Override
|
||||
public IBlockBuilder useCustomItemModel()
|
||||
{
|
||||
rendering( new BlockRenderingCustomizer()
|
||||
this.rendering( new BlockRenderingCustomizer()
|
||||
{
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
|
||||
{
|
||||
ModelResourceLocation model = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, registryName ), "inventory" );
|
||||
ModelResourceLocation model = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, BlockDefinitionBuilder.this.registryName ), "inventory" );
|
||||
itemRendering.model( model ).variants( model );
|
||||
}
|
||||
} );
|
||||
@@ -197,31 +197,31 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
@SideOnly( Side.CLIENT )
|
||||
private void customizeForClient( BlockRenderingCustomizer callback )
|
||||
{
|
||||
callback.customize( blockRendering, itemRendering );
|
||||
callback.customize( this.blockRendering, this.itemRendering );
|
||||
}
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
@Override
|
||||
public <T extends IBlockDefinition> T build()
|
||||
{
|
||||
if( !AEConfig.instance().areFeaturesEnabled( features ) )
|
||||
if( !AEConfig.instance().areFeaturesEnabled( this.features ) )
|
||||
{
|
||||
return (T) new TileDefinition( registryName, null, null );
|
||||
return (T) new TileDefinition( this.registryName, null, null );
|
||||
}
|
||||
|
||||
// Create block and matching item, and set factory name of both
|
||||
Block block = blockSupplier.get();
|
||||
block.setRegistryName( AppEng.MOD_ID, registryName );
|
||||
block.setUnlocalizedName( "appliedenergistics2." + registryName );
|
||||
Block block = this.blockSupplier.get();
|
||||
block.setRegistryName( AppEng.MOD_ID, this.registryName );
|
||||
block.setUnlocalizedName( "appliedenergistics2." + this.registryName );
|
||||
|
||||
ItemBlock item = constructItemFromBlock( block );
|
||||
ItemBlock item = this.constructItemFromBlock( block );
|
||||
if( item != null )
|
||||
{
|
||||
item.setRegistryName( AppEng.MOD_ID, registryName );
|
||||
item.setRegistryName( AppEng.MOD_ID, this.registryName );
|
||||
}
|
||||
|
||||
// Register the item and block with the game
|
||||
factory.addPreInit( side ->
|
||||
this.factory.addPreInit( side ->
|
||||
{
|
||||
Registration.addBlockToRegister( block );
|
||||
if( item != null )
|
||||
@@ -230,20 +230,20 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
}
|
||||
} );
|
||||
|
||||
block.setCreativeTab( creativeTab );
|
||||
block.setCreativeTab( this.creativeTab );
|
||||
|
||||
// Register all extra handlers
|
||||
preInitCallbacks.forEach( consumer -> factory.addPreInit( side -> consumer.accept( block, item ) ) );
|
||||
initCallbacks.forEach( consumer -> factory.addInit( side -> consumer.accept( block, item ) ) );
|
||||
modelRegCallbacks.forEach( consumer -> factory.addModelReg( side -> consumer.accept( block, item ) ) );
|
||||
postInitCallbacks.forEach( consumer -> factory.addPostInit( side -> consumer.accept( block, item ) ) );
|
||||
this.preInitCallbacks.forEach( consumer -> this.factory.addPreInit( side -> consumer.accept( block, item ) ) );
|
||||
this.initCallbacks.forEach( consumer -> this.factory.addInit( side -> consumer.accept( block, item ) ) );
|
||||
this.modelRegCallbacks.forEach( consumer -> this.factory.addModelReg( side -> consumer.accept( block, item ) ) );
|
||||
this.postInitCallbacks.forEach( consumer -> this.factory.addPostInit( side -> consumer.accept( block, item ) ) );
|
||||
|
||||
if( tileEntityDefinition != null && block instanceof AEBaseTileBlock )
|
||||
if( this.tileEntityDefinition != null && block instanceof AEBaseTileBlock )
|
||||
{
|
||||
( (AEBaseTileBlock) block ).setTileEntity( tileEntityDefinition.getTileEntityClass() );
|
||||
if( tileEntityDefinition.getName() == null )
|
||||
( (AEBaseTileBlock) block ).setTileEntity( this.tileEntityDefinition.getTileEntityClass() );
|
||||
if( this.tileEntityDefinition.getName() == null )
|
||||
{
|
||||
tileEntityDefinition.setName( registryName );
|
||||
this.tileEntityDefinition.setName( this.registryName );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -253,52 +253,52 @@ class BlockDefinitionBuilder implements IBlockBuilder
|
||||
if( block instanceof AEBaseTileBlock )
|
||||
{
|
||||
AEBaseTileBlock tileBlock = (AEBaseTileBlock) block;
|
||||
blockRendering.apply( factory, block, tileBlock.getTileEntityClass() );
|
||||
this.blockRendering.apply( this.factory, block, tileBlock.getTileEntityClass() );
|
||||
}
|
||||
else
|
||||
{
|
||||
blockRendering.apply( factory, block, null );
|
||||
this.blockRendering.apply( this.factory, block, null );
|
||||
}
|
||||
|
||||
if( item != null )
|
||||
{
|
||||
itemRendering.apply( factory, item );
|
||||
this.itemRendering.apply( this.factory, item );
|
||||
}
|
||||
}
|
||||
|
||||
if( block instanceof AEBaseTileBlock )
|
||||
{
|
||||
factory.addPreInit( side ->
|
||||
this.factory.addPreInit( side ->
|
||||
{
|
||||
AEBaseTile.registerTileItem(
|
||||
tileEntityDefinition == null ? ( (AEBaseTileBlock) block ).getTileEntityClass() : tileEntityDefinition.getTileEntityClass(),
|
||||
this.tileEntityDefinition == null ? ( (AEBaseTileBlock) block ).getTileEntityClass() : this.tileEntityDefinition.getTileEntityClass(),
|
||||
new BlockStackSrc( block, 0, ActivityState.Enabled ) );
|
||||
} );
|
||||
|
||||
if( tileEntityDefinition != null )
|
||||
if( this.tileEntityDefinition != null )
|
||||
{
|
||||
factory.tileEntityComponent.addTileEntity( tileEntityDefinition );
|
||||
this.factory.tileEntityComponent.addTileEntity( this.tileEntityDefinition );
|
||||
}
|
||||
|
||||
return (T) new TileDefinition( registryName, (AEBaseTileBlock) block, item );
|
||||
return (T) new TileDefinition( this.registryName, (AEBaseTileBlock) block, item );
|
||||
}
|
||||
else
|
||||
{
|
||||
return (T) new BlockDefinition( registryName, block, item );
|
||||
return (T) new BlockDefinition( this.registryName, block, item );
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private ItemBlock constructItemFromBlock( Block block )
|
||||
{
|
||||
if( disableItem )
|
||||
if( this.disableItem )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if( itemFactory != null )
|
||||
if( this.itemFactory != null )
|
||||
{
|
||||
return itemFactory.apply( block );
|
||||
return this.itemFactory.apply( block );
|
||||
}
|
||||
else if( block instanceof AEBaseBlock )
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ class BlockRendering implements IBlockRendering
|
||||
@SideOnly( Side.CLIENT )
|
||||
public IBlockRendering modelCustomizer( BiFunction<ModelResourceLocation, IBakedModel, IBakedModel> customizer )
|
||||
{
|
||||
modelCustomizer = customizer;
|
||||
this.modelCustomizer = customizer;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -99,18 +99,18 @@ class BlockRendering implements IBlockRendering
|
||||
|
||||
void apply( FeatureFactory factory, Block block, Class<?> tileEntityClass )
|
||||
{
|
||||
if( tesr != null )
|
||||
if( this.tesr != null )
|
||||
{
|
||||
if( tileEntityClass == null )
|
||||
{
|
||||
throw new IllegalStateException( "Tried to register a TESR for " + block + " even though no tile entity has been specified." );
|
||||
}
|
||||
factory.addBootstrapComponent( new TesrComponent( tileEntityClass, tesr ) );
|
||||
factory.addBootstrapComponent( new TesrComponent( tileEntityClass, this.tesr ) );
|
||||
}
|
||||
|
||||
if( modelCustomizer != null )
|
||||
if( this.modelCustomizer != null )
|
||||
{
|
||||
factory.modelOverrideComponent.addOverride( block.getRegistryName().getResourcePath(), modelCustomizer );
|
||||
factory.modelOverrideComponent.addOverride( block.getRegistryName().getResourcePath(), this.modelCustomizer );
|
||||
}
|
||||
else if( block instanceof AEBaseTileBlock )
|
||||
{
|
||||
@@ -120,16 +120,16 @@ class BlockRendering implements IBlockRendering
|
||||
}
|
||||
|
||||
// TODO : 1.12
|
||||
builtInModels.forEach( factory::addBuiltInModel );
|
||||
this.builtInModels.forEach( factory::addBuiltInModel );
|
||||
|
||||
if( blockColor != null )
|
||||
if( this.blockColor != null )
|
||||
{
|
||||
factory.addBootstrapComponent( new BlockColorComponent( block, blockColor ) );
|
||||
factory.addBootstrapComponent( new BlockColorComponent( block, this.blockColor ) );
|
||||
}
|
||||
|
||||
if( stateMapper != null )
|
||||
if( this.stateMapper != null )
|
||||
{
|
||||
factory.addBootstrapComponent( new StateMapperComponent( block, stateMapper ) );
|
||||
factory.addBootstrapComponent( new StateMapperComponent( block, this.stateMapper ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,15 +67,15 @@ public class FeatureFactory
|
||||
this.bootstrapComponents = new ArrayList<>();
|
||||
|
||||
this.tileEntityComponent = new TileEntityComponent();
|
||||
this.bootstrapComponents.add( tileEntityComponent );
|
||||
this.bootstrapComponents.add( this.tileEntityComponent );
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
modelOverrideComponent = new ModelOverrideComponent();
|
||||
bootstrapComponents.add( modelOverrideComponent );
|
||||
this.modelOverrideComponent = new ModelOverrideComponent();
|
||||
this.bootstrapComponents.add( this.modelOverrideComponent );
|
||||
|
||||
builtInModelComponent = new BuiltInModelComponent();
|
||||
bootstrapComponents.add( builtInModelComponent );
|
||||
this.builtInModelComponent = new BuiltInModelComponent();
|
||||
this.bootstrapComponents.add( this.builtInModelComponent );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,12 +93,12 @@ public class FeatureFactory
|
||||
|
||||
public IBlockBuilder block( String id, Supplier<Block> block )
|
||||
{
|
||||
return new BlockDefinitionBuilder( this, id, block ).features( defaultFeatures );
|
||||
return new BlockDefinitionBuilder( this, id, block ).features( this.defaultFeatures );
|
||||
}
|
||||
|
||||
public IItemBuilder item( String id, Supplier<Item> item )
|
||||
{
|
||||
return new ItemDefinitionBuilder( this, id, item ).features( defaultFeatures );
|
||||
return new ItemDefinitionBuilder( this, id, item ).features( this.defaultFeatures );
|
||||
}
|
||||
|
||||
public AEColoredItemDefinition colored( IItemDefinition target, int offset )
|
||||
@@ -151,11 +151,11 @@ public class FeatureFactory
|
||||
@SideOnly( Side.CLIENT )
|
||||
void addBuiltInModel( String path, IModel model )
|
||||
{
|
||||
builtInModelComponent.addModel( path, model );
|
||||
this.builtInModelComponent.addModel( path, model );
|
||||
}
|
||||
|
||||
public List<IBootstrapComponent> getBootstrapComponents()
|
||||
{
|
||||
return bootstrapComponents;
|
||||
return this.bootstrapComponents;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,28 +75,28 @@ class ItemDefinitionBuilder implements IItemBuilder
|
||||
this.itemSupplier = itemSupplier;
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
itemRendering = new ItemRendering();
|
||||
this.itemRendering = new ItemRendering();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemDefinitionBuilder preInit( Consumer<Item> callback )
|
||||
{
|
||||
preInitCallbacks.add( callback );
|
||||
this.preInitCallbacks.add( callback );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemDefinitionBuilder init( Consumer<Item> callback )
|
||||
{
|
||||
initCallbacks.add( callback );
|
||||
this.initCallbacks.add( callback );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemDefinitionBuilder postInit( Consumer<Item> callback )
|
||||
{
|
||||
postInitCallbacks.add( callback );
|
||||
this.postInitCallbacks.add( callback );
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class ItemDefinitionBuilder implements IItemBuilder
|
||||
public IItemBuilder features( AEFeature... features )
|
||||
{
|
||||
this.features.clear();
|
||||
addFeatures( features );
|
||||
this.addFeatures( features );
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ class ItemDefinitionBuilder implements IItemBuilder
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
customizeForClient( callback );
|
||||
this.customizeForClient( callback );
|
||||
}
|
||||
|
||||
return this;
|
||||
@@ -143,46 +143,46 @@ class ItemDefinitionBuilder implements IItemBuilder
|
||||
@SideOnly( Side.CLIENT )
|
||||
private void customizeForClient( ItemRenderingCustomizer callback )
|
||||
{
|
||||
callback.customize( itemRendering );
|
||||
callback.customize( this.itemRendering );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemDefinition build()
|
||||
{
|
||||
if( !AEConfig.instance().areFeaturesEnabled( features ) )
|
||||
if( !AEConfig.instance().areFeaturesEnabled( this.features ) )
|
||||
{
|
||||
return new ItemDefinition( registryName, null );
|
||||
return new ItemDefinition( this.registryName, null );
|
||||
}
|
||||
|
||||
Item item = itemSupplier.get();
|
||||
item.setRegistryName( AppEng.MOD_ID, registryName );
|
||||
Item item = this.itemSupplier.get();
|
||||
item.setRegistryName( AppEng.MOD_ID, this.registryName );
|
||||
|
||||
ItemDefinition definition = new ItemDefinition( registryName, item );
|
||||
ItemDefinition definition = new ItemDefinition( this.registryName, item );
|
||||
|
||||
item.setUnlocalizedName( "appliedenergistics2." + registryName );
|
||||
item.setCreativeTab( creativeTab );
|
||||
item.setUnlocalizedName( "appliedenergistics2." + this.registryName );
|
||||
item.setCreativeTab( this.creativeTab );
|
||||
|
||||
// Register all extra handlers
|
||||
preInitCallbacks.forEach( consumer -> factory.addPreInit( side -> consumer.accept( item ) ) );
|
||||
initCallbacks.forEach( consumer -> factory.addInit( side -> consumer.accept( item ) ) );
|
||||
modelRegCallbacks.forEach( consumer -> factory.addModelReg( side -> consumer.accept( item ) ) );
|
||||
postInitCallbacks.forEach( consumer -> factory.addPostInit( side -> consumer.accept( item ) ) );
|
||||
this.preInitCallbacks.forEach( consumer -> this.factory.addPreInit( side -> consumer.accept( item ) ) );
|
||||
this.initCallbacks.forEach( consumer -> this.factory.addInit( side -> consumer.accept( item ) ) );
|
||||
this.modelRegCallbacks.forEach( consumer -> this.factory.addModelReg( side -> consumer.accept( item ) ) );
|
||||
this.postInitCallbacks.forEach( consumer -> this.factory.addPostInit( side -> consumer.accept( item ) ) );
|
||||
|
||||
// Register custom dispenser behavior if requested
|
||||
if( dispenserBehaviorSupplier != null )
|
||||
if( this.dispenserBehaviorSupplier != null )
|
||||
{
|
||||
factory.addPostInit( side ->
|
||||
this.factory.addPostInit( side ->
|
||||
{
|
||||
IBehaviorDispenseItem behavior = dispenserBehaviorSupplier.get();
|
||||
IBehaviorDispenseItem behavior = this.dispenserBehaviorSupplier.get();
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( item, behavior );
|
||||
} );
|
||||
}
|
||||
|
||||
factory.addPreInit( side -> Registration.addItemToRegister( item ) );
|
||||
this.factory.addPreInit( side -> Registration.addItemToRegister( item ) );
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
itemRendering.apply( factory, item );
|
||||
this.itemRendering.apply( this.factory, item );
|
||||
}
|
||||
|
||||
return definition;
|
||||
|
||||
@@ -107,7 +107,7 @@ class ItemRendering implements IItemRendering
|
||||
{
|
||||
if( this.itemMeshDefinition != null )
|
||||
{
|
||||
factory.addBootstrapComponent( new ItemMeshDefinitionComponent( item, itemMeshDefinition ) );
|
||||
factory.addBootstrapComponent( new ItemMeshDefinitionComponent( item, this.itemMeshDefinition ) );
|
||||
}
|
||||
|
||||
if( !this.itemModels.isEmpty() )
|
||||
@@ -115,7 +115,7 @@ class ItemRendering implements IItemRendering
|
||||
factory.addBootstrapComponent( new ItemModelComponent( item, this.itemModels ) );
|
||||
}
|
||||
|
||||
Set<ResourceLocation> resources = new HashSet<>( variants );
|
||||
Set<ResourceLocation> resources = new HashSet<>( this.variants );
|
||||
|
||||
// Register a default item model if neither items by meta nor an item mesh definition exist
|
||||
if( this.itemMeshDefinition == null && this.itemModels.isEmpty() )
|
||||
@@ -141,13 +141,13 @@ class ItemRendering implements IItemRendering
|
||||
}
|
||||
|
||||
// TODO : 1.12
|
||||
builtInModels.forEach( factory::addBuiltInModel );
|
||||
this.builtInModels.forEach( factory::addBuiltInModel );
|
||||
|
||||
if( !resources.isEmpty() )
|
||||
{
|
||||
factory.addBootstrapComponent( new ItemVariantsComponent( item, resources ) );
|
||||
}
|
||||
else if( !this.itemModels.isEmpty() || itemMeshDefinition != null )
|
||||
else if( !this.itemModels.isEmpty() || this.itemMeshDefinition != null )
|
||||
{
|
||||
// Adding an empty variant list here will prevent Vanilla from trying to load the default item model in this
|
||||
// case
|
||||
@@ -159,9 +159,9 @@ class ItemRendering implements IItemRendering
|
||||
factory.addBootstrapComponent( new ItemVariantsComponent( item, Collections.emptyList() ) );
|
||||
}
|
||||
|
||||
if( itemColor != null )
|
||||
if( this.itemColor != null )
|
||||
{
|
||||
factory.addBootstrapComponent( new ItemColorComponent( item, itemColor ) );
|
||||
factory.addBootstrapComponent( new ItemColorComponent( item, this.itemColor ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class ItemRendering implements IItemRendering
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation( IBlockState state )
|
||||
{
|
||||
return new ModelResourceLocation( registryName, getPropertyString( state.getProperties() ) );
|
||||
return new ModelResourceLocation( this.registryName, this.getPropertyString( state.getProperties() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class BlockColorComponent implements InitComponent
|
||||
@Override
|
||||
public void initialize( Side side )
|
||||
{
|
||||
Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler( blockColor, block );
|
||||
Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler( this.blockColor, this.block );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,16 +42,16 @@ public class BuiltInModelComponent implements PreInitComponent
|
||||
|
||||
public void addModel( String path, IModel model )
|
||||
{
|
||||
Preconditions.checkState( !hasInitialized );
|
||||
builtInModels.put( path, model );
|
||||
Preconditions.checkState( !this.hasInitialized );
|
||||
this.builtInModels.put( path, model );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
hasInitialized = true;
|
||||
this.hasInitialized = true;
|
||||
|
||||
BuiltInModelLoader loader = new BuiltInModelLoader( builtInModels );
|
||||
BuiltInModelLoader loader = new BuiltInModelLoader( this.builtInModels );
|
||||
ModelLoaderRegistry.registerLoader( loader );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,6 @@ public class ItemColorComponent implements InitComponent
|
||||
@Override
|
||||
public void initialize( Side side )
|
||||
{
|
||||
Minecraft.getMinecraft().getItemColors().registerItemColorHandler( itemColor, item );
|
||||
Minecraft.getMinecraft().getItemColors().registerItemColorHandler( this.itemColor, this.item );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ public class ItemMeshDefinitionComponent implements InitComponent
|
||||
@Override
|
||||
public void initialize( Side side )
|
||||
{
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( item, meshDefinition );
|
||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( this.item, this.meshDefinition );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ public class ItemModelComponent implements InitComponent
|
||||
{
|
||||
ItemModelMesher itemMesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
|
||||
|
||||
modelsByMeta.forEach( ( meta, model ) ->
|
||||
this.modelsByMeta.forEach( ( meta, model ) ->
|
||||
{
|
||||
itemMesher.register( item, meta, model );
|
||||
itemMesher.register( this.item, meta, model );
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ItemVariantsComponent implements IBootstrapComponent
|
||||
@Override
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
ResourceLocation[] resourceArr = resources.toArray( new ResourceLocation[0] );
|
||||
ModelBakery.registerItemVariants( item, resourceArr );
|
||||
ResourceLocation[] resourceArr = this.resources.toArray( new ResourceLocation[0] );
|
||||
ModelBakery.registerItemVariants( this.item, resourceArr );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,11 +47,11 @@ public class StateMapperComponent implements ModelRegComponent
|
||||
@Override
|
||||
public void modelReg( Side side )
|
||||
{
|
||||
ModelLoader.setCustomStateMapper( block, stateMapper );
|
||||
if( stateMapper instanceof IResourceManagerReloadListener )
|
||||
ModelLoader.setCustomStateMapper( this.block, this.stateMapper );
|
||||
if( this.stateMapper instanceof IResourceManagerReloadListener )
|
||||
{
|
||||
( (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager() )
|
||||
.registerReloadListener( (IResourceManagerReloadListener) stateMapper );
|
||||
.registerReloadListener( (IResourceManagerReloadListener) this.stateMapper );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,6 @@ public class TesrComponent<T extends AEBaseTile> implements PreInitComponent
|
||||
// public void modelReg( Side side )
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
ClientRegistry.bindTileEntitySpecialRenderer( tileEntityClass, tesr );
|
||||
ClientRegistry.bindTileEntitySpecialRenderer( this.tileEntityClass, this.tesr );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,16 +25,16 @@ public class TileEntityComponent implements PreInitComponent
|
||||
|
||||
public void addTileEntity( TileEntityDefinition tileEntityDefinition )
|
||||
{
|
||||
if( !tileEntityDefinitions.contains( tileEntityDefinition ) )
|
||||
if( !this.tileEntityDefinitions.contains( tileEntityDefinition ) )
|
||||
{
|
||||
tileEntityDefinitions.add( tileEntityDefinition );
|
||||
this.tileEntityDefinitions.add( tileEntityDefinition );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInitialize( Side side )
|
||||
{
|
||||
for( TileEntityDefinition tileEntityDefinition : tileEntityDefinitions )
|
||||
for( TileEntityDefinition tileEntityDefinition : this.tileEntityDefinitions )
|
||||
{
|
||||
if( !tileEntityDefinition.isRegistered() )
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public class TileEntityDefinition
|
||||
|
||||
public Class<? extends AEBaseTile> getTileEntityClass()
|
||||
{
|
||||
return tileEntityClass;
|
||||
return this.tileEntityClass;
|
||||
}
|
||||
|
||||
public void setName( String name )
|
||||
@@ -57,16 +57,16 @@ public class TileEntityDefinition
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public boolean isRegistered()
|
||||
{
|
||||
return isRegistered;
|
||||
return this.isRegistered;
|
||||
}
|
||||
|
||||
public void setRegistered( boolean registered )
|
||||
{
|
||||
isRegistered = registered;
|
||||
this.isRegistered = registered;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class UnlistedProperty<T> implements IUnlistedProperty<T>
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,7 +55,7 @@ public class UnlistedProperty<T> implements IUnlistedProperty<T>
|
||||
@Override
|
||||
public Class<T> getType()
|
||||
{
|
||||
return clazz;
|
||||
return this.clazz;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -215,7 +215,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
lines.set( i, TextFormatting.GRAY + lines.get( i ) );
|
||||
}
|
||||
|
||||
this.drawHoveringText( lines, x, y, fontRenderer );
|
||||
this.drawHoveringText( lines, x, y, this.fontRenderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -715,7 +715,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
// Annoying but easier than trying to splice into render item
|
||||
super.drawSlot( new Size1Slot( s ) );
|
||||
|
||||
stackSizeRenderer.renderStackSize( fontRenderer, ( (SlotME) s ).getAEStack(), s.getStack(), s.xPos, s.yPos );
|
||||
this.stackSizeRenderer.renderStackSize( this.fontRenderer, ( (SlotME) s ).getAEStack(), s.getStack(), s.xPos, s.yPos );
|
||||
|
||||
}
|
||||
catch( final Exception err )
|
||||
|
||||
@@ -34,7 +34,7 @@ class Size1Slot extends Slot
|
||||
@Nonnull
|
||||
public ItemStack getStack()
|
||||
{
|
||||
ItemStack orgStack = delegate.getStack();
|
||||
ItemStack orgStack = this.delegate.getStack();
|
||||
if( !orgStack.isEmpty() )
|
||||
{
|
||||
ItemStack modifiedStack = orgStack.copy();
|
||||
@@ -48,25 +48,25 @@ class Size1Slot extends Slot
|
||||
@Override
|
||||
public boolean getHasStack()
|
||||
{
|
||||
return delegate.getHasStack();
|
||||
return this.delegate.getHasStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHere( IInventory inv, int slotIn )
|
||||
{
|
||||
return delegate.isHere( inv, slotIn );
|
||||
return this.delegate.isHere( inv, slotIn );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotStackLimit()
|
||||
{
|
||||
return delegate.getSlotStackLimit();
|
||||
return this.delegate.getSlotStackLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemStackLimit( ItemStack stack )
|
||||
{
|
||||
return delegate.getItemStackLimit( stack );
|
||||
return this.delegate.getItemStackLimit( stack );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,45 +74,45 @@ class Size1Slot extends Slot
|
||||
@SideOnly( Side.CLIENT )
|
||||
public String getSlotTexture()
|
||||
{
|
||||
return delegate.getSlotTexture();
|
||||
return this.delegate.getSlotTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( EntityPlayer playerIn )
|
||||
{
|
||||
return delegate.canTakeStack( playerIn );
|
||||
return this.delegate.canTakeStack( playerIn );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return delegate.isEnabled();
|
||||
return this.delegate.isEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public ResourceLocation getBackgroundLocation()
|
||||
{
|
||||
return delegate.getBackgroundLocation();
|
||||
return this.delegate.getBackgroundLocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public TextureAtlasSprite getBackgroundSprite()
|
||||
{
|
||||
return delegate.getBackgroundSprite();
|
||||
return this.delegate.getBackgroundSprite();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotIndex()
|
||||
{
|
||||
return delegate.getSlotIndex();
|
||||
return this.delegate.getSlotIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSameInventory( Slot other )
|
||||
{
|
||||
return delegate.isSameInventory( other );
|
||||
return this.delegate.isSameInventory( other );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,28 +70,28 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
|
||||
if( target instanceof WirelessTerminalGuiObject )
|
||||
{
|
||||
myIcon = definitions.items().wirelessTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
this.myIcon = definitions.items().wirelessTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
|
||||
this.originalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
}
|
||||
|
||||
if( target instanceof PartTerminal )
|
||||
{
|
||||
myIcon = parts.terminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
this.myIcon = parts.terminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
|
||||
this.originalGui = GuiBridge.GUI_ME;
|
||||
}
|
||||
|
||||
if( target instanceof PartCraftingTerminal )
|
||||
{
|
||||
myIcon = parts.craftingTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
this.myIcon = parts.craftingTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
|
||||
this.originalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
}
|
||||
|
||||
if( target instanceof PartPatternTerminal )
|
||||
{
|
||||
myIcon = parts.patternTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
this.myIcon = parts.patternTerminal().maybeStack( 1 ).orElse( ItemStack.EMPTY );
|
||||
|
||||
this.originalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
}
|
||||
|
||||
@@ -67,13 +67,13 @@ public class FacadeDispatcherBakedModel implements IBakedModel
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
return this.baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return baseModel.isGui3d();
|
||||
return this.baseModel.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,13 +85,13 @@ public class FacadeDispatcherBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return baseModel.getParticleTexture();
|
||||
return this.baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return baseModel.getItemCameraTransforms();
|
||||
return this.baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,7 +112,7 @@ public class FacadeDispatcherBakedModel implements IBakedModel
|
||||
IBlockState state = itemFacade.getTextureBlockState( stack );
|
||||
ItemStack textureItem = itemFacade.getTextureItem( stack );
|
||||
|
||||
return new FacadeWithBlockBakedModel( baseModel, state, textureItem, format );
|
||||
return new FacadeWithBlockBakedModel( FacadeDispatcherBakedModel.this.baseModel, state, textureItem, FacadeDispatcherBakedModel.this.format );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -73,13 +73,13 @@ public class FacadeWithBlockBakedModel implements IBakedModel
|
||||
if( side == EnumFacing.NORTH )
|
||||
{
|
||||
List<BakedQuad> quads = new ArrayList<>( 1 );
|
||||
CubeBuilder builder = new CubeBuilder( format, quads );
|
||||
FacadeBuilder.TextureAtlasAndTint sprite = FacadeBuilder.getSprite( textureModel, blockState, side, rand );
|
||||
CubeBuilder builder = new CubeBuilder( this.format, quads );
|
||||
FacadeBuilder.TextureAtlasAndTint sprite = FacadeBuilder.getSprite( this.textureModel, this.blockState, side, rand );
|
||||
if( sprite != null && sprite.getSprite() != null )
|
||||
{
|
||||
if( sprite.getTint() != -1 )
|
||||
{
|
||||
builder.setColor( Minecraft.getMinecraft().getItemColors().getColorFromItemstack( textureItem, sprite.getTint() ) );
|
||||
builder.setColor( Minecraft.getMinecraft().getItemColors().getColorFromItemstack( this.textureItem, sprite.getTint() ) );
|
||||
}
|
||||
builder.setTexture( sprite.getSprite() );
|
||||
builder.setDrawFaces( EnumSet.of( EnumFacing.NORTH ) );
|
||||
@@ -88,13 +88,13 @@ public class FacadeWithBlockBakedModel implements IBakedModel
|
||||
}
|
||||
}
|
||||
|
||||
return baseModel.getQuads( state, side, rand );
|
||||
return this.baseModel.getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
return this.baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,13 +112,13 @@ public class FacadeWithBlockBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return baseModel.getParticleTexture();
|
||||
return this.baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return baseModel.getItemCameraTransforms();
|
||||
return this.baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -87,7 +87,7 @@ public enum FacingToRotation
|
||||
|
||||
public Vector3f getRot()
|
||||
{
|
||||
return rot;
|
||||
return this.rot;
|
||||
}
|
||||
|
||||
public Matrix4f getMat()
|
||||
@@ -97,21 +97,21 @@ public enum FacingToRotation
|
||||
|
||||
public void glRotateCurrentMat()
|
||||
{
|
||||
GlStateManager.rotate( rot.x, 1, 0, 0 );
|
||||
GlStateManager.rotate( rot.y, 0, 1, 0 );
|
||||
GlStateManager.rotate( rot.z, 0, 0, 1 );
|
||||
GlStateManager.rotate( this.rot.x, 1, 0, 0 );
|
||||
GlStateManager.rotate( this.rot.y, 0, 1, 0 );
|
||||
GlStateManager.rotate( this.rot.z, 0, 0, 1 );
|
||||
}
|
||||
|
||||
public EnumFacing rotate( EnumFacing facing )
|
||||
{
|
||||
return TRSRTransformation.rotate( mat, facing );
|
||||
return TRSRTransformation.rotate( this.mat, facing );
|
||||
}
|
||||
|
||||
public EnumFacing resultingRotate( EnumFacing facing )
|
||||
{
|
||||
for( EnumFacing face : EnumFacing.values() )
|
||||
{
|
||||
if( rotate( face ) == facing )
|
||||
if( this.rotate( face ) == facing )
|
||||
{
|
||||
return face;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class StaticBlockColor implements IBlockColor
|
||||
@Override
|
||||
public int colorMultiplier( IBlockState state, @Nullable IBlockAccess worldIn, @Nullable BlockPos pos, int tintIndex )
|
||||
{
|
||||
return color.getVariantByTintIndex( tintIndex );
|
||||
return this.color.getVariantByTintIndex( tintIndex );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class StaticItemColor implements IItemColor
|
||||
@Override
|
||||
public int getColorFromItemstack( ItemStack stack, int tintIndex )
|
||||
{
|
||||
return color.getVariantByTintIndex( tintIndex );
|
||||
return this.color.getVariantByTintIndex( tintIndex );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class CableBuilder
|
||||
colorTextures.put( color, bakedTextureGetter.apply( type.getTexture( color ) ) );
|
||||
}
|
||||
|
||||
coreTextures.put( type, colorTextures );
|
||||
this.coreTextures.put( type, colorTextures );
|
||||
}
|
||||
|
||||
this.connectionTextures = new EnumMap<>( AECableType.class );
|
||||
@@ -81,10 +81,10 @@ class CableBuilder
|
||||
colorTextures.put( color, bakedTextureGetter.apply( getConnectionTexture( type, color ) ) );
|
||||
}
|
||||
|
||||
connectionTextures.put( type, colorTextures );
|
||||
this.connectionTextures.put( type, colorTextures );
|
||||
}
|
||||
|
||||
smartCableTextures = new SmartCableTextures( bakedTextureGetter );
|
||||
this.smartCableTextures = new SmartCableTextures( bakedTextureGetter );
|
||||
}
|
||||
|
||||
static ResourceLocation getConnectionTexture( AECableType cableType, AEColor color )
|
||||
@@ -121,14 +121,14 @@ class CableBuilder
|
||||
switch( cableType )
|
||||
{
|
||||
case GLASS:
|
||||
addCableCore( CableCoreType.GLASS, color, quadsOut );
|
||||
this.addCableCore( CableCoreType.GLASS, color, quadsOut );
|
||||
break;
|
||||
case COVERED:
|
||||
case SMART:
|
||||
addCableCore( CableCoreType.COVERED, color, quadsOut );
|
||||
this.addCableCore( CableCoreType.COVERED, color, quadsOut );
|
||||
break;
|
||||
case DENSE_SMART:
|
||||
addCableCore( CableCoreType.DENSE_SMART, color, quadsOut );
|
||||
this.addCableCore( CableCoreType.DENSE_SMART, color, quadsOut );
|
||||
break;
|
||||
default:
|
||||
}
|
||||
@@ -136,9 +136,9 @@ class CableBuilder
|
||||
|
||||
public void addCableCore( CableCoreType coreType, AEColor color, List<BakedQuad> quadsOut )
|
||||
{
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
TextureAtlasSprite texture = coreTextures.get( coreType ).get( color );
|
||||
TextureAtlasSprite texture = this.coreTextures.get( coreType ).get( color );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
switch( coreType )
|
||||
@@ -157,7 +157,7 @@ class CableBuilder
|
||||
|
||||
public void addGlassConnection( EnumFacing facing, AEColor cableColor, AECableType connectionType, boolean cableBusAdjacent, List<BakedQuad> quadsOut )
|
||||
{
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
// We render all faces except the one on the connection side
|
||||
cubeBuilder.setDrawFaces( EnumSet.complementOf( EnumSet.of( facing ) ) );
|
||||
@@ -165,13 +165,13 @@ class CableBuilder
|
||||
// For to-machine connections, use a thicker end-cap for the connection
|
||||
if( connectionType != AECableType.GLASS && !cableBusAdjacent )
|
||||
{
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
this.addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
}
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.GLASS ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.GLASS ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
switch( facing )
|
||||
@@ -199,13 +199,13 @@ class CableBuilder
|
||||
|
||||
public void addStraightGlassConnection( EnumFacing facing, AEColor cableColor, List<BakedQuad> quadsOut )
|
||||
{
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
// We render all faces except the connection caps. We can do this because the glass cable is the smallest one
|
||||
// and its ends will always be covered by something
|
||||
cubeBuilder.setDrawFaces( EnumSet.complementOf( EnumSet.of( facing, facing.getOpposite() ) ) );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.GLASS ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.GLASS ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
switch( facing )
|
||||
@@ -234,9 +234,9 @@ class CableBuilder
|
||||
return;
|
||||
}
|
||||
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.GLASS ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.GLASS ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
switch( facing )
|
||||
@@ -265,18 +265,18 @@ class CableBuilder
|
||||
public void addCoveredConnection( EnumFacing facing, AEColor cableColor, AECableType connectionType, boolean cableBusAdjacent, List<BakedQuad> quadsOut )
|
||||
{
|
||||
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
// We render all faces except the one on the connection side
|
||||
cubeBuilder.setDrawFaces( EnumSet.complementOf( EnumSet.of( facing ) ) );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
// Draw a covered connection, if anything but glass is requested
|
||||
if( connectionType != AECableType.GLASS && !cableBusAdjacent )
|
||||
{
|
||||
addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
this.addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
}
|
||||
|
||||
addCoveredCableSizedCube( facing, cubeBuilder );
|
||||
@@ -284,9 +284,9 @@ class CableBuilder
|
||||
|
||||
public void addStraightCoveredConnection( EnumFacing facing, AEColor cableColor, List<BakedQuad> quadsOut )
|
||||
{
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
setStraightCableUVs( cubeBuilder, facing, 5, 11 );
|
||||
@@ -333,9 +333,9 @@ class CableBuilder
|
||||
return;
|
||||
}
|
||||
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.COVERED ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
addCoveredCableSizedCube( facing, distanceFromEdge, cubeBuilder );
|
||||
@@ -345,32 +345,32 @@ class CableBuilder
|
||||
public void addSmartConnection( EnumFacing facing, AEColor cableColor, AECableType connectionType, boolean cableBusAdjacent, int channels, List<BakedQuad> quadsOut )
|
||||
{
|
||||
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
// We render all faces except the one on the connection side
|
||||
cubeBuilder.setDrawFaces( EnumSet.complementOf( EnumSet.of( facing ) ) );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.SMART ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.SMART ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
TextureAtlasSprite oddChannel = smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = smartCableTextures.getEvenTextureForChannels( channels );
|
||||
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels( channels );
|
||||
|
||||
// For to-machine connections, use a thicker end-cap for the connection
|
||||
if( connectionType != AECableType.GLASS && !cableBusAdjacent )
|
||||
{
|
||||
addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
this.addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
// Render the channel indicators brightly lit at night
|
||||
cubeBuilder.setRenderFullBright( true );
|
||||
|
||||
cubeBuilder.setTexture( oddChannel );
|
||||
cubeBuilder.setColorRGB( cableColor.blackVariant );
|
||||
addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
this.addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
cubeBuilder.setTexture( evenChannel );
|
||||
cubeBuilder.setColorRGB( cableColor.whiteVariant );
|
||||
addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
this.addBigCoveredCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
// Reset back to normal rendering for the rest
|
||||
cubeBuilder.setRenderFullBright( false );
|
||||
@@ -393,17 +393,17 @@ class CableBuilder
|
||||
|
||||
public void addStraightSmartConnection( EnumFacing facing, AEColor cableColor, int channels, List<BakedQuad> quadsOut )
|
||||
{
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.SMART ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.SMART ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
setStraightCableUVs( cubeBuilder, facing, 5, 11 );
|
||||
|
||||
addStraightCoveredCableSizedCube( facing, cubeBuilder );
|
||||
|
||||
TextureAtlasSprite oddChannel = smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = smartCableTextures.getEvenTextureForChannels( channels );
|
||||
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels( channels );
|
||||
|
||||
// Render the channel indicators brightly lit at night
|
||||
cubeBuilder.setRenderFullBright( true );
|
||||
@@ -426,15 +426,15 @@ class CableBuilder
|
||||
return;
|
||||
}
|
||||
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.SMART ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.SMART ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
addCoveredCableSizedCube( facing, distanceFromEdge, cubeBuilder );
|
||||
|
||||
TextureAtlasSprite oddChannel = smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = smartCableTextures.getEvenTextureForChannels( channels );
|
||||
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels( channels );
|
||||
|
||||
// Render the channel indicators brightly lit at night
|
||||
cubeBuilder.setRenderFullBright( true );
|
||||
@@ -453,21 +453,21 @@ class CableBuilder
|
||||
// Dense cables only render their connections as dense if the adjacent blocks actually wants that
|
||||
if( connectionType == AECableType.SMART )
|
||||
{
|
||||
addSmartConnection( facing, cableColor, connectionType, cableBusAdjacent, channels, quadsOut );
|
||||
this.addSmartConnection( facing, cableColor, connectionType, cableBusAdjacent, channels, quadsOut );
|
||||
return;
|
||||
}
|
||||
else if( connectionType != AECableType.DENSE_SMART )
|
||||
{
|
||||
addCoveredConnection( facing, cableColor, connectionType, cableBusAdjacent, quadsOut );
|
||||
this.addCoveredConnection( facing, cableColor, connectionType, cableBusAdjacent, quadsOut );
|
||||
return;
|
||||
}
|
||||
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
// We render all faces except the one on the connection side
|
||||
cubeBuilder.setDrawFaces( EnumSet.complementOf( EnumSet.of( facing ) ) );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.DENSE_SMART ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.DENSE_SMART ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
addDenseCableSizedCube( facing, cubeBuilder );
|
||||
@@ -475,8 +475,8 @@ class CableBuilder
|
||||
// Dense cables show used channels in groups of 4, rounded up
|
||||
channels = ( channels + 3 ) / 4;
|
||||
|
||||
TextureAtlasSprite oddChannel = smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = smartCableTextures.getEvenTextureForChannels( channels );
|
||||
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels( channels );
|
||||
|
||||
// Render the channel indicators brightly lit at night
|
||||
cubeBuilder.setRenderFullBright( true );
|
||||
@@ -497,9 +497,9 @@ class CableBuilder
|
||||
|
||||
public void addStraightDenseConnection( EnumFacing facing, AEColor cableColor, int channels, List<BakedQuad> quadsOut )
|
||||
{
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( format, quadsOut );
|
||||
CubeBuilder cubeBuilder = new CubeBuilder( this.format, quadsOut );
|
||||
|
||||
TextureAtlasSprite texture = connectionTextures.get( AECableType.DENSE_SMART ).get( cableColor );
|
||||
TextureAtlasSprite texture = this.connectionTextures.get( AECableType.DENSE_SMART ).get( cableColor );
|
||||
cubeBuilder.setTexture( texture );
|
||||
|
||||
setStraightCableUVs( cubeBuilder, facing, 5, 11 );
|
||||
@@ -509,8 +509,8 @@ class CableBuilder
|
||||
// Dense cables show used channels in groups of 4, rounded up
|
||||
channels = ( channels + 3 ) / 4;
|
||||
|
||||
TextureAtlasSprite oddChannel = smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = smartCableTextures.getEvenTextureForChannels( channels );
|
||||
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels( channels );
|
||||
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels( channels );
|
||||
|
||||
// Render the channel indicators brightly lit at night
|
||||
cubeBuilder.setRenderFullBright( true );
|
||||
@@ -723,7 +723,7 @@ class CableBuilder
|
||||
|
||||
public TextureAtlasSprite getCoreTexture( CableCoreType coreType, AEColor color )
|
||||
{
|
||||
return coreTextures.get( coreType ).get( color );
|
||||
return this.coreTextures.get( coreType ).get( color );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class CableBusBakedModel implements IBakedModel
|
||||
if( layer == BlockRenderLayer.CUTOUT )
|
||||
{
|
||||
// First, handle the cable at the center of the cable bus
|
||||
addCableQuads( renderState, quads );
|
||||
this.addCableQuads( renderState, quads );
|
||||
|
||||
// Then handle attachments
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
@@ -102,7 +102,7 @@ public class CableBusBakedModel implements IBakedModel
|
||||
|
||||
for( ResourceLocation model : partModel.getModels() )
|
||||
{
|
||||
IBakedModel bakedModel = partModels.get( model );
|
||||
IBakedModel bakedModel = this.partModels.get( model );
|
||||
|
||||
if( bakedModel == null )
|
||||
{
|
||||
@@ -120,7 +120,7 @@ public class CableBusBakedModel implements IBakedModel
|
||||
}
|
||||
}
|
||||
|
||||
facadeBuilder.addFacades(
|
||||
this.facadeBuilder.addFacades(
|
||||
layer,
|
||||
renderState.getFacades(),
|
||||
renderState.getBoundingBoxes(),
|
||||
@@ -192,23 +192,23 @@ public class CableBusBakedModel implements IBakedModel
|
||||
switch( cableType )
|
||||
{
|
||||
case GLASS:
|
||||
cableBuilder.addStraightGlassConnection( facing, cableColor, quadsOut );
|
||||
this.cableBuilder.addStraightGlassConnection( facing, cableColor, quadsOut );
|
||||
break;
|
||||
case COVERED:
|
||||
cableBuilder.addStraightCoveredConnection( facing, cableColor, quadsOut );
|
||||
this.cableBuilder.addStraightCoveredConnection( facing, cableColor, quadsOut );
|
||||
break;
|
||||
case SMART:
|
||||
cableBuilder.addStraightSmartConnection( facing, cableColor, renderState.getChannelsOnSide().get( facing ), quadsOut );
|
||||
this.cableBuilder.addStraightSmartConnection( facing, cableColor, renderState.getChannelsOnSide().get( facing ), quadsOut );
|
||||
break;
|
||||
case DENSE_SMART:
|
||||
cableBuilder.addStraightDenseConnection( facing, cableColor, renderState.getChannelsOnSide().get( facing ), quadsOut );
|
||||
this.cableBuilder.addStraightDenseConnection( facing, cableColor, renderState.getChannelsOnSide().get( facing ), quadsOut );
|
||||
break;
|
||||
}
|
||||
|
||||
return; // Don't render the other form of connection
|
||||
}
|
||||
|
||||
cableBuilder.addCableCore( renderState.getCoreType(), cableColor, quadsOut );
|
||||
this.cableBuilder.addCableCore( renderState.getCoreType(), cableColor, quadsOut );
|
||||
|
||||
// Render all internal connections to attachments
|
||||
EnumMap<EnumFacing, Integer> attachmentConnections = renderState.getAttachmentConnections();
|
||||
@@ -220,13 +220,13 @@ public class CableBusBakedModel implements IBakedModel
|
||||
switch( cableType )
|
||||
{
|
||||
case GLASS:
|
||||
cableBuilder.addConstrainedGlassConnection( facing, cableColor, distance, quadsOut );
|
||||
this.cableBuilder.addConstrainedGlassConnection( facing, cableColor, distance, quadsOut );
|
||||
break;
|
||||
case COVERED:
|
||||
cableBuilder.addConstrainedCoveredConnection( facing, cableColor, distance, quadsOut );
|
||||
this.cableBuilder.addConstrainedCoveredConnection( facing, cableColor, distance, quadsOut );
|
||||
break;
|
||||
case SMART:
|
||||
cableBuilder.addConstrainedSmartConnection( facing, cableColor, distance, channels, quadsOut );
|
||||
this.cableBuilder.addConstrainedSmartConnection( facing, cableColor, distance, channels, quadsOut );
|
||||
break;
|
||||
case DENSE_SMART:
|
||||
// Dense cables do not render connections to parts since none can be attached
|
||||
@@ -245,16 +245,16 @@ public class CableBusBakedModel implements IBakedModel
|
||||
switch( cableType )
|
||||
{
|
||||
case GLASS:
|
||||
cableBuilder.addGlassConnection( facing, cableColor, connectionType, cableBusAdjacent, quadsOut );
|
||||
this.cableBuilder.addGlassConnection( facing, cableColor, connectionType, cableBusAdjacent, quadsOut );
|
||||
break;
|
||||
case COVERED:
|
||||
cableBuilder.addCoveredConnection( facing, cableColor, connectionType, cableBusAdjacent, quadsOut );
|
||||
this.cableBuilder.addCoveredConnection( facing, cableColor, connectionType, cableBusAdjacent, quadsOut );
|
||||
break;
|
||||
case SMART:
|
||||
cableBuilder.addSmartConnection( facing, cableColor, connectionType, cableBusAdjacent, channels, quadsOut );
|
||||
this.cableBuilder.addSmartConnection( facing, cableColor, connectionType, cableBusAdjacent, channels, quadsOut );
|
||||
break;
|
||||
case DENSE_SMART:
|
||||
cableBuilder.addDenseConnection( facing, cableColor, connectionType, cableBusAdjacent, channels, quadsOut );
|
||||
this.cableBuilder.addDenseConnection( facing, cableColor, connectionType, cableBusAdjacent, channels, quadsOut );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -272,7 +272,7 @@ public class CableBusBakedModel implements IBakedModel
|
||||
|
||||
if( coreType != null )
|
||||
{
|
||||
result.add( cableBuilder.getCoreTexture( coreType, cableColor ) );
|
||||
result.add( this.cableBuilder.getCoreTexture( coreType, cableColor ) );
|
||||
}
|
||||
|
||||
// If no core is present, just use the first part that comes into play
|
||||
@@ -282,7 +282,7 @@ public class CableBusBakedModel implements IBakedModel
|
||||
|
||||
for( ResourceLocation model : partModel.getModels() )
|
||||
{
|
||||
IBakedModel bakedModel = partModels.get( model );
|
||||
IBakedModel bakedModel = this.partModels.get( model );
|
||||
|
||||
if( bakedModel == null )
|
||||
{
|
||||
@@ -295,7 +295,7 @@ public class CableBusBakedModel implements IBakedModel
|
||||
// add
|
||||
// it,
|
||||
// so we don't get ugly missing texture break particles.
|
||||
if( textureMap.getMissingSprite() != particleTexture )
|
||||
if( this.textureMap.getMissingSprite() != particleTexture )
|
||||
{
|
||||
result.add( particleTexture );
|
||||
}
|
||||
@@ -337,7 +337,7 @@ public class CableBusBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return particleTexture;
|
||||
return this.particleTexture;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,8 +56,8 @@ public class CableBusModel implements IModel
|
||||
@Override
|
||||
public Collection<ResourceLocation> getDependencies()
|
||||
{
|
||||
partModels.setInitialized( true );
|
||||
return partModels.getModels();
|
||||
this.partModels.setInitialized( true );
|
||||
return this.partModels.getModels();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,7 +72,7 @@ public class CableBusModel implements IModel
|
||||
@Override
|
||||
public IBakedModel bake( IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
Map<ResourceLocation, IBakedModel> partModels = loadPartModels( state, format, bakedTextureGetter );
|
||||
Map<ResourceLocation, IBakedModel> partModels = this.loadPartModels( state, format, bakedTextureGetter );
|
||||
|
||||
CableBuilder cableBuilder = new CableBuilder( format, bakedTextureGetter );
|
||||
FacadeBuilder facadeBuilder = new FacadeBuilder( format, bakedTextureGetter );
|
||||
@@ -88,9 +88,9 @@ public class CableBusModel implements IModel
|
||||
{
|
||||
ImmutableMap.Builder<ResourceLocation, IBakedModel> result = ImmutableMap.builder();
|
||||
|
||||
for( ResourceLocation location : partModels.getModels() )
|
||||
for( ResourceLocation location : this.partModels.getModels() )
|
||||
{
|
||||
IModel model = tryLoadPartModel( location );
|
||||
IModel model = this.tryLoadPartModel( location );
|
||||
IBakedModel bakedModel = model.bake( state, format, bakedTextureGetter );
|
||||
result.put( location, bakedModel );
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class CableBusRenderState
|
||||
|
||||
public CableCoreType getCoreType()
|
||||
{
|
||||
return coreType;
|
||||
return this.coreType;
|
||||
}
|
||||
|
||||
public void setCoreType( CableCoreType coreType )
|
||||
@@ -85,7 +85,7 @@ public class CableBusRenderState
|
||||
|
||||
public AECableType getCableType()
|
||||
{
|
||||
return cableType;
|
||||
return this.cableType;
|
||||
}
|
||||
|
||||
public void setCableType( AECableType cableType )
|
||||
@@ -95,7 +95,7 @@ public class CableBusRenderState
|
||||
|
||||
public AEColor getCableColor()
|
||||
{
|
||||
return cableColor;
|
||||
return this.cableColor;
|
||||
}
|
||||
|
||||
public void setCableColor( AEColor cableColor )
|
||||
@@ -105,12 +105,12 @@ public class CableBusRenderState
|
||||
|
||||
public EnumMap<EnumFacing, Integer> getChannelsOnSide()
|
||||
{
|
||||
return channelsOnSide;
|
||||
return this.channelsOnSide;
|
||||
}
|
||||
|
||||
public EnumMap<EnumFacing, AECableType> getConnectionTypes()
|
||||
{
|
||||
return connectionTypes;
|
||||
return this.connectionTypes;
|
||||
}
|
||||
|
||||
public void setConnectionTypes( EnumMap<EnumFacing, AECableType> connectionTypes )
|
||||
@@ -125,7 +125,7 @@ public class CableBusRenderState
|
||||
|
||||
public EnumSet<EnumFacing> getCableBusAdjacent()
|
||||
{
|
||||
return cableBusAdjacent;
|
||||
return this.cableBusAdjacent;
|
||||
}
|
||||
|
||||
public void setCableBusAdjacent( EnumSet<EnumFacing> cableBusAdjacent )
|
||||
@@ -135,22 +135,22 @@ public class CableBusRenderState
|
||||
|
||||
public EnumMap<EnumFacing, IPartModel> getAttachments()
|
||||
{
|
||||
return attachments;
|
||||
return this.attachments;
|
||||
}
|
||||
|
||||
public EnumMap<EnumFacing, Integer> getAttachmentConnections()
|
||||
{
|
||||
return attachmentConnections;
|
||||
return this.attachmentConnections;
|
||||
}
|
||||
|
||||
public EnumMap<EnumFacing, FacadeRenderState> getFacades()
|
||||
{
|
||||
return facades;
|
||||
return this.facades;
|
||||
}
|
||||
|
||||
public List<AxisAlignedBB> getBoundingBoxes()
|
||||
{
|
||||
return boundingBoxes;
|
||||
return this.boundingBoxes;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public enum CableCoreType
|
||||
|
||||
public ResourceLocation getTexture( AEColor color )
|
||||
{
|
||||
return new ResourceLocation( AppEng.MOD_ID, textureFolder + "/" + color.name().toLowerCase() );
|
||||
return new ResourceLocation( AppEng.MOD_ID, this.textureFolder + "/" + color.name().toLowerCase() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -84,21 +84,21 @@ public class CubeBuilder
|
||||
// If brightness is forced to specific values, extend the vertex format to contain the multi-texturing lightmap
|
||||
// offset
|
||||
VertexFormat savedFormat = null;
|
||||
if( renderFullBright )
|
||||
if( this.renderFullBright )
|
||||
{
|
||||
savedFormat = format;
|
||||
format = VertexFormats.getFormatWithLightMap( format );
|
||||
savedFormat = this.format;
|
||||
this.format = VertexFormats.getFormatWithLightMap( this.format );
|
||||
}
|
||||
|
||||
for( EnumFacing face : drawFaces )
|
||||
for( EnumFacing face : this.drawFaces )
|
||||
{
|
||||
putFace( face, x1, y1, z1, x2, y2, z2 );
|
||||
this.putFace( face, x1, y1, z1, x2, y2, z2 );
|
||||
}
|
||||
|
||||
// Restore old format
|
||||
if( savedFormat != null )
|
||||
{
|
||||
format = savedFormat;
|
||||
this.format = savedFormat;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,22 +107,22 @@ public class CubeBuilder
|
||||
// If brightness is forced to specific values, extend the vertex format to contain the multi-texturing lightmap
|
||||
// offset
|
||||
VertexFormat savedFormat = null;
|
||||
if( renderFullBright )
|
||||
if( this.renderFullBright )
|
||||
{
|
||||
savedFormat = format;
|
||||
format = new VertexFormat( savedFormat );
|
||||
if( !format.getElements().contains( DefaultVertexFormats.TEX_2S ) )
|
||||
savedFormat = this.format;
|
||||
this.format = new VertexFormat( savedFormat );
|
||||
if( !this.format.getElements().contains( DefaultVertexFormats.TEX_2S ) )
|
||||
{
|
||||
format.addElement( DefaultVertexFormats.TEX_2S );
|
||||
this.format.addElement( DefaultVertexFormats.TEX_2S );
|
||||
}
|
||||
}
|
||||
|
||||
putFace( face, x1, y1, z1, x2, y2, z2 );
|
||||
this.putFace( face, x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
// Restore old format
|
||||
if( savedFormat != null )
|
||||
{
|
||||
format = savedFormat;
|
||||
this.format = savedFormat;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,9 +137,9 @@ public class CubeBuilder
|
||||
private void putFace( EnumFacing face, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
|
||||
TextureAtlasSprite texture = textures.get( face );
|
||||
TextureAtlasSprite texture = this.textures.get( face );
|
||||
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( format );
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( this.format );
|
||||
builder.setTexture( texture );
|
||||
builder.setQuadOrientation( face );
|
||||
|
||||
@@ -156,51 +156,51 @@ public class CubeBuilder
|
||||
}
|
||||
else
|
||||
{
|
||||
uv = getDefaultUv( face, texture, x1, y1, z1, x2, y2, z2 );
|
||||
uv = this.getDefaultUv( face, texture, x1, y1, z1, x2, y2, z2 );
|
||||
}
|
||||
|
||||
switch( face )
|
||||
{
|
||||
case DOWN:
|
||||
putVertexTR( builder, face, x2, y1, z1, uv );
|
||||
putVertexBR( builder, face, x2, y1, z2, uv );
|
||||
putVertexBL( builder, face, x1, y1, z2, uv );
|
||||
putVertexTL( builder, face, x1, y1, z1, uv );
|
||||
this.putVertexTR( builder, face, x2, y1, z1, uv );
|
||||
this.putVertexBR( builder, face, x2, y1, z2, uv );
|
||||
this.putVertexBL( builder, face, x1, y1, z2, uv );
|
||||
this.putVertexTL( builder, face, x1, y1, z1, uv );
|
||||
break;
|
||||
case UP:
|
||||
putVertexTL( builder, face, x1, y2, z1, uv );
|
||||
putVertexBL( builder, face, x1, y2, z2, uv );
|
||||
putVertexBR( builder, face, x2, y2, z2, uv );
|
||||
putVertexTR( builder, face, x2, y2, z1, uv );
|
||||
this.putVertexTL( builder, face, x1, y2, z1, uv );
|
||||
this.putVertexBL( builder, face, x1, y2, z2, uv );
|
||||
this.putVertexBR( builder, face, x2, y2, z2, uv );
|
||||
this.putVertexTR( builder, face, x2, y2, z1, uv );
|
||||
break;
|
||||
case NORTH:
|
||||
putVertexBR( builder, face, x2, y2, z1, uv );
|
||||
putVertexTR( builder, face, x2, y1, z1, uv );
|
||||
putVertexTL( builder, face, x1, y1, z1, uv );
|
||||
putVertexBL( builder, face, x1, y2, z1, uv );
|
||||
this.putVertexBR( builder, face, x2, y2, z1, uv );
|
||||
this.putVertexTR( builder, face, x2, y1, z1, uv );
|
||||
this.putVertexTL( builder, face, x1, y1, z1, uv );
|
||||
this.putVertexBL( builder, face, x1, y2, z1, uv );
|
||||
break;
|
||||
case SOUTH:
|
||||
putVertexBL( builder, face, x1, y2, z2, uv );
|
||||
putVertexTL( builder, face, x1, y1, z2, uv );
|
||||
putVertexTR( builder, face, x2, y1, z2, uv );
|
||||
putVertexBR( builder, face, x2, y2, z2, uv );
|
||||
this.putVertexBL( builder, face, x1, y2, z2, uv );
|
||||
this.putVertexTL( builder, face, x1, y1, z2, uv );
|
||||
this.putVertexTR( builder, face, x2, y1, z2, uv );
|
||||
this.putVertexBR( builder, face, x2, y2, z2, uv );
|
||||
break;
|
||||
case WEST:
|
||||
putVertexTL( builder, face, x1, y1, z1, uv );
|
||||
putVertexTR( builder, face, x1, y1, z2, uv );
|
||||
putVertexBR( builder, face, x1, y2, z2, uv );
|
||||
putVertexBL( builder, face, x1, y2, z1, uv );
|
||||
this.putVertexTL( builder, face, x1, y1, z1, uv );
|
||||
this.putVertexTR( builder, face, x1, y1, z2, uv );
|
||||
this.putVertexBR( builder, face, x1, y2, z2, uv );
|
||||
this.putVertexBL( builder, face, x1, y2, z1, uv );
|
||||
break;
|
||||
case EAST:
|
||||
putVertexBR( builder, face, x2, y2, z1, uv );
|
||||
putVertexBL( builder, face, x2, y2, z2, uv );
|
||||
putVertexTL( builder, face, x2, y1, z2, uv );
|
||||
putVertexTR( builder, face, x2, y1, z1, uv );
|
||||
this.putVertexBR( builder, face, x2, y2, z1, uv );
|
||||
this.putVertexBL( builder, face, x2, y2, z2, uv );
|
||||
this.putVertexTL( builder, face, x2, y1, z2, uv );
|
||||
this.putVertexTR( builder, face, x2, y1, z1, uv );
|
||||
break;
|
||||
}
|
||||
|
||||
int[] vertexData = builder.build().getVertexData();
|
||||
output.add( new BakedQuad( vertexData, -1, face, texture, true, format ) );
|
||||
this.output.add( new BakedQuad( vertexData, -1, face, texture, true, this.format ) );
|
||||
}
|
||||
|
||||
private UvVector getDefaultUv( EnumFacing face, TextureAtlasSprite texture, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
@@ -256,7 +256,7 @@ public class CubeBuilder
|
||||
{
|
||||
float u, v;
|
||||
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
switch( this.uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
@@ -277,7 +277,7 @@ public class CubeBuilder
|
||||
break;
|
||||
}
|
||||
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
this.putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
// uv.u2, uv.v1
|
||||
@@ -285,7 +285,7 @@ public class CubeBuilder
|
||||
{
|
||||
float u, v;
|
||||
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
switch( this.uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
@@ -305,7 +305,7 @@ public class CubeBuilder
|
||||
v = uv.v2;
|
||||
break;
|
||||
}
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
this.putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
// uv.u2, uv.v2
|
||||
@@ -315,7 +315,7 @@ public class CubeBuilder
|
||||
float u;
|
||||
float v;
|
||||
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
switch( this.uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
@@ -336,7 +336,7 @@ public class CubeBuilder
|
||||
break;
|
||||
}
|
||||
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
this.putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
// uv.u1, uv.v2
|
||||
@@ -346,7 +346,7 @@ public class CubeBuilder
|
||||
float u;
|
||||
float v;
|
||||
|
||||
switch( uvRotations[face.ordinal()] )
|
||||
switch( this.uvRotations[face.ordinal()] )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
@@ -367,7 +367,7 @@ public class CubeBuilder
|
||||
break;
|
||||
}
|
||||
|
||||
putVertex( builder, face, x, y, z, u, v );
|
||||
this.putVertex( builder, face, x, y, z, u, v );
|
||||
}
|
||||
|
||||
private void putVertex( UnpackedBakedQuad.Builder builder, EnumFacing face, float x, float y, float z, float u, float v )
|
||||
@@ -387,10 +387,10 @@ public class CubeBuilder
|
||||
break;
|
||||
case COLOR:
|
||||
// Color format is RGBA
|
||||
float r = ( color >> 16 & 0xFF ) / 255f;
|
||||
float g = ( color >> 8 & 0xFF ) / 255f;
|
||||
float b = ( color & 0xFF ) / 255f;
|
||||
float a = ( color >> 24 & 0xFF ) / 255f;
|
||||
float r = ( this.color >> 16 & 0xFF ) / 255f;
|
||||
float g = ( this.color >> 8 & 0xFF ) / 255f;
|
||||
float b = ( this.color & 0xFF ) / 255f;
|
||||
float a = ( this.color >> 24 & 0xFF ) / 255f;
|
||||
builder.put( i, r, g, b, a );
|
||||
break;
|
||||
case UV:
|
||||
@@ -418,23 +418,23 @@ public class CubeBuilder
|
||||
{
|
||||
for( EnumFacing face : EnumFacing.values() )
|
||||
{
|
||||
textures.put( face, texture );
|
||||
this.textures.put( face, texture );
|
||||
}
|
||||
}
|
||||
|
||||
public void setTextures( TextureAtlasSprite up, TextureAtlasSprite down, TextureAtlasSprite north, TextureAtlasSprite south, TextureAtlasSprite east, TextureAtlasSprite west )
|
||||
{
|
||||
textures.put( EnumFacing.UP, up );
|
||||
textures.put( EnumFacing.DOWN, down );
|
||||
textures.put( EnumFacing.NORTH, north );
|
||||
textures.put( EnumFacing.SOUTH, south );
|
||||
textures.put( EnumFacing.EAST, east );
|
||||
textures.put( EnumFacing.WEST, west );
|
||||
this.textures.put( EnumFacing.UP, up );
|
||||
this.textures.put( EnumFacing.DOWN, down );
|
||||
this.textures.put( EnumFacing.NORTH, north );
|
||||
this.textures.put( EnumFacing.SOUTH, south );
|
||||
this.textures.put( EnumFacing.EAST, east );
|
||||
this.textures.put( EnumFacing.WEST, west );
|
||||
}
|
||||
|
||||
public void setTexture( EnumFacing facing, TextureAtlasSprite sprite )
|
||||
{
|
||||
textures.put( facing, sprite );
|
||||
this.textures.put( facing, sprite );
|
||||
}
|
||||
|
||||
public void setDrawFaces( EnumSet<EnumFacing> drawFaces )
|
||||
@@ -452,12 +452,12 @@ public class CubeBuilder
|
||||
*/
|
||||
public void setColorRGB( int color )
|
||||
{
|
||||
setColor( color | 0xFF000000 );
|
||||
this.setColor( color | 0xFF000000 );
|
||||
}
|
||||
|
||||
public void setColorRGB( float r, float g, float b )
|
||||
{
|
||||
setColorRGB( (int) ( r * 255 ) << 16 | (int) ( g * 255 ) << 8 | (int) ( b * 255 ) );
|
||||
this.setColorRGB( (int) ( r * 255 ) << 16 | (int) ( g * 255 ) << 8 | (int) ( b * 255 ) );
|
||||
}
|
||||
|
||||
public void setRenderFullBright( boolean renderFullBright )
|
||||
@@ -467,7 +467,7 @@ public class CubeBuilder
|
||||
|
||||
public void setCustomUv( EnumFacing facing, float u1, float v1, float u2, float v2 )
|
||||
{
|
||||
customUv.put( facing, new Vector4f( u1, v1, u2, v2 ) );
|
||||
this.customUv.put( facing, new Vector4f( u1, v1, u2, v2 ) );
|
||||
}
|
||||
|
||||
public void setUvRotation( EnumFacing facing, int rotation )
|
||||
@@ -481,11 +481,11 @@ public class CubeBuilder
|
||||
rotation = 2;
|
||||
}
|
||||
Preconditions.checkArgument( rotation >= 0 && rotation <= 3, "rotation" );
|
||||
uvRotations[facing.ordinal()] = (byte) rotation;
|
||||
this.uvRotations[facing.ordinal()] = (byte) rotation;
|
||||
}
|
||||
|
||||
public List<BakedQuad> getOutput()
|
||||
{
|
||||
return output;
|
||||
return this.output;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class FacadeBuilder
|
||||
{
|
||||
boolean thinFacades = isUseThinFacades( partBoxes );
|
||||
|
||||
CubeBuilder builder = new CubeBuilder( format, quads );
|
||||
CubeBuilder builder = new CubeBuilder( this.format, quads );
|
||||
|
||||
facadesState.forEach( ( side, state ) ->
|
||||
{
|
||||
@@ -90,7 +90,7 @@ public class FacadeBuilder
|
||||
|
||||
try
|
||||
{
|
||||
addFacade( layer, facadesState, side, cutOutBox, thinFacades, renderStilt, rand, builder );
|
||||
this.addFacade( layer, facadesState, side, cutOutBox, thinFacades, renderStilt, rand, builder );
|
||||
}
|
||||
catch( Throwable t )
|
||||
{
|
||||
@@ -179,7 +179,7 @@ public class FacadeBuilder
|
||||
// We only render the stilt if we don't intersect with any part directly, and if there's no part on our side
|
||||
if( renderStilt && busBounds == null && layer == BlockRenderLayer.CUTOUT )
|
||||
{
|
||||
builder.setTexture( facadeTexture );
|
||||
builder.setTexture( this.facadeTexture );
|
||||
switch( side )
|
||||
{
|
||||
case DOWN:
|
||||
@@ -251,7 +251,7 @@ public class FacadeBuilder
|
||||
else
|
||||
{
|
||||
builder.setColor( color );
|
||||
builder.setTexture( facing, facadeTexture );
|
||||
builder.setTexture( facing, this.facadeTexture );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,12 +478,12 @@ public class FacadeBuilder
|
||||
|
||||
public TextureAtlasSprite getSprite()
|
||||
{
|
||||
return sprite;
|
||||
return this.sprite;
|
||||
}
|
||||
|
||||
public int getTint()
|
||||
{
|
||||
return tint;
|
||||
return this.tint;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,17 +34,17 @@ public class FacadeRenderState
|
||||
|
||||
public IBlockState getSourceBlock()
|
||||
{
|
||||
return sourceBlock;
|
||||
return this.sourceBlock;
|
||||
}
|
||||
|
||||
public EnumSet<EnumFacing> getOpenFaces()
|
||||
{
|
||||
return openFaces;
|
||||
return this.openFaces;
|
||||
}
|
||||
|
||||
public int resolveTintColor( int tintIndex )
|
||||
{
|
||||
return Minecraft.getMinecraft().getItemColors().getColorFromItemstack( textureItem, tintIndex );
|
||||
return Minecraft.getMinecraft().getItemColors().getColorFromItemstack( this.textureItem, tintIndex );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class QuadRotator
|
||||
|
||||
for( BakedQuad quad : quads )
|
||||
{
|
||||
result.add( rotateQuad( quad, newForward, newUp ) );
|
||||
result.add( this.rotateQuad( quad, newForward, newUp ) );
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -82,7 +82,7 @@ public class QuadRotator
|
||||
|
||||
// Figure out where the position is in the array
|
||||
VertexFormat format = quad.getFormat();
|
||||
int posIdx = findPositionOffset( format ) / 4;
|
||||
int posIdx = this.findPositionOffset( format ) / 4;
|
||||
int stride = format.getNextOffset() / 4;
|
||||
int normalIdx = format.getNormalOffset();
|
||||
VertexFormatElement.EnumType normalType = null;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SmartCableTextures
|
||||
|
||||
public SmartCableTextures( Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
textures = Arrays.stream( SMART_CHANNELS_TEXTURES ).map( bakedTextureGetter::apply ).toArray( TextureAtlasSprite[]::new );
|
||||
this.textures = Arrays.stream( SMART_CHANNELS_TEXTURES ).map( bakedTextureGetter::apply ).toArray( TextureAtlasSprite[]::new );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,15 +58,15 @@ public class SmartCableTextures
|
||||
{
|
||||
if( channels < 0 )
|
||||
{
|
||||
return textures[0];
|
||||
return this.textures[0];
|
||||
}
|
||||
else if( channels <= 4 )
|
||||
{
|
||||
return textures[channels];
|
||||
return this.textures[channels];
|
||||
}
|
||||
else
|
||||
{
|
||||
return textures[4];
|
||||
return this.textures[4];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,15 +77,15 @@ public class SmartCableTextures
|
||||
{
|
||||
if( channels < 5 )
|
||||
{
|
||||
return textures[5];
|
||||
return this.textures[5];
|
||||
}
|
||||
else if( channels <= 8 )
|
||||
{
|
||||
return textures[1 + channels];
|
||||
return this.textures[1 + channels];
|
||||
}
|
||||
else
|
||||
{
|
||||
return textures[9];
|
||||
return this.textures[9];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,12 +76,12 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
EnumSet<EnumFacing> connections = getConnections( state );
|
||||
|
||||
List<BakedQuad> quads = new ArrayList<>();
|
||||
CubeBuilder builder = new CubeBuilder( format, quads );
|
||||
CubeBuilder builder = new CubeBuilder( this.format, quads );
|
||||
|
||||
builder.setDrawFaces( EnumSet.of( side ) );
|
||||
|
||||
// Add the quads for the ring that frames the entire multi-block structure
|
||||
addRing( builder, side, connections );
|
||||
this.addRing( builder, side, connections );
|
||||
|
||||
// Calculate the bounds of the "inner" block that is framed by the border drawn above
|
||||
float x2 = connections.contains( EnumFacing.EAST ) ? 16 : 13.01f;
|
||||
@@ -114,7 +114,7 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
break;
|
||||
}
|
||||
|
||||
addInnerCube( side, state, builder, x1, y1, z1, x2, y2, z2 );
|
||||
this.addInnerCube( side, state, builder, x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
return quads;
|
||||
}
|
||||
@@ -122,15 +122,15 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
private void addRing( CubeBuilder builder, @Nullable EnumFacing side, EnumSet<EnumFacing> connections )
|
||||
{
|
||||
// Fill in the corners
|
||||
builder.setTexture( ringCorner );
|
||||
addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.EAST, EnumFacing.NORTH );
|
||||
addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.EAST, EnumFacing.SOUTH );
|
||||
addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.WEST, EnumFacing.NORTH );
|
||||
addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.WEST, EnumFacing.SOUTH );
|
||||
addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.EAST, EnumFacing.NORTH );
|
||||
addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.EAST, EnumFacing.SOUTH );
|
||||
addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.NORTH );
|
||||
addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.SOUTH );
|
||||
builder.setTexture( this.ringCorner );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.EAST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.EAST, EnumFacing.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.WEST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.WEST, EnumFacing.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.EAST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.EAST, EnumFacing.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.SOUTH );
|
||||
|
||||
// Fill in the remaining stripes of the face
|
||||
for( EnumFacing a : EnumFacing.values() )
|
||||
@@ -143,15 +143,15 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
// Select the horizontal or vertical ring texture depending on which side we're filling in
|
||||
if( ( side.getAxis() != EnumFacing.Axis.Y ) && ( a == EnumFacing.NORTH || a == EnumFacing.EAST || a == EnumFacing.WEST || a == EnumFacing.SOUTH ) )
|
||||
{
|
||||
builder.setTexture( ringVer );
|
||||
builder.setTexture( this.ringVer );
|
||||
}
|
||||
else if( side.getAxis() == EnumFacing.Axis.Y && ( a == EnumFacing.EAST || a == EnumFacing.WEST ) )
|
||||
{
|
||||
builder.setTexture( ringVer );
|
||||
builder.setTexture( this.ringVer );
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.setTexture( ringHor );
|
||||
builder.setTexture( this.ringHor );
|
||||
}
|
||||
|
||||
// If there's an adjacent crafting cube block on side a, then the core of the block already extends
|
||||
@@ -296,7 +296,7 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return ringCorner;
|
||||
return this.ringCorner;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -86,7 +86,7 @@ class CraftingCubeModel implements IModel
|
||||
TextureAtlasSprite ringSideHor = bakedTextureGetter.apply( RING_SIDE_HOR );
|
||||
TextureAtlasSprite ringSideVer = bakedTextureGetter.apply( RING_SIDE_VER );
|
||||
|
||||
switch( type )
|
||||
switch( this.type )
|
||||
{
|
||||
case UNIT:
|
||||
return new UnitBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter.apply( UNIT_BASE ) );
|
||||
@@ -96,13 +96,13 @@ class CraftingCubeModel implements IModel
|
||||
case STORAGE_16K:
|
||||
case STORAGE_64K:
|
||||
return new LightBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter
|
||||
.apply( LIGHT_BASE ), getLightTexture( bakedTextureGetter, type ) );
|
||||
.apply( LIGHT_BASE ), getLightTexture( bakedTextureGetter, this.type ) );
|
||||
case MONITOR:
|
||||
return new MonitorBakedModel( format, ringCorner, ringSideHor, ringSideVer, bakedTextureGetter.apply( UNIT_BASE ), bakedTextureGetter
|
||||
.apply( MONITOR_BASE ), bakedTextureGetter.apply(
|
||||
MONITOR_LIGHT_DARK ), bakedTextureGetter.apply( MONITOR_LIGHT_MEDIUM ), bakedTextureGetter.apply( MONITOR_LIGHT_BRIGHT ) );
|
||||
default:
|
||||
throw new IllegalArgumentException( "Unsupported crafting unit type: " + type );
|
||||
throw new IllegalArgumentException( "Unsupported crafting unit type: " + this.type );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,10 +56,10 @@ public class CraftingCubeRendering extends BlockRenderingCustomizer
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
|
||||
{
|
||||
ResourceLocation baseName = new ResourceLocation( AppEng.MOD_ID, registryName );
|
||||
ResourceLocation baseName = new ResourceLocation( AppEng.MOD_ID, this.registryName );
|
||||
|
||||
// Disable auto-rotation
|
||||
if( type != BlockCraftingUnit.CraftingUnitType.MONITOR )
|
||||
if( this.type != BlockCraftingUnit.CraftingUnitType.MONITOR )
|
||||
{
|
||||
rendering.modelCustomizer( ( loc, model ) -> model );
|
||||
}
|
||||
@@ -68,14 +68,14 @@ public class CraftingCubeRendering extends BlockRenderingCustomizer
|
||||
ModelResourceLocation defaultModel = new ModelResourceLocation( baseName, "normal" );
|
||||
|
||||
// This is the built-in model
|
||||
String builtInName = "models/block/crafting/" + registryName + "/builtin";
|
||||
String builtInName = "models/block/crafting/" + this.registryName + "/builtin";
|
||||
ModelResourceLocation builtInModelName = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, builtInName ), "normal" );
|
||||
|
||||
rendering.builtInModel( builtInName, new CraftingCubeModel( type ) );
|
||||
rendering.builtInModel( builtInName, new CraftingCubeModel( this.type ) );
|
||||
|
||||
rendering.stateMapper( block -> mapState( block, defaultModel, builtInModelName ) );
|
||||
rendering.stateMapper( block -> this.mapState( block, defaultModel, builtInModelName ) );
|
||||
|
||||
if( type == BlockCraftingUnit.CraftingUnitType.MONITOR )
|
||||
if( this.type == BlockCraftingUnit.CraftingUnitType.MONITOR )
|
||||
{
|
||||
rendering.tesr( new CraftingMonitorTESR() );
|
||||
}
|
||||
|
||||
@@ -40,6 +40,6 @@ public final class CraftingCubeState
|
||||
|
||||
public EnumSet<EnumFacing> getConnections()
|
||||
{
|
||||
return connections;
|
||||
return this.connections;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,55 +55,55 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
@Override
|
||||
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
|
||||
{
|
||||
return baseModel.getQuads( state, side, rand );
|
||||
return this.baseModel.getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
return this.baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return baseModel.isGui3d();
|
||||
return this.baseModel.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
return baseModel.isBuiltInRenderer();
|
||||
return this.baseModel.isBuiltInRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return baseModel.getParticleTexture();
|
||||
return this.baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return baseModel.getItemCameraTransforms();
|
||||
return this.baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return overrides;
|
||||
return this.overrides;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<? extends IBakedModel, Matrix4f> handlePerspective( ItemCameraTransforms.TransformType cameraTransformType )
|
||||
{
|
||||
if( baseModel instanceof IBakedModel )
|
||||
if( this.baseModel instanceof IBakedModel )
|
||||
{
|
||||
return ( (IBakedModel) baseModel ).handlePerspective( cameraTransformType );
|
||||
return ( (IBakedModel) this.baseModel ).handlePerspective( cameraTransformType );
|
||||
}
|
||||
|
||||
return PerspectiveMapWrapper.handlePerspective( this, transforms, cameraTransformType );
|
||||
return PerspectiveMapWrapper.handlePerspective( this, this.transforms, cameraTransformType );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,15 +135,15 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
// No need to re-check for shift being held since this model is only handed out in that case
|
||||
if( cameraTransformType == ItemCameraTransforms.TransformType.GUI )
|
||||
{
|
||||
selectedModel = outputModel;
|
||||
selectedModel = this.outputModel;
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedModel = baseModel;
|
||||
selectedModel = ItemEncodedPatternBakedModel.this.baseModel;
|
||||
}
|
||||
|
||||
// Now retroactively handle the isGui3d call, for which we always return false below
|
||||
if( selectedModel.isGui3d() != baseModel.isGui3d() )
|
||||
if( selectedModel.isGui3d() != ItemEncodedPatternBakedModel.this.baseModel.isGui3d() )
|
||||
{
|
||||
GlStateManager.enableLighting();
|
||||
}
|
||||
@@ -153,55 +153,55 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
return ( (IBakedModel) selectedModel ).handlePerspective( cameraTransformType );
|
||||
}
|
||||
|
||||
return PerspectiveMapWrapper.handlePerspective( this, transforms, cameraTransformType );
|
||||
return PerspectiveMapWrapper.handlePerspective( this, ItemEncodedPatternBakedModel.this.transforms, cameraTransformType );
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
|
||||
{
|
||||
// This may be called for items on the ground, in which case we will always fall back to the pattern
|
||||
return baseModel.getQuads( state, side, rand );
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
// NOTE: Sadly, Forge will let Minecraft call this method before handling the perspective awareness
|
||||
return baseModel.isGui3d();
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
// This may be called for items on the ground, in which case we will always fall back to the pattern
|
||||
return baseModel.isBuiltInRenderer();
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.isBuiltInRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
// This may be called for items on the ground, in which case we will always fall back to the pattern
|
||||
return baseModel.getParticleTexture();
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
// This may be called for items on the ground, in which case we will always fall back to the pattern
|
||||
return baseModel.getItemCameraTransforms();
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
// This may be called for items on the ground, in which case we will always fall back to the pattern
|
||||
return baseModel.getOverrides();
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.getOverrides();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
|
||||
CustomOverrideList()
|
||||
{
|
||||
super( baseModel.getOverrides().getOverrides() );
|
||||
super( ItemEncodedPatternBakedModel.this.baseModel.getOverrides().getOverrides() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -236,7 +236,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
}
|
||||
}
|
||||
|
||||
return baseModel.getOverrides().handleItemState( originalModel, stack, world, entity );
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.getOverrides().handleItemState( originalModel, stack, world, entity );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ class LightBakedModel extends CraftingCubeBakedModel
|
||||
@Override
|
||||
protected void addInnerCube( EnumFacing facing, IBlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
builder.setTexture( baseTexture );
|
||||
builder.setTexture( this.baseTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
boolean powered = state.getValue( BlockCraftingUnit.POWERED );
|
||||
builder.setRenderFullBright( powered );
|
||||
builder.setTexture( lightTexture );
|
||||
builder.setTexture( this.lightTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,12 +68,12 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
||||
// For sides other than the front, use the chassis texture
|
||||
if( side != forward )
|
||||
{
|
||||
builder.setTexture( chassisTexture );
|
||||
builder.setTexture( this.chassisTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
return;
|
||||
}
|
||||
|
||||
builder.setTexture( baseTexture );
|
||||
builder.setTexture( this.baseTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
// Now add the three layered light textures
|
||||
@@ -83,15 +83,15 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
||||
builder.setRenderFullBright( powered );
|
||||
|
||||
builder.setColorRGB( color.whiteVariant );
|
||||
builder.setTexture( lightBrightTexture );
|
||||
builder.setTexture( this.lightBrightTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
builder.setColorRGB( color.mediumVariant );
|
||||
builder.setTexture( lightMediumTexture );
|
||||
builder.setTexture( this.lightMediumTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
builder.setColorRGB( color.blackVariant );
|
||||
builder.setTexture( lightDarkTexture );
|
||||
builder.setTexture( this.lightDarkTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class UnitBakedModel extends CraftingCubeBakedModel
|
||||
@Override
|
||||
protected void addInnerCube( EnumFacing facing, IBlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
builder.setTexture( unitTexture );
|
||||
builder.setTexture( this.unitTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AssemblerFX extends Particle implements ICanDie
|
||||
@Override
|
||||
public boolean isDead()
|
||||
{
|
||||
return isExpired;
|
||||
return this.isExpired;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,22 +43,22 @@ final class AutoRotatingCacheKey
|
||||
|
||||
public IBlockState getBlockState()
|
||||
{
|
||||
return blockState;
|
||||
return this.blockState;
|
||||
}
|
||||
|
||||
public EnumFacing getForward()
|
||||
{
|
||||
return forward;
|
||||
return this.forward;
|
||||
}
|
||||
|
||||
public EnumFacing getUp()
|
||||
{
|
||||
return up;
|
||||
return this.up;
|
||||
}
|
||||
|
||||
public EnumFacing getSide()
|
||||
{
|
||||
return side;
|
||||
return this.side;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,22 +68,22 @@ final class AutoRotatingCacheKey
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( o == null || getClass() != o.getClass() )
|
||||
if( o == null || this.getClass() != o.getClass() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
AutoRotatingCacheKey cacheKey = (AutoRotatingCacheKey) o;
|
||||
return blockState.equals( cacheKey.blockState ) && forward == cacheKey.forward && up == cacheKey.up && side == cacheKey.side;
|
||||
return this.blockState.equals( cacheKey.blockState ) && this.forward == cacheKey.forward && this.up == cacheKey.up && this.side == cacheKey.side;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
int result = blockState.hashCode();
|
||||
result = 31 * result + forward.hashCode();
|
||||
result = 31 * result + up.hashCode();
|
||||
result = 31 * result + ( side != null ? side.hashCode() : 0 );
|
||||
int result = this.blockState.hashCode();
|
||||
result = 31 * result + this.forward.hashCode();
|
||||
result = 31 * result + this.up.hashCode();
|
||||
result = 31 * result + ( this.side != null ? this.side.hashCode() : 0 );
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
@Override
|
||||
public List<BakedQuad> load( AutoRotatingCacheKey key ) throws Exception
|
||||
{
|
||||
return getRotatedModel( key.getBlockState(), key.getSide(), key.getForward(), key.getUp() );
|
||||
return AutoRotatingModel.this.getRotatedModel( key.getBlockState(), key.getSide(), key.getForward(), key.getUp() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -109,37 +109,37 @@ public class AutoRotatingModel implements IBakedModel
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return parent.isAmbientOcclusion();
|
||||
return this.parent.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return parent.isGui3d();
|
||||
return this.parent.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
return parent.isBuiltInRenderer();
|
||||
return this.parent.isBuiltInRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return parent.getParticleTexture();
|
||||
return this.parent.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return parent.getItemCameraTransforms();
|
||||
return this.parent.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return parent.getOverrides();
|
||||
return this.parent.getOverrides();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -147,7 +147,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
{
|
||||
if( !( state instanceof IExtendedBlockState ) )
|
||||
{
|
||||
return parent.getQuads( state, side, rand );
|
||||
return this.parent.getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
IExtendedBlockState extState = (IExtendedBlockState) state;
|
||||
@@ -157,7 +157,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
|
||||
if( forward == null || up == null )
|
||||
{
|
||||
return parent.getQuads( state, side, rand );
|
||||
return this.parent.getQuads( state, side, rand );
|
||||
}
|
||||
|
||||
// The model has other properties than just forward/up, so it would cause our cache to inadvertendly also cache
|
||||
@@ -166,12 +166,12 @@ public class AutoRotatingModel implements IBakedModel
|
||||
// equals/hashCode correctly
|
||||
if( extState.getUnlistedProperties().size() != 2 )
|
||||
{
|
||||
return getRotatedModel( extState, side, forward, up );
|
||||
return this.getRotatedModel( extState, side, forward, up );
|
||||
}
|
||||
|
||||
AutoRotatingCacheKey key = new AutoRotatingCacheKey( extState.getClean(), forward, up, side );
|
||||
|
||||
return quadCache.getUnchecked( key );
|
||||
return this.quadCache.getUnchecked( key );
|
||||
}
|
||||
|
||||
public static class VertexRotator extends QuadGatheringTransformer
|
||||
@@ -189,17 +189,17 @@ public class AutoRotatingModel implements IBakedModel
|
||||
public void setParent( IVertexConsumer parent )
|
||||
{
|
||||
super.setParent( parent );
|
||||
if( Objects.equal( getVertexFormat(), parent.getVertexFormat() ) )
|
||||
if( Objects.equal( this.getVertexFormat(), parent.getVertexFormat() ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
setVertexFormat( parent.getVertexFormat() );
|
||||
this.setVertexFormat( parent.getVertexFormat() );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processQuad()
|
||||
{
|
||||
VertexFormat format = parent.getVertexFormat();
|
||||
VertexFormat format = this.parent.getVertexFormat();
|
||||
int count = format.getElementCount();
|
||||
|
||||
for( int v = 0; v < 4; v++ )
|
||||
@@ -209,15 +209,15 @@ public class AutoRotatingModel implements IBakedModel
|
||||
VertexFormatElement element = format.getElement( e );
|
||||
if( element.getUsage() == VertexFormatElement.EnumUsage.POSITION )
|
||||
{
|
||||
parent.put( e, transform( quadData[e][v] ) );
|
||||
this.parent.put( e, this.transform( this.quadData[e][v] ) );
|
||||
}
|
||||
else if( element.getUsage() == VertexFormatElement.EnumUsage.NORMAL )
|
||||
{
|
||||
parent.put( e, transformNormal( quadData[e][v] ) );
|
||||
this.parent.put( e, this.transformNormal( this.quadData[e][v] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.put( e, quadData[e][v] );
|
||||
this.parent.put( e, this.quadData[e][v] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
vec.x -= 0.5f;
|
||||
vec.y -= 0.5f;
|
||||
vec.z -= 0.5f;
|
||||
f2r.getMat().transform( vec );
|
||||
this.f2r.getMat().transform( vec );
|
||||
vec.x += 0.5f;
|
||||
vec.y += 0.5f;
|
||||
vec.z += 0.5f;
|
||||
@@ -243,7 +243,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
vecc.x -= 0.5f;
|
||||
vecc.y -= 0.5f;
|
||||
vecc.z -= 0.5f;
|
||||
f2r.getMat().transform( vecc );
|
||||
this.f2r.getMat().transform( vecc );
|
||||
vecc.x += 0.5f;
|
||||
vecc.y += 0.5f;
|
||||
vecc.z += 0.5f;
|
||||
@@ -257,13 +257,13 @@ public class AutoRotatingModel implements IBakedModel
|
||||
|
||||
private float[] transformNormal( float[] fs )
|
||||
{
|
||||
if( face == null )
|
||||
if( this.face == null )
|
||||
{
|
||||
switch( fs.length )
|
||||
{
|
||||
case 3:
|
||||
Vector3f vec = new Vector3f( fs );
|
||||
f2r.getMat().transform( vec );
|
||||
this.f2r.getMat().transform( vec );
|
||||
return new float[] {
|
||||
vec.getX(),
|
||||
vec.getY(),
|
||||
@@ -271,7 +271,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
};
|
||||
case 4:
|
||||
Vector4f vec4 = new Vector4f( fs );
|
||||
f2r.getMat().transform( vec4 );
|
||||
this.f2r.getMat().transform( vec4 );
|
||||
return new float[] {
|
||||
vec4.getX(),
|
||||
vec4.getY(),
|
||||
@@ -288,7 +288,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
switch( fs.length )
|
||||
{
|
||||
case 3:
|
||||
Vec3i vec = f2r.rotate( face ).getDirectionVec();
|
||||
Vec3i vec = this.f2r.rotate( this.face ).getDirectionVec();
|
||||
return new float[] {
|
||||
vec.getX(),
|
||||
vec.getY(),
|
||||
@@ -296,7 +296,7 @@ public class AutoRotatingModel implements IBakedModel
|
||||
};
|
||||
case 4:
|
||||
Vector4f veccc = new Vector4f( fs[0], fs[1], fs[2], fs[3] );
|
||||
Vec3i vecc = f2r.rotate( face ).getDirectionVec();
|
||||
Vec3i vecc = this.f2r.rotate( this.face ).getDirectionVec();
|
||||
return new float[] {
|
||||
vecc.getX(),
|
||||
vecc.getY(),
|
||||
@@ -313,25 +313,25 @@ public class AutoRotatingModel implements IBakedModel
|
||||
@Override
|
||||
public void setQuadTint( int tint )
|
||||
{
|
||||
parent.setQuadTint( tint );
|
||||
this.parent.setQuadTint( tint );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQuadOrientation( EnumFacing orientation )
|
||||
{
|
||||
parent.setQuadOrientation( orientation );
|
||||
this.parent.setQuadOrientation( orientation );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplyDiffuseLighting( boolean diffuse )
|
||||
{
|
||||
parent.setApplyDiffuseLighting( diffuse );
|
||||
this.parent.setApplyDiffuseLighting( diffuse );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTexture( TextureAtlasSprite texture )
|
||||
{
|
||||
parent.setTexture( texture );
|
||||
this.parent.setTexture( texture );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
this.baseModel = baseModel;
|
||||
this.texture = texture;
|
||||
this.hash = hash;
|
||||
this.generalQuads = ImmutableList.copyOf( buildGeneralQuads() );
|
||||
this.generalQuads = ImmutableList.copyOf( this.buildGeneralQuads() );
|
||||
this.modelCache = modelCache;
|
||||
}
|
||||
|
||||
@@ -78,16 +78,16 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
|
||||
{
|
||||
|
||||
List<BakedQuad> quads = baseModel.getQuads( state, side, rand );
|
||||
List<BakedQuad> quads = this.baseModel.getQuads( state, side, rand );
|
||||
|
||||
if( side != null )
|
||||
{
|
||||
return quads;
|
||||
}
|
||||
|
||||
List<BakedQuad> result = new ArrayList<>( quads.size() + generalQuads.size() );
|
||||
List<BakedQuad> result = new ArrayList<>( quads.size() + this.generalQuads.size() );
|
||||
result.addAll( quads );
|
||||
result.addAll( generalQuads );
|
||||
result.addAll( this.generalQuads );
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -95,10 +95,10 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
{
|
||||
CubeBuilder builder = new CubeBuilder( this.format );
|
||||
|
||||
builder.setTexture( texture );
|
||||
builder.setTexture( this.texture );
|
||||
|
||||
AEColor col = AEColor.values()[Math.abs( 3 + hash ) % AEColor.values().length];
|
||||
if( hash == 0 )
|
||||
AEColor col = AEColor.values()[Math.abs( 3 + this.hash ) % AEColor.values().length];
|
||||
if( this.hash == 0 )
|
||||
{
|
||||
col = AEColor.BLACK;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
}
|
||||
else
|
||||
{
|
||||
isLit = ( hash & ( 1 << x ) ) != 0 || ( hash & ( 1 << y ) ) != 0;
|
||||
isLit = ( this.hash & ( 1 << x ) ) != 0 || ( this.hash & ( 1 << y ) ) != 0;
|
||||
}
|
||||
|
||||
if( isLit )
|
||||
@@ -139,31 +139,31 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
return this.baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return baseModel.isGui3d();
|
||||
return this.baseModel.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
return baseModel.isBuiltInRenderer();
|
||||
return this.baseModel.isBuiltInRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return baseModel.getParticleTexture();
|
||||
return this.baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return baseModel.getItemCameraTransforms();
|
||||
return this.baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,7 +200,7 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
|
||||
try
|
||||
{
|
||||
return modelCache.get( hash, () -> new BiometricCardBakedModel( format, baseModel, texture, hash, modelCache ) );
|
||||
return BiometricCardBakedModel.this.modelCache.get( hash, () -> new BiometricCardBakedModel( BiometricCardBakedModel.this.format, BiometricCardBakedModel.this.baseModel, BiometricCardBakedModel.this.texture, hash, BiometricCardBakedModel.this.modelCache ) );
|
||||
}
|
||||
catch( ExecutionException e )
|
||||
{
|
||||
@@ -215,9 +215,9 @@ class BiometricCardBakedModel implements IBakedModel
|
||||
public Pair<? extends IBakedModel, Matrix4f> handlePerspective( ItemCameraTransforms.TransformType type )
|
||||
{
|
||||
// Delegate to the base model if possible
|
||||
if( baseModel instanceof IModel )
|
||||
if( this.baseModel instanceof IModel )
|
||||
{
|
||||
IBakedModel pam = (IBakedModel) baseModel;
|
||||
IBakedModel pam = (IBakedModel) this.baseModel;
|
||||
Pair<? extends IBakedModel, Matrix4f> pair = pam.handlePerspective( type );
|
||||
return Pair.of( this, pair.getValue() );
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class BiometricCardModel implements IModel
|
||||
{
|
||||
TextureAtlasSprite texture = bakedTextureGetter.apply( TEXTURE );
|
||||
|
||||
IBakedModel baseModel = getBaseModel( state, format, bakedTextureGetter );
|
||||
IBakedModel baseModel = this.getBaseModel( state, format, bakedTextureGetter );
|
||||
|
||||
return new BiometricCardBakedModel( format, baseModel, texture );
|
||||
}
|
||||
|
||||
@@ -53,19 +53,19 @@ public class BuiltInModelLoader implements ICustomModelLoader
|
||||
return false;
|
||||
}
|
||||
|
||||
return builtInModels.containsKey( modelLocation.getResourcePath() );
|
||||
return this.builtInModels.containsKey( modelLocation.getResourcePath() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModel loadModel( ResourceLocation modelLocation ) throws Exception
|
||||
{
|
||||
return builtInModels.get( modelLocation.getResourcePath() );
|
||||
return this.builtInModels.get( modelLocation.getResourcePath() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResourceManagerReload( IResourceManager resourceManager )
|
||||
{
|
||||
for( IModel model : builtInModels.values() )
|
||||
for( IModel model : this.builtInModels.values() )
|
||||
{
|
||||
if( model instanceof IResourceManagerReloadListener )
|
||||
{
|
||||
|
||||
@@ -41,17 +41,17 @@ class ColorApplicatorBakedModel implements IBakedModel
|
||||
this.transforms = map;
|
||||
|
||||
// Put the tint indices in... Since this is an item model, we are ignoring rand
|
||||
this.generalQuads = fixQuadTint( null, texDark, texMedium, texBright );
|
||||
this.generalQuads = this.fixQuadTint( null, texDark, texMedium, texBright );
|
||||
this.quadsBySide = new EnumMap<>( EnumFacing.class );
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
{
|
||||
this.quadsBySide.put( facing, fixQuadTint( facing, texDark, texMedium, texBright ) );
|
||||
this.quadsBySide.put( facing, this.fixQuadTint( facing, texDark, texMedium, texBright ) );
|
||||
}
|
||||
}
|
||||
|
||||
private List<BakedQuad> fixQuadTint( EnumFacing facing, TextureAtlasSprite texDark, TextureAtlasSprite texMedium, TextureAtlasSprite texBright )
|
||||
{
|
||||
List<BakedQuad> quads = baseModel.getQuads( null, facing, 0 );
|
||||
List<BakedQuad> quads = this.baseModel.getQuads( null, facing, 0 );
|
||||
List<BakedQuad> result = new ArrayList<>( quads.size() );
|
||||
for( BakedQuad quad : quads )
|
||||
{
|
||||
@@ -88,7 +88,7 @@ class ColorApplicatorBakedModel implements IBakedModel
|
||||
{
|
||||
if( side == null )
|
||||
{
|
||||
return generalQuads;
|
||||
return this.generalQuads;
|
||||
}
|
||||
return this.quadsBySide.get( side );
|
||||
}
|
||||
@@ -96,42 +96,42 @@ class ColorApplicatorBakedModel implements IBakedModel
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return baseModel.isAmbientOcclusion();
|
||||
return this.baseModel.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return baseModel.isGui3d();
|
||||
return this.baseModel.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
return baseModel.isBuiltInRenderer();
|
||||
return this.baseModel.isBuiltInRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return baseModel.getParticleTexture();
|
||||
return this.baseModel.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return baseModel.getItemCameraTransforms();
|
||||
return this.baseModel.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return baseModel.getOverrides();
|
||||
return this.baseModel.getOverrides();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<? extends IBakedModel, Matrix4f> handlePerspective( ItemCameraTransforms.TransformType type )
|
||||
{
|
||||
return PerspectiveMapWrapper.handlePerspective( this, transforms, type );
|
||||
return PerspectiveMapWrapper.handlePerspective( this, this.transforms, type );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ColorApplicatorModel implements IModel
|
||||
@Override
|
||||
public IBakedModel bake( IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
IBakedModel baseModel = getBaseModel( state, format, bakedTextureGetter );
|
||||
IBakedModel baseModel = this.getBaseModel( state, format, bakedTextureGetter );
|
||||
|
||||
TextureAtlasSprite texDark = bakedTextureGetter.apply( TEXTURE_DARK );
|
||||
TextureAtlasSprite texMedium = bakedTextureGetter.apply( TEXTURE_MEDIUM );
|
||||
|
||||
@@ -59,7 +59,7 @@ public class DriveBakedModel implements IBakedModel
|
||||
|
||||
List<BakedQuad> result = new ArrayList<>();
|
||||
|
||||
result.addAll( bakedBase.getQuads( state, side, rand ) );
|
||||
result.addAll( this.bakedBase.getQuads( state, side, rand ) );
|
||||
|
||||
if( side == null && state instanceof IExtendedBlockState )
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class DriveBakedModel implements IBakedModel
|
||||
{
|
||||
DriveSlotState slotState = slotsState.getState( row * 2 + col );
|
||||
|
||||
IBakedModel bakedCell = bakedCells.get( slotState );
|
||||
IBakedModel bakedCell = this.bakedCells.get( slotState );
|
||||
|
||||
Matrix4f transform = new Matrix4f();
|
||||
transform.setIdentity();
|
||||
@@ -103,36 +103,36 @@ public class DriveBakedModel implements IBakedModel
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return bakedBase.isAmbientOcclusion();
|
||||
return this.bakedBase.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return bakedBase.isGui3d();
|
||||
return this.bakedBase.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer()
|
||||
{
|
||||
return bakedBase.isGui3d();
|
||||
return this.bakedBase.isGui3d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return bakedBase.getParticleTexture();
|
||||
return this.bakedBase.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return bakedBase.getItemCameraTransforms();
|
||||
return this.bakedBase.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides()
|
||||
{
|
||||
return bakedBase.getOverrides();
|
||||
return this.bakedBase.getOverrides();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,13 +125,13 @@ class GlassBakedModel implements IBakedModel
|
||||
v /= 2;
|
||||
}
|
||||
|
||||
TextureAtlasSprite glassTexture = glassTextures[texIdx];
|
||||
TextureAtlasSprite glassTexture = this.glassTextures[texIdx];
|
||||
|
||||
// Render the glass side
|
||||
List<BakedQuad> quads = new ArrayList<>( 5 ); // At most 5
|
||||
|
||||
List<Vec3d> corners = RenderHelper.getFaceCorners( side );
|
||||
quads.add( createQuad( side, corners, glassTexture, u, v ) );
|
||||
quads.add( this.createQuad( side, corners, glassTexture, u, v ) );
|
||||
|
||||
/*
|
||||
* This needs some explanation:
|
||||
@@ -144,10 +144,10 @@ class GlassBakedModel implements IBakedModel
|
||||
* That texture had "0101" in its filename to indicate this.
|
||||
*/
|
||||
int edgeBitmask = makeBitmask( glassState, side );
|
||||
TextureAtlasSprite sideSprite = frameTextures[edgeBitmask];
|
||||
TextureAtlasSprite sideSprite = this.frameTextures[edgeBitmask];
|
||||
if( sideSprite != null )
|
||||
{
|
||||
quads.add( createQuad( side, corners, sideSprite, 0, 0 ) );
|
||||
quads.add( this.createQuad( side, corners, sideSprite, 0, 0 ) );
|
||||
}
|
||||
|
||||
return quads;
|
||||
@@ -203,7 +203,7 @@ class GlassBakedModel implements IBakedModel
|
||||
|
||||
private BakedQuad createQuad( EnumFacing side, List<Vec3d> corners, TextureAtlasSprite sprite, float uOffset, float vOffset )
|
||||
{
|
||||
return createQuad( side, corners.get( 0 ), corners.get( 1 ), corners.get( 2 ), corners.get( 3 ), sprite, uOffset, vOffset );
|
||||
return this.createQuad( side, corners.get( 0 ), corners.get( 1 ), corners.get( 2 ), corners.get( 3 ), sprite, uOffset, vOffset );
|
||||
}
|
||||
|
||||
private BakedQuad createQuad( EnumFacing side, Vec3d c1, Vec3d c2, Vec3d c3, Vec3d c4, TextureAtlasSprite sprite, float uOffset, float vOffset )
|
||||
@@ -217,12 +217,12 @@ class GlassBakedModel implements IBakedModel
|
||||
float v1 = MathHelper.clamp( 0 - vOffset, 0, 16 );
|
||||
float v2 = MathHelper.clamp( 16 - vOffset, 0, 16 );
|
||||
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( vertexFormat );
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( this.vertexFormat );
|
||||
builder.setTexture( sprite );
|
||||
putVertex( builder, normal, c1.x, c1.y, c1.z, sprite, u1, v1 );
|
||||
putVertex( builder, normal, c2.x, c2.y, c2.z, sprite, u1, v2 );
|
||||
putVertex( builder, normal, c3.x, c3.y, c3.z, sprite, u2, v2 );
|
||||
putVertex( builder, normal, c4.x, c4.y, c4.z, sprite, u2, v1 );
|
||||
this.putVertex( builder, normal, c1.x, c1.y, c1.z, sprite, u1, v1 );
|
||||
this.putVertex( builder, normal, c2.x, c2.y, c2.z, sprite, u1, v2 );
|
||||
this.putVertex( builder, normal, c3.x, c3.y, c3.z, sprite, u2, v2 );
|
||||
this.putVertex( builder, normal, c4.x, c4.y, c4.z, sprite, u2, v1 );
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@@ -233,9 +233,9 @@ class GlassBakedModel implements IBakedModel
|
||||
*/
|
||||
private void putVertex( UnpackedBakedQuad.Builder builder, Vec3d normal, double x, double y, double z, TextureAtlasSprite sprite, float u, float v )
|
||||
{
|
||||
for( int e = 0; e < vertexFormat.getElementCount(); e++ )
|
||||
for( int e = 0; e < this.vertexFormat.getElementCount(); e++ )
|
||||
{
|
||||
switch( vertexFormat.getElement( e ).getUsage() )
|
||||
switch( this.vertexFormat.getElement( e ).getUsage() )
|
||||
{
|
||||
case POSITION:
|
||||
builder.put( e, (float) x, (float) y, (float) z, 1.0f );
|
||||
@@ -244,7 +244,7 @@ class GlassBakedModel implements IBakedModel
|
||||
builder.put( e, 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
break;
|
||||
case UV:
|
||||
if( vertexFormat.getElement( e ).getIndex() == 0 )
|
||||
if( this.vertexFormat.getElement( e ).getIndex() == 0 )
|
||||
{
|
||||
u = sprite.getInterpolatedU( u );
|
||||
v = sprite.getInterpolatedV( v );
|
||||
@@ -288,7 +288,7 @@ class GlassBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return frameTextures[frameTextures.length - 1];
|
||||
return this.frameTextures[this.frameTextures.length - 1];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,7 +45,7 @@ final class MatrixVertexTransformer extends QuadGatheringTransformer
|
||||
@Override
|
||||
protected void processQuad()
|
||||
{
|
||||
VertexFormat format = parent.getVertexFormat();
|
||||
VertexFormat format = this.parent.getVertexFormat();
|
||||
int count = format.getElementCount();
|
||||
|
||||
for( int v = 0; v < 4; v++ )
|
||||
@@ -55,15 +55,15 @@ final class MatrixVertexTransformer extends QuadGatheringTransformer
|
||||
VertexFormatElement element = format.getElement( e );
|
||||
if( element.getUsage() == VertexFormatElement.EnumUsage.POSITION )
|
||||
{
|
||||
parent.put( e, transform( quadData[e][v], element.getElementCount() ) );
|
||||
this.parent.put( e, this.transform( this.quadData[e][v], element.getElementCount() ) );
|
||||
}
|
||||
else if( element.getUsage() == VertexFormatElement.EnumUsage.NORMAL )
|
||||
{
|
||||
parent.put( e, transformNormal( quadData[e][v] ) );
|
||||
this.parent.put( e, this.transformNormal( this.quadData[e][v] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.put( e, quadData[e][v] );
|
||||
this.parent.put( e, this.quadData[e][v] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,25 +72,25 @@ final class MatrixVertexTransformer extends QuadGatheringTransformer
|
||||
@Override
|
||||
public void setQuadTint( int tint )
|
||||
{
|
||||
parent.setQuadTint( tint );
|
||||
this.parent.setQuadTint( tint );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQuadOrientation( EnumFacing orientation )
|
||||
{
|
||||
parent.setQuadOrientation( orientation );
|
||||
this.parent.setQuadOrientation( orientation );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplyDiffuseLighting( boolean diffuse )
|
||||
{
|
||||
parent.setApplyDiffuseLighting( diffuse );
|
||||
this.parent.setApplyDiffuseLighting( diffuse );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTexture( TextureAtlasSprite texture )
|
||||
{
|
||||
parent.setTexture( texture );
|
||||
this.parent.setTexture( texture );
|
||||
}
|
||||
|
||||
private float[] transform( float[] fs, int elemCount )
|
||||
@@ -102,7 +102,7 @@ final class MatrixVertexTransformer extends QuadGatheringTransformer
|
||||
vec.x -= 0.5f;
|
||||
vec.y -= 0.5f;
|
||||
vec.z -= 0.5f;
|
||||
transform.transform( vec );
|
||||
this.transform.transform( vec );
|
||||
vec.x += 0.5f;
|
||||
vec.y += 0.5f;
|
||||
vec.z += 0.5f;
|
||||
@@ -121,7 +121,7 @@ final class MatrixVertexTransformer extends QuadGatheringTransformer
|
||||
vecc.x -= 0.5f;
|
||||
vecc.y -= 0.5f;
|
||||
vecc.z -= 0.5f;
|
||||
transform.transform( vecc );
|
||||
this.transform.transform( vecc );
|
||||
vecc.x += 0.5f;
|
||||
vecc.y += 0.5f;
|
||||
vecc.z += 0.5f;
|
||||
|
||||
@@ -83,13 +83,13 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
else if( state == null )
|
||||
{
|
||||
// This is used to render a compass pointing in a specific direction when being held in hand
|
||||
rotation = fallbackRotation;
|
||||
rotation = this.fallbackRotation;
|
||||
}
|
||||
|
||||
// Pre-compute the quad count to avoid list resizes
|
||||
List<BakedQuad> quads = new ArrayList<>();
|
||||
|
||||
quads.addAll( base.getQuads( state, side, rand ) );
|
||||
quads.addAll( this.base.getQuads( state, side, rand ) );
|
||||
|
||||
// We'll add the pointer as "sideless"
|
||||
if( side == null )
|
||||
@@ -100,7 +100,7 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
matrix.setRotation( new AxisAngle4f( 0, 1, 0, rotation ) );
|
||||
|
||||
MatrixVertexTransformer transformer = new MatrixVertexTransformer( matrix );
|
||||
for( BakedQuad bakedQuad : pointer.getQuads( state, side, rand ) )
|
||||
for( BakedQuad bakedQuad : this.pointer.getQuads( state, side, rand ) )
|
||||
{
|
||||
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder( bakedQuad.getFormat() );
|
||||
|
||||
@@ -120,7 +120,7 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
{
|
||||
return base.isAmbientOcclusion();
|
||||
return this.base.isAmbientOcclusion();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,13 +138,13 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture()
|
||||
{
|
||||
return base.getParticleTexture();
|
||||
return this.base.getParticleTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCameraTransforms getItemCameraTransforms()
|
||||
{
|
||||
return base.getItemCameraTransforms();
|
||||
return this.base.getItemCameraTransforms();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -167,11 +167,11 @@ public class SkyCompassBakedModel implements IBakedModel
|
||||
|
||||
float offRads = (float) ( player.rotationYaw / 180.0f * (float) Math.PI + Math.PI );
|
||||
|
||||
fallbackRotation = offRads + getAnimatedRotation( player.getPosition(), true );
|
||||
SkyCompassBakedModel.this.fallbackRotation = offRads + getAnimatedRotation( player.getPosition(), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
fallbackRotation = getAnimatedRotation( null, false );
|
||||
SkyCompassBakedModel.this.fallbackRotation = getAnimatedRotation( null, false );
|
||||
}
|
||||
|
||||
return originalModel;
|
||||
|
||||
@@ -234,7 +234,7 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
modelPath = modelPath.substring( "models/".length() );
|
||||
}
|
||||
ResourceLocation armatureLocation = new ResourceLocation( modelLocation.getResourceDomain(), "armatures/" + modelPath + ".json" );
|
||||
ModelBlockAnimation animation = ModelBlockAnimation.loadVanillaAnimation( resourceManager, armatureLocation );
|
||||
ModelBlockAnimation animation = ModelBlockAnimation.loadVanillaAnimation( UVLModelLoader.this.resourceManager, armatureLocation );
|
||||
ModelBlock model;
|
||||
{
|
||||
Reader reader = null;
|
||||
@@ -249,7 +249,7 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
new ResourceLocation( modelLocation.getResourceDomain(), "models/" + modelPath + ".json" ) );
|
||||
reader = new InputStreamReader( iresource.getInputStream(), Charsets.UTF_8 );
|
||||
|
||||
lvt_5_1_ = JsonUtils.gsonDeserialize( UVLSERIALIZER, reader, ModelBlock.class, false );
|
||||
lvt_5_1_ = JsonUtils.gsonDeserialize( this.UVLSERIALIZER, reader, ModelBlock.class, false );
|
||||
lvt_5_1_.name = modelLocation.toString();
|
||||
}
|
||||
catch( IOException e )
|
||||
@@ -265,34 +265,34 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
model = lvt_5_1_;
|
||||
}
|
||||
|
||||
this.parent = vanillaModelWrapper( getLoader(), modelLocation, model, false, animation );
|
||||
this.parent = vanillaModelWrapper( UVLModelLoader.this.getLoader(), modelLocation, model, false, animation );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> getDependencies()
|
||||
{
|
||||
return parent.getDependencies();
|
||||
return this.parent.getDependencies();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> getTextures()
|
||||
{
|
||||
return parent.getTextures();
|
||||
return this.parent.getTextures();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel bake( IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||
{
|
||||
setFaceBakery( getLoader(), new FaceBakeryOverride() );
|
||||
IBakedModel model = parent.bake( state, format, bakedTextureGetter );
|
||||
setFaceBakery( getLoader(), new FaceBakery() );
|
||||
setFaceBakery( UVLModelLoader.this.getLoader(), new FaceBakeryOverride() );
|
||||
IBakedModel model = this.parent.bake( state, format, bakedTextureGetter );
|
||||
setFaceBakery( UVLModelLoader.this.getLoader(), new FaceBakery() );
|
||||
return model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModelState getDefaultState()
|
||||
{
|
||||
return parent.getDefaultState();
|
||||
return this.parent.getDefaultState();
|
||||
}
|
||||
|
||||
public class BlockPartFaceOverrideSerializer implements JsonDeserializer<BlockPartFace>
|
||||
@@ -306,7 +306,7 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
String s = this.parseTexture( jsonobject );
|
||||
BlockFaceUV blockfaceuv = (BlockFaceUV) p_deserialize_3_.deserialize( jsonobject, BlockFaceUV.class );
|
||||
BlockPartFace blockFace = new BlockPartFace( enumfacing, i, s, blockfaceuv );
|
||||
uvlightmap.put( blockFace, parseUVL( jsonobject ) );
|
||||
UVLModelWrapper.this.uvlightmap.put( blockFace, this.parseUVL( jsonobject ) );
|
||||
return blockFace;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
{
|
||||
BakedQuad quad = super.makeBakedQuad( posFrom, posTo, face, sprite, facing, modelRotationIn, partRotation, uvLocked, shade );
|
||||
|
||||
Pair<Float, Float> brightness = uvlightmap.get( face );
|
||||
Pair<Float, Float> brightness = UVLModelWrapper.this.uvlightmap.get( face );
|
||||
if( brightness != null )
|
||||
{
|
||||
VertexFormat newFormat = VertexFormats.getFormatWithLightMap( quad.getFormat() );
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ItemRenderable<T extends TileEntity> implements Renderable<T>
|
||||
@Override
|
||||
public void renderTileEntityAt( T te, double x, double y, double z, float partialTicks, int destroyStage )
|
||||
{
|
||||
Pair<ItemStack, Matrix4f> pair = f.apply( te );
|
||||
Pair<ItemStack, Matrix4f> pair = this.f.apply( te );
|
||||
if( pair != null && pair.getLeft() != null )
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
@@ -60,9 +60,9 @@ class SpatialPylonBakedModel implements IBakedModel
|
||||
@Override
|
||||
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
|
||||
{
|
||||
int flags = getFlags( state );
|
||||
int flags = this.getFlags( state );
|
||||
|
||||
CubeBuilder builder = new CubeBuilder( format );
|
||||
CubeBuilder builder = new CubeBuilder( this.format );
|
||||
|
||||
if( flags != 0 )
|
||||
{
|
||||
@@ -129,12 +129,12 @@ class SpatialPylonBakedModel implements IBakedModel
|
||||
}
|
||||
}
|
||||
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.UP ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.DOWN ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.NORTH ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.EAST ) ),
|
||||
textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.setTextures( this.textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.UP ) ),
|
||||
this.textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.DOWN ) ),
|
||||
this.textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.NORTH ) ),
|
||||
this.textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
this.textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.EAST ) ),
|
||||
this.textures.get( getTextureTypeFromSideOutside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
|
||||
if( ( flags & TileSpatialPylon.DISPLAY_POWERED_ENABLED ) == TileSpatialPylon.DISPLAY_POWERED_ENABLED )
|
||||
@@ -142,20 +142,20 @@ class SpatialPylonBakedModel implements IBakedModel
|
||||
builder.setRenderFullBright( true );
|
||||
}
|
||||
|
||||
builder.setTextures( textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.UP ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.DOWN ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.NORTH ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.EAST ) ),
|
||||
textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.setTextures( this.textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.UP ) ),
|
||||
this.textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.DOWN ) ),
|
||||
this.textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.NORTH ) ),
|
||||
this.textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.SOUTH ) ),
|
||||
this.textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.EAST ) ),
|
||||
this.textures.get( getTextureTypeFromSideInside( flags, ori, EnumFacing.WEST ) ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.setTexture( textures.get( SpatialPylonTextureType.BASE ) );
|
||||
builder.setTexture( this.textures.get( SpatialPylonTextureType.BASE ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
|
||||
builder.setTexture( textures.get( SpatialPylonTextureType.DIM ) );
|
||||
builder.setTexture( this.textures.get( SpatialPylonTextureType.DIM ) );
|
||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ModularTESR<T extends AEBaseTile> extends TileEntitySpecialRenderer
|
||||
GlStateManager.translate( 0.5, 0.5, 0.5 );
|
||||
FacingToRotation.get( te.getForward(), te.getUp() ).glRotateCurrentMat();
|
||||
GlStateManager.translate( -0.5, -0.5, -0.5 );
|
||||
for( Renderable renderable : renderables )
|
||||
for( Renderable renderable : this.renderables )
|
||||
{
|
||||
renderable.renderTileEntityAt( te, x, y, z, partialTicks, destroyStage );
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class ModularTESR<T extends AEBaseTile> extends TileEntitySpecialRenderer
|
||||
GlStateManager.translate( 0.5, 0.5, 0.5 );
|
||||
FacingToRotation.get( te.getForward(), te.getUp() ).glRotateCurrentMat();
|
||||
GlStateManager.translate( -0.5, -0.5, -0.5 );
|
||||
for( Renderable renderable : renderables )
|
||||
for( Renderable renderable : this.renderables )
|
||||
{
|
||||
renderable.renderTileEntityFast( te, x, y, z, partialTicks, destroyStage, buffer );
|
||||
}
|
||||
|
||||
@@ -566,82 +566,82 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
// Getters
|
||||
public boolean isRemoveCrashingItemsOnLoad()
|
||||
{
|
||||
return removeCrashingItemsOnLoad;
|
||||
return this.removeCrashingItemsOnLoad;
|
||||
}
|
||||
|
||||
public int getFormationPlaneEntityLimit()
|
||||
{
|
||||
return formationPlaneEntityLimit;
|
||||
return this.formationPlaneEntityLimit;
|
||||
}
|
||||
|
||||
public boolean isEnableEffects()
|
||||
{
|
||||
return enableEffects;
|
||||
return this.enableEffects;
|
||||
}
|
||||
|
||||
public boolean isUseLargeFonts()
|
||||
{
|
||||
return useLargeFonts;
|
||||
return this.useLargeFonts;
|
||||
}
|
||||
|
||||
public boolean isUseColoredCraftingStatus()
|
||||
{
|
||||
return useColoredCraftingStatus;
|
||||
return this.useColoredCraftingStatus;
|
||||
}
|
||||
|
||||
public boolean isDisableColoredCableRecipesInJEI()
|
||||
{
|
||||
return disableColoredCableRecipesInJEI;
|
||||
return this.disableColoredCableRecipesInJEI;
|
||||
}
|
||||
|
||||
public int getCraftingCalculationTimePerTick()
|
||||
{
|
||||
return craftingCalculationTimePerTick;
|
||||
return this.craftingCalculationTimePerTick;
|
||||
}
|
||||
|
||||
public PowerUnits getSelectedPowerUnit()
|
||||
{
|
||||
return selectedPowerUnit;
|
||||
return this.selectedPowerUnit;
|
||||
}
|
||||
|
||||
public int[] getCraftByStacks()
|
||||
{
|
||||
return craftByStacks;
|
||||
return this.craftByStacks;
|
||||
}
|
||||
|
||||
public int[] getPriorityByStacks()
|
||||
{
|
||||
return priorityByStacks;
|
||||
return this.priorityByStacks;
|
||||
}
|
||||
|
||||
public int[] getLevelByStacks()
|
||||
{
|
||||
return levelByStacks;
|
||||
return this.levelByStacks;
|
||||
}
|
||||
|
||||
public int getStorageBiomeID()
|
||||
{
|
||||
return storageBiomeID;
|
||||
return this.storageBiomeID;
|
||||
}
|
||||
|
||||
public int getStorageProviderID()
|
||||
{
|
||||
return storageProviderID;
|
||||
return this.storageProviderID;
|
||||
}
|
||||
|
||||
public double getSpatialPowerExponent()
|
||||
{
|
||||
return spatialPowerExponent;
|
||||
return this.spatialPowerExponent;
|
||||
}
|
||||
|
||||
public double getSpatialPowerMultiplier()
|
||||
{
|
||||
return spatialPowerMultiplier;
|
||||
return this.spatialPowerMultiplier;
|
||||
}
|
||||
|
||||
public String[] getGrinderOres()
|
||||
{
|
||||
return grinderOres;
|
||||
return this.grinderOres;
|
||||
}
|
||||
|
||||
public Set<String> getGrinderBlackList()
|
||||
@@ -651,117 +651,117 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
||||
|
||||
public double getOreDoublePercentage()
|
||||
{
|
||||
return oreDoublePercentage;
|
||||
return this.oreDoublePercentage;
|
||||
}
|
||||
|
||||
public int getWirelessTerminalBattery()
|
||||
{
|
||||
return wirelessTerminalBattery;
|
||||
return this.wirelessTerminalBattery;
|
||||
}
|
||||
|
||||
public int getEntropyManipulatorBattery()
|
||||
{
|
||||
return entropyManipulatorBattery;
|
||||
return this.entropyManipulatorBattery;
|
||||
}
|
||||
|
||||
public int getMatterCannonBattery()
|
||||
{
|
||||
return matterCannonBattery;
|
||||
return this.matterCannonBattery;
|
||||
}
|
||||
|
||||
public int getPortableCellBattery()
|
||||
{
|
||||
return portableCellBattery;
|
||||
return this.portableCellBattery;
|
||||
}
|
||||
|
||||
public int getColorApplicatorBattery()
|
||||
{
|
||||
return colorApplicatorBattery;
|
||||
return this.colorApplicatorBattery;
|
||||
}
|
||||
|
||||
public int getChargedStaffBattery()
|
||||
{
|
||||
return chargedStaffBattery;
|
||||
return this.chargedStaffBattery;
|
||||
}
|
||||
|
||||
public float getSpawnChargedChance()
|
||||
{
|
||||
return spawnChargedChance;
|
||||
return this.spawnChargedChance;
|
||||
}
|
||||
|
||||
public int getQuartzOresPerCluster()
|
||||
{
|
||||
return quartzOresPerCluster;
|
||||
return this.quartzOresPerCluster;
|
||||
}
|
||||
|
||||
public int getQuartzOresClusterAmount()
|
||||
{
|
||||
return quartzOresClusterAmount;
|
||||
return this.quartzOresClusterAmount;
|
||||
}
|
||||
|
||||
public int getChargedChange()
|
||||
{
|
||||
return chargedChange;
|
||||
return this.chargedChange;
|
||||
}
|
||||
|
||||
public int getMinMeteoriteDistance()
|
||||
{
|
||||
return minMeteoriteDistance;
|
||||
return this.minMeteoriteDistance;
|
||||
}
|
||||
|
||||
public int getMinMeteoriteDistanceSq()
|
||||
{
|
||||
return minMeteoriteDistanceSq;
|
||||
return this.minMeteoriteDistanceSq;
|
||||
}
|
||||
|
||||
public double getMeteoriteClusterChance()
|
||||
{
|
||||
return meteoriteClusterChance;
|
||||
return this.meteoriteClusterChance;
|
||||
}
|
||||
|
||||
public int getMeteoriteMaximumSpawnHeight()
|
||||
{
|
||||
return meteoriteMaximumSpawnHeight;
|
||||
return this.meteoriteMaximumSpawnHeight;
|
||||
}
|
||||
|
||||
public int[] getMeteoriteDimensionWhitelist()
|
||||
{
|
||||
return meteoriteDimensionWhitelist;
|
||||
return this.meteoriteDimensionWhitelist;
|
||||
}
|
||||
|
||||
public double getWirelessBaseCost()
|
||||
{
|
||||
return wirelessBaseCost;
|
||||
return this.wirelessBaseCost;
|
||||
}
|
||||
|
||||
public double getWirelessCostMultiplier()
|
||||
{
|
||||
return wirelessCostMultiplier;
|
||||
return this.wirelessCostMultiplier;
|
||||
}
|
||||
|
||||
public double getWirelessTerminalDrainMultiplier()
|
||||
{
|
||||
return wirelessTerminalDrainMultiplier;
|
||||
return this.wirelessTerminalDrainMultiplier;
|
||||
}
|
||||
|
||||
public double getWirelessBaseRange()
|
||||
{
|
||||
return wirelessBaseRange;
|
||||
return this.wirelessBaseRange;
|
||||
}
|
||||
|
||||
public double getWirelessBoosterRangeMultiplier()
|
||||
{
|
||||
return wirelessBoosterRangeMultiplier;
|
||||
return this.wirelessBoosterRangeMultiplier;
|
||||
}
|
||||
|
||||
public double getWirelessBoosterExp()
|
||||
{
|
||||
return wirelessBoosterExp;
|
||||
return this.wirelessBoosterExp;
|
||||
}
|
||||
|
||||
public double getWirelessHighWirelessCount()
|
||||
{
|
||||
return wirelessHighWirelessCount;
|
||||
return this.wirelessHighWirelessCount;
|
||||
}
|
||||
|
||||
// Setters keep visibility as low as possible.
|
||||
|
||||
@@ -43,10 +43,10 @@ public final class ApiDefinitions implements IDefinitions
|
||||
|
||||
public ApiDefinitions( final PartModels partModels )
|
||||
{
|
||||
this.blocks = new ApiBlocks( registry, partModels );
|
||||
this.items = new ApiItems( registry );
|
||||
this.materials = new ApiMaterials( registry );
|
||||
this.parts = new ApiParts( registry, partModels );
|
||||
this.blocks = new ApiBlocks( this.registry, partModels );
|
||||
this.items = new ApiItems( this.registry );
|
||||
this.materials = new ApiMaterials( this.registry );
|
||||
this.parts = new ApiParts( this.registry, partModels );
|
||||
}
|
||||
//
|
||||
// public void addBlocks( final PartModels partModels )
|
||||
@@ -61,7 +61,7 @@ public final class ApiDefinitions implements IDefinitions
|
||||
|
||||
public FeatureFactory getRegistry()
|
||||
{
|
||||
return registry;
|
||||
return this.registry;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -136,7 +136,7 @@ public final class AppEng
|
||||
{
|
||||
AppEng.proxy.missingCoreMod();
|
||||
}
|
||||
MinecraftForge.EVENT_BUS.register( registration );
|
||||
MinecraftForge.EVENT_BUS.register( this.registration );
|
||||
|
||||
final Stopwatch watch = Stopwatch.createStarted();
|
||||
this.configDirectory = new File( event.getModConfigurationDirectory().getPath(), "AppliedEnergistics2" );
|
||||
@@ -155,7 +155,7 @@ public final class AppEng
|
||||
this.customRecipeConfig = new CustomRecipeForgeConfiguration( recipeConfiguration );
|
||||
this.exportConfig = new ForgeExportConfig( recipeConfiguration );
|
||||
|
||||
this.registration.setRecipeInformation( recipeDirectory, customRecipeConfig );
|
||||
this.registration.setRecipeInformation( this.recipeDirectory, this.customRecipeConfig );
|
||||
|
||||
AELog.info( "Pre Initialization ( started )" );
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ public final class Registration
|
||||
|
||||
public DimensionType getStorageDimensionType()
|
||||
{
|
||||
return storageDimensionType;
|
||||
return this.storageDimensionType;
|
||||
}
|
||||
|
||||
void preInitialize( final FMLPreInitializationEvent event )
|
||||
@@ -241,7 +241,7 @@ public final class Registration
|
||||
|
||||
if( config.getStorageProviderID() != -1 )
|
||||
{
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
|
||||
this.storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
|
||||
}
|
||||
|
||||
if( config.getStorageProviderID() == -1 && force )
|
||||
@@ -259,7 +259,7 @@ public final class Registration
|
||||
config.setStorageProviderID( config.getStorageProviderID() - 1 );
|
||||
}
|
||||
|
||||
storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
|
||||
this.storageDimensionType = DimensionType.register( "Storage Cell", "_cell", config.getStorageProviderID(), StorageWorldProvider.class, false );
|
||||
|
||||
config.save();
|
||||
}
|
||||
@@ -418,7 +418,7 @@ public final class Registration
|
||||
// Perform ore camouflage!
|
||||
ItemMaterial.instance.makeUnique();
|
||||
|
||||
final Runnable recipeLoader = new RecipeLoader( recipeDirectory, customRecipeConfig, this.recipeHandler );
|
||||
final Runnable recipeLoader = new RecipeLoader( this.recipeDirectory, this.customRecipeConfig, this.recipeHandler );
|
||||
recipeLoader.run();
|
||||
|
||||
this.recipeHandler.injectRecipes();
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ApiPart implements IPartHelper
|
||||
@Override
|
||||
public Class<? extends AEBaseTile> load( CacheKey key ) throws Exception
|
||||
{
|
||||
return generateCombinedClass( key );
|
||||
return ApiPart.this.generateCombinedClass( key );
|
||||
}
|
||||
} );
|
||||
|
||||
@@ -103,7 +103,7 @@ public class ApiPart implements IPartHelper
|
||||
return baseClass;
|
||||
}
|
||||
|
||||
return cache.getUnchecked( new CacheKey( baseClass, this.desc ) );
|
||||
return this.cache.getUnchecked( new CacheKey( baseClass, this.desc ) );
|
||||
}
|
||||
|
||||
private Class<? extends AEBaseTile> generateCombinedClass( CacheKey cacheKey )
|
||||
@@ -117,7 +117,7 @@ public class ApiPart implements IPartHelper
|
||||
if( !remainingInterfaces.isEmpty() )
|
||||
{
|
||||
CacheKey parentKey = new CacheKey( cacheKey.getBaseClass(), remainingInterfaces );
|
||||
parentClass = cache.getUnchecked( parentKey );
|
||||
parentClass = this.cache.getUnchecked( parentKey );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -370,12 +370,12 @@ public class ApiPart implements IPartHelper
|
||||
|
||||
private Class<? extends AEBaseTile> getBaseClass()
|
||||
{
|
||||
return baseClass;
|
||||
return this.baseClass;
|
||||
}
|
||||
|
||||
private List<String> getInterfaces()
|
||||
{
|
||||
return interfaces;
|
||||
return this.interfaces;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -385,21 +385,21 @@ public class ApiPart implements IPartHelper
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( o == null || getClass() != o.getClass() )
|
||||
if( o == null || this.getClass() != o.getClass() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
CacheKey cacheKey = (CacheKey) o;
|
||||
|
||||
return baseClass.equals( cacheKey.baseClass ) && interfaces.equals( cacheKey.interfaces );
|
||||
return this.baseClass.equals( cacheKey.baseClass ) && this.interfaces.equals( cacheKey.interfaces );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
int result = baseClass.hashCode();
|
||||
result = 31 * result + interfaces.hashCode();
|
||||
int result = this.baseClass.hashCode();
|
||||
result = 31 * result + this.interfaces.hashCode();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,17 +204,17 @@ public enum AEFeature
|
||||
|
||||
public String key()
|
||||
{
|
||||
return key;
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String category()
|
||||
{
|
||||
return category;
|
||||
return this.category;
|
||||
}
|
||||
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return enabled;
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
private enum Constants
|
||||
|
||||
@@ -65,6 +65,6 @@ public class BlockDefinition extends ItemDefinition implements IBlockDefinition
|
||||
@Override
|
||||
public final boolean isSameAs( final IBlockAccess world, final BlockPos pos )
|
||||
{
|
||||
return block.isPresent() && world.getBlockState( pos ).getBlock() == this.block.get();
|
||||
return this.block.isPresent() && world.getBlockState( pos ).getBlock() == this.block.get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class ItemDefinition implements IItemDefinition
|
||||
@Override
|
||||
public final boolean isSameAs( final ItemStack comparableStack )
|
||||
{
|
||||
return isEnabled() && Platform.itemComparisons().isEqualItemType( comparableStack, this.maybeStack( 1 ).get() );
|
||||
return this.isEnabled() && Platform.itemComparisons().isEqualItemType( comparableStack, this.maybeStack( 1 ).get() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user