Add Connected textures to the opaque reactor blocks.
They're not very good at the moment, but they look ok.
|
@ -75,7 +75,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
*/
|
||||
public class BlockBasic extends Block implements IBlockCTM
|
||||
{
|
||||
public IIcon[][] icons = new IIcon[256][6];
|
||||
public IIcon[][] icons = new IIcon[16][6];
|
||||
|
||||
public CTMData[][] ctms = new CTMData[16][2];
|
||||
|
||||
|
@ -112,6 +112,14 @@ public class BlockBasic extends Block implements IBlockCTM
|
|||
{
|
||||
if(this == MekanismBlocks.BasicBlock)
|
||||
{
|
||||
ctms[9][0] = new CTMData("ctm/DynamicTank", this, Arrays.asList(9, 11)).registerIcons(register);
|
||||
ctms[10][0] = new CTMData("ctm/DynamicGlass", this, Arrays.asList(10)).registerIcons(register);
|
||||
ctms[11][0] = new CTMData("ctm/DynamicValve", this, Arrays.asList(11, 9)).registerIcons(register);
|
||||
|
||||
ctms[14][0] = new CTMData("ctm/SalinationBlock", this, Arrays.asList(14, 15)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).addFacingOverride("ctm/SalinationController").registerIcons(register);
|
||||
ctms[14][1] = new CTMData("ctm/SalinationBlock", this, Arrays.asList(14, 15)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).addFacingOverride("ctm/SalinationControllerOn").registerIcons(register);
|
||||
ctms[15][0] = new CTMData("ctm/SalinationValve", this, Arrays.asList(15, 14)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).registerIcons(register);
|
||||
|
||||
icons[0][0] = register.registerIcon("mekanism:OsmiumBlock");
|
||||
icons[1][0] = register.registerIcon("mekanism:BronzeBlock");
|
||||
icons[2][0] = register.registerIcon("mekanism:RefinedObsidian");
|
||||
|
@ -125,29 +133,21 @@ public class BlockBasic extends Block implements IBlockCTM
|
|||
icons[6][4] = register.registerIcon("mekanism:BinFrontOn");
|
||||
icons[7][0] = register.registerIcon("mekanism:TeleporterFrame");
|
||||
icons[8][0] = register.registerIcon("mekanism:SteelCasing");
|
||||
icons[9][0] = register.registerIcon("mekanism:DynamicTank");
|
||||
icons[10][0] = register.registerIcon("mekanism:DynamicGlass");
|
||||
icons[11][0] = register.registerIcon("mekanism:DynamicValve");
|
||||
icons[9][0] = ctms[9][0].mainTextureData.icon;
|
||||
icons[10][0] = ctms[10][0].mainTextureData.icon;
|
||||
icons[11][0] = ctms[11][0].mainTextureData.icon;
|
||||
icons[12][0] = register.registerIcon("mekanism:CopperBlock");
|
||||
icons[13][0] = register.registerIcon("mekanism:TinBlock");
|
||||
icons[14][0] = register.registerIcon("mekanism:SalinationController");
|
||||
icons[14][1] = register.registerIcon("mekanism:SalinationControllerOn");
|
||||
icons[14][2] = register.registerIcon("mekanism:SalinationBlock");
|
||||
icons[15][0] = register.registerIcon("mekanism:SalinationValve");
|
||||
|
||||
ctms[9][0] = new CTMData("ctm/DynamicTank", this, Arrays.asList(9, 11)).registerIcons(register);
|
||||
ctms[10][0] = new CTMData("ctm/DynamicGlass", this, Arrays.asList(10)).registerIcons(register);
|
||||
ctms[11][0] = new CTMData("ctm/DynamicValve", this, Arrays.asList(11, 9)).registerIcons(register);
|
||||
|
||||
ctms[14][0] = new CTMData("ctm/SalinationBlock", this, Arrays.asList(14, 15)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).addFacingOverride("ctm/SalinationController").registerIcons(register);
|
||||
ctms[14][1] = new CTMData("ctm/SalinationBlock", this, Arrays.asList(14, 15)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).addFacingOverride("ctm/SalinationControllerOn").registerIcons(register);
|
||||
ctms[15][0] = new CTMData("ctm/SalinationValve", this, Arrays.asList(15, 14)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock2, Arrays.asList(0)).registerIcons(register);
|
||||
icons[14][0] = ctms[14][0].facingOverride.icon;
|
||||
icons[14][1] = ctms[14][1].facingOverride.icon;
|
||||
icons[14][2] = ctms[14][0].mainTextureData.icon;
|
||||
icons[15][0] = ctms[15][0].mainTextureData.icon;
|
||||
}
|
||||
else if(this == MekanismBlocks.BasicBlock2)
|
||||
{
|
||||
icons[0][0] = register.registerIcon("mekanism:SalinationBlock");
|
||||
|
||||
ctms[0][0] = new CTMData("ctm/SalinationBlock", this, Arrays.asList(0)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock, Arrays.asList(14, 15)).registerIcons(register);
|
||||
|
||||
icons[0][0] = ctms[0][0].mainTextureData.icon;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class BlockReactor extends BlockContainer implements IBlockCTM
|
|||
{
|
||||
public IIcon[][] icons = new IIcon[16][16];
|
||||
|
||||
public CTMData[] ctms = new CTMData[16];
|
||||
public CTMData[][] ctms = new CTMData[16][2];
|
||||
|
||||
public BlockReactor()
|
||||
{
|
||||
|
@ -62,20 +62,26 @@ public class BlockReactor extends BlockContainer implements IBlockCTM
|
|||
{
|
||||
if(this == GeneratorsBlocks.Reactor)
|
||||
{
|
||||
icons[0][0] = register.registerIcon("mekanism:ReactorControllerOff");
|
||||
icons[0][1] = register.registerIcon("mekanism:ReactorControllerOn");
|
||||
icons[0][2] = register.registerIcon("mekanism:ReactorFrame");
|
||||
icons[1][0] = register.registerIcon("mekanism:ReactorFrame");
|
||||
icons[2][0] = register.registerIcon("mekanism:ReactorNeutronCapture");
|
||||
icons[3][0] = register.registerIcon("mekanism:ReactorPort");
|
||||
ctms[0][0] = new CTMData("ctm/ReactorFrame", this, Arrays.asList(0, 1, 2, 3)).addSideOverride(ForgeDirection.UP, "ctm/ReactorControllerOff").registerIcons(register);
|
||||
ctms[0][1] = new CTMData("ctm/ReactorFrame", this, Arrays.asList(0, 1, 2, 3)).addSideOverride(ForgeDirection.UP, "ctm/ReactorControllerOn").registerIcons(register);
|
||||
ctms[1][0] = new CTMData("ctm/ReactorFrame", this, Arrays.asList(0, 1, 2, 3)).registerIcons(register);
|
||||
ctms[2][0] = new CTMData("ctm/ReactorNeutronCapture", this, Arrays.asList(0, 1, 2, 3)).registerIcons(register);
|
||||
ctms[3][0] = new CTMData("ctm/ReactorPort", this, Arrays.asList(0, 1, 2, 3)).registerIcons(register);
|
||||
|
||||
icons[0][0] = ctms[0][0].sideOverrides[1].icon;
|
||||
icons[0][1] = ctms[0][1].sideOverrides[1].icon;
|
||||
icons[0][2] = ctms[0][0].mainTextureData.icon;
|
||||
icons[1][0] = ctms[1][0].mainTextureData.icon;
|
||||
icons[2][0] = ctms[2][0].mainTextureData.icon;
|
||||
icons[3][0] = ctms[3][0].mainTextureData.icon;
|
||||
}
|
||||
else if(this == GeneratorsBlocks.ReactorGlass)
|
||||
{
|
||||
icons[0][0] = register.registerIcon("mekanism:ReactorGlass");
|
||||
icons[1][0] = register.registerIcon("mekanism:ReactorLaserFocus");
|
||||
ctms[0][0] = new CTMData("ctm/ReactorGlass", this, Arrays.asList(0, 1)).registerIcons(register);
|
||||
ctms[1][0] = new CTMData("ctm/ReactorLaserFocus", this, Arrays.asList(1, 0)).registerIcons(register);
|
||||
|
||||
ctms[0] = new CTMData("ctm/ReactorGlass", this, Arrays.asList(0, 1)).registerIcons(register);
|
||||
ctms[1] = new CTMData("ctm/ReactorLaserFocus", this, Arrays.asList(1, 0)).registerIcons(register);
|
||||
icons[0][0] = ctms[0][0].mainTextureData.icon;
|
||||
icons[1][0] = ctms[1][0].mainTextureData.icon;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -302,7 +308,12 @@ public class BlockReactor extends BlockContainer implements IBlockCTM
|
|||
@Override
|
||||
public CTMData getCTMData(IBlockAccess world, int x, int y, int z, int meta)
|
||||
{
|
||||
return ctms[meta];
|
||||
if(ctms[meta][1] != null && MekanismUtils.isActive(world, x, y, z))
|
||||
{
|
||||
return ctms[meta][1];
|
||||
}
|
||||
|
||||
return ctms[meta][0];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -317,7 +328,7 @@ public class BlockReactor extends BlockContainer implements IBlockCTM
|
|||
{
|
||||
case 0:
|
||||
case 1:
|
||||
return ctms[metadata].shouldRenderSide(world, x, y, z, side);
|
||||
return ctms[metadata][0].shouldRenderSide(world, x, y, z, side);
|
||||
default:
|
||||
return super.shouldSideBeRendered(world, x, y, z, side);
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.8 KiB |