mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
More work. @unpairedbracket, I wasn't able to get connected textures to work with my Induction Ports - would you mind taking a look at the code?
The ports have an "output" and "input" mode with different textures, you can change the mode by shift-right clicking the port with a configurator. For some reason, no matter what I do, only the input texture is shown when I use the ctm system. For now I am using default block textures, but CTM textures are much preferred!
This commit is contained in:
1 parent
13f36a52a6
commit
2ed43e5328
13 files changed
+135
-40
No files matched your search
@@ -176,18 +176,17 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
break;
|
||||
case BASIC_BLOCK_2:
|
||||
ctms[0][0] = new CTMData("ctm/SolarEvaporationBlock", this, Arrays.asList(0)).addOtherBlockConnectivities(MekanismBlocks.BasicBlock, Arrays.asList(14, 15)).registerIcons(register);
|
||||
//ctms[1][0] = new CTMData("ctm/SteamBoiler", this, Arrays.asList(1, 2)).registerIcons(register);
|
||||
//ctms[2][0] = new CTMData("ctm/BoilerValve", this, Arrays.asList(2, 1)).registerIcons(register);
|
||||
ctms[1][0] = new CTMData("ctm/InductionCasing", this, Arrays.asList(1, 2)).registerIcons(register);
|
||||
ctms[2][0] = new CTMData("ctm/InductionPortInput", this, Arrays.asList(2, 1)).registerIcons(register);
|
||||
ctms[2][1] = new CTMData("ctm/InductionPortOutput", this, Arrays.asList(2, 1)).registerIcons(register);
|
||||
|
||||
//ctms[2][0] = new CTMData("ctm/InductionPortInput", this, Arrays.asList(1, 2)).registerIcons(register);
|
||||
//ctms[2][1] = new CTMData("ctm/InductionPortOutput", this, Arrays.asList(1, 2)).registerIcons(register);
|
||||
//TODO @unpairedbracket, mind fixing this?
|
||||
|
||||
icons[0][0] = ctms[0][0].mainTextureData.icon;
|
||||
//icons[1][0] = ctms[1][0].mainTextureData.icon;
|
||||
//icons[2][0] = ctms[2][0].mainTextureData.icon;
|
||||
icons[1][0] = ctms[1][0].mainTextureData.icon;
|
||||
icons[2][0] = ctms[2][0].mainTextureData.icon;
|
||||
icons[2][1] = ctms[2][1].mainTextureData.icon;
|
||||
icons[2][0] = ctms[2][0].facingOverride.icon;
|
||||
icons[2][1] = ctms[2][1].facingOverride.icon;
|
||||
icons[2][0] = register.registerIcon("mekanism:InductionPortInput");
|
||||
icons[2][1] = register.registerIcon("mekanism:InductionPortOutput");
|
||||
icons[3][0] = register.registerIcon("mekanism:InductionCellBasic");
|
||||
icons[3][1] = register.registerIcon("mekanism:InductionCellAdvanced");
|
||||
icons[3][2] = register.registerIcon("mekanism:InductionCellElite");
|
||||
@@ -225,10 +224,6 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
else {
|
||||
return icons[meta][0];
|
||||
}
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
return ctms[meta][0].getIcon(side);
|
||||
case 14:
|
||||
TileEntitySolarEvaporationController tileEntity1 = (TileEntitySolarEvaporationController)world.getTileEntity(x, y, z);
|
||||
|
||||
@@ -318,6 +313,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
{
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
break;
|
||||
case BASIC_BLOCK_2:
|
||||
for(int i = 0; i < 5; i++)
|
||||
@@ -547,6 +543,26 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(blockType == BasicBlock.BASIC_BLOCK_2)
|
||||
{
|
||||
if(world.isRemote)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(metadata == 1 || metadata == 2)
|
||||
{
|
||||
if(!entityplayer.isSneaking() && ((TileEntityInductionCasing)world.getTileEntity(x, y, z)).structure != null)
|
||||
{
|
||||
TileEntityInductionCasing tileEntity = (TileEntityInductionCasing)world.getTileEntity(x, y, z);
|
||||
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tileEntity)));
|
||||
entityplayer.openGui(Mekanism.instance, 49, world, x, y, z);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user