Always use qualified access for fields and methods
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user