mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 12:09:45 +00:00
Move Pressure Disperser to main module; going to be shared by both turbine and boiler
This commit is contained in:
1 parent
269cd2b406
commit
e23409e2a5
17 files changed
+225
-250
No files matched your search
@@ -75,10 +75,12 @@ import mekanism.common.tile.TileEntityBoundingBlock;
|
||||
import mekanism.common.tile.TileEntityCardboardBox;
|
||||
import mekanism.common.tile.TileEntityElectricBlock;
|
||||
import mekanism.common.tile.TileEntityEntangledBlock;
|
||||
import mekanism.common.tile.TileEntityPressureDisperser;
|
||||
import mekanism.common.tile.TileEntitySolarEvaporationBlock;
|
||||
import mekanism.common.tile.TileEntitySolarEvaporationValve;
|
||||
import mekanism.common.tile.TileEntityThermoelectricBoiler;
|
||||
import mekanism.common.tile.TileEntityThermoelectricValve;
|
||||
import mekanism.common.tile.TileEntitySuperheatingElement;
|
||||
import mekanism.common.tile.TileEntityBoilerCasing;
|
||||
import mekanism.common.tile.TileEntityBoilerValve;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.voice.VoiceServerManager;
|
||||
import mekanism.common.world.GenHandler;
|
||||
@@ -639,6 +641,9 @@ public class Mekanism
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 21), new Object[] {
|
||||
"TTT", "TAT", "TTT", Character.valueOf('A'), "alloyUltimate", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 20)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 1, 6), new Object[] {
|
||||
"SFS", "FAF", "SFS", Character.valueOf('S'), "ingotSteel", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('F'), Blocks.iron_bars
|
||||
}));
|
||||
|
||||
//Plastic stuff
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 1), new Object[] {
|
||||
@@ -1074,8 +1079,10 @@ public class Mekanism
|
||||
GameRegistry.registerTileEntity(TileEntitySolarEvaporationValve.class, "SalinationValve");
|
||||
GameRegistry.registerTileEntity(TileEntitySolarEvaporationBlock.class, "SalinationTank");
|
||||
GameRegistry.registerTileEntity(TileEntityEntangledBlock.class, "EntangledBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityThermoelectricBoiler.class, "ThermoelectricBoiler");
|
||||
GameRegistry.registerTileEntity(TileEntityThermoelectricValve.class, "ThermoelectricValve");
|
||||
GameRegistry.registerTileEntity(TileEntityPressureDisperser.class, "PressureDisperser");
|
||||
GameRegistry.registerTileEntity(TileEntitySuperheatingElement.class, "SuperheatingElement");
|
||||
GameRegistry.registerTileEntity(TileEntityBoilerCasing.class, "BoilerCasing");
|
||||
GameRegistry.registerTileEntity(TileEntityBoilerValve.class, "BoilerValve");
|
||||
|
||||
//Load tile entities that have special renderers.
|
||||
proxy.registerSpecialTileEntities();
|
||||
|
||||
@@ -30,6 +30,7 @@ import mekanism.common.tile.TileEntityInductionCasing;
|
||||
import mekanism.common.tile.TileEntityInductionCell;
|
||||
import mekanism.common.tile.TileEntityInductionPort;
|
||||
import mekanism.common.tile.TileEntityInductionProvider;
|
||||
import mekanism.common.tile.TileEntityPressureDisperser;
|
||||
import mekanism.common.tile.TileEntitySolarEvaporationBlock;
|
||||
import mekanism.common.tile.TileEntitySolarEvaporationController;
|
||||
import mekanism.common.tile.TileEntitySolarEvaporationValve;
|
||||
@@ -86,8 +87,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
* 1:3: Induction Cell
|
||||
* 1:4: Induction Provider
|
||||
* 1:5: Superheating Element
|
||||
* 1:6: Boiler Casing
|
||||
* 1:7: Boiler Valve
|
||||
* 1:6: Pressure Disperser
|
||||
* 1:7: Boiler Casing
|
||||
* 1:8: Boiler Valve
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
@@ -202,6 +204,8 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
ctms[4][3] = new CTMData("ctm/InductionProviderUltimate", this, Arrays.asList(3, 4)).registerIcons(register).setRenderConvexConnections();
|
||||
ctms[5][0] = new CTMData("ctm/SuperheatingElement", this, Arrays.asList(5)).registerIcons(register).setRenderConvexConnections();
|
||||
|
||||
icons[6][0] = register.registerIcon("mekanism:PressureDisperser");
|
||||
|
||||
icons[0][0] = ctms[0][0].mainTextureData.icon;
|
||||
icons[1][0] = ctms[1][0].mainTextureData.icon;
|
||||
icons[2][0] = ctms[2][0].mainTextureData.icon;
|
||||
@@ -310,48 +314,29 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativetabs, List list)
|
||||
{
|
||||
switch(blockType)
|
||||
for(BasicType type : BasicType.values())
|
||||
{
|
||||
case BASIC_BLOCK_1:
|
||||
for(int i = 0; i < 16; i++)
|
||||
if(type.typeBlock == blockType)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
break;
|
||||
case BASIC_BLOCK_2:
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
if(i == 3)
|
||||
{
|
||||
case INDUCTION_CELL:
|
||||
case INDUCTION_PROVIDER:
|
||||
for(BaseTier tier : BaseTier.values())
|
||||
{
|
||||
if(tier.isObtainable())
|
||||
{
|
||||
ItemStack stack = new ItemStack(item, 1, i);
|
||||
ItemStack stack = new ItemStack(item, 1, type.meta);
|
||||
((ItemBlockBasic)stack.getItem()).setTier(stack, tier);
|
||||
list.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(i == 4)
|
||||
{
|
||||
for(BaseTier tier : BaseTier.values())
|
||||
{
|
||||
if(tier.isObtainable())
|
||||
{
|
||||
ItemStack stack = new ItemStack(item, 1, i);
|
||||
((ItemBlockBasic)stack.getItem()).setTier(stack, tier);
|
||||
list.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
list.add(new ItemStack(item, 1, type.meta));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,113 +438,100 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int i1, float f1, float f2, float f3)
|
||||
{
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
BasicType type = BasicType.get(this, metadata);
|
||||
|
||||
if(blockType == BasicBlock.BASIC_BLOCK_1)
|
||||
if(type == BasicType.REFINED_OBSIDIAN)
|
||||
{
|
||||
if(metadata == 2)
|
||||
{
|
||||
if(entityplayer.isSneaking())
|
||||
{
|
||||
entityplayer.openGui(Mekanism.instance, 1, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(metadata == 14)
|
||||
{
|
||||
if(!entityplayer.isSneaking())
|
||||
{
|
||||
entityplayer.openGui(Mekanism.instance, 33, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(world.isRemote)
|
||||
if(entityplayer.isSneaking())
|
||||
{
|
||||
entityplayer.openGui(Mekanism.instance, 1, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(metadata == 6)
|
||||
{
|
||||
TileEntityBin bin = (TileEntityBin)world.getTileEntity(x, y, z);
|
||||
|
||||
if(entityplayer.getCurrentEquippedItem() != null && MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
|
||||
{
|
||||
Item tool = entityplayer.getCurrentEquippedItem().getItem();
|
||||
if(entityplayer.isSneaking())
|
||||
{
|
||||
dismantleBlock(world, x, y, z, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(MekanismUtils.isBCWrench(tool))
|
||||
{
|
||||
((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);
|
||||
}
|
||||
|
||||
int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][bin.facing];
|
||||
|
||||
bin.setFacing((short)change);
|
||||
world.notifyBlocksOfNeighborChange(x, y, z, this);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(bin.getItemCount() < bin.MAX_STORAGE)
|
||||
{
|
||||
if(bin.addTicks == 0 && entityplayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if(entityplayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
ItemStack remain = bin.add(entityplayer.getCurrentEquippedItem());
|
||||
entityplayer.setCurrentItemOrArmor(0, remain);
|
||||
bin.addTicks = 5;
|
||||
}
|
||||
}
|
||||
else if(bin.addTicks > 0 && bin.getItemCount() > 0)
|
||||
{
|
||||
ItemStack[] inv = entityplayer.inventory.mainInventory;
|
||||
|
||||
for(int i = 0; i < inv.length; i++)
|
||||
{
|
||||
if(bin.getItemCount() == bin.MAX_STORAGE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(inv[i] != null)
|
||||
{
|
||||
ItemStack remain = bin.add(inv[i]);
|
||||
inv[i] = remain;
|
||||
bin.addTicks = 5;
|
||||
}
|
||||
|
||||
((EntityPlayerMP)entityplayer).sendContainerAndContentsToPlayer(entityplayer.openContainer, entityplayer.openContainer.getInventory());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if(metadata == 9 || metadata == 11)
|
||||
{
|
||||
return ((IMultiblock)world.getTileEntity(x, y, z)).onActivate(entityplayer);
|
||||
}
|
||||
else if(metadata == 10)
|
||||
{
|
||||
return ((IStructuralMultiblock)world.getTileEntity(x, y, z)).onActivate(entityplayer);
|
||||
}
|
||||
}
|
||||
else if(blockType == BasicBlock.BASIC_BLOCK_2)
|
||||
|
||||
if(world.isRemote)
|
||||
{
|
||||
if(world.isRemote)
|
||||
return true;
|
||||
}
|
||||
|
||||
if(type == BasicType.SOLAR_EVAPORATION_CONTROLLER)
|
||||
{
|
||||
if(!entityplayer.isSneaking())
|
||||
{
|
||||
entityplayer.openGui(Mekanism.instance, 33, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(metadata == 1 || metadata == 2)
|
||||
}
|
||||
else if(type == BasicType.BIN)
|
||||
{
|
||||
TileEntityBin bin = (TileEntityBin)world.getTileEntity(x, y, z);
|
||||
|
||||
if(entityplayer.getCurrentEquippedItem() != null && MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
|
||||
{
|
||||
return ((IMultiblock)world.getTileEntity(x, y, z)).onActivate(entityplayer);
|
||||
Item tool = entityplayer.getCurrentEquippedItem().getItem();
|
||||
|
||||
if(entityplayer.isSneaking())
|
||||
{
|
||||
dismantleBlock(world, x, y, z, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(MekanismUtils.isBCWrench(tool))
|
||||
{
|
||||
((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);
|
||||
}
|
||||
|
||||
int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][bin.facing];
|
||||
|
||||
bin.setFacing((short)change);
|
||||
world.notifyBlocksOfNeighborChange(x, y, z, this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(bin.getItemCount() < bin.MAX_STORAGE)
|
||||
{
|
||||
if(bin.addTicks == 0 && entityplayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if(entityplayer.getCurrentEquippedItem() != null)
|
||||
{
|
||||
ItemStack remain = bin.add(entityplayer.getCurrentEquippedItem());
|
||||
entityplayer.setCurrentItemOrArmor(0, remain);
|
||||
bin.addTicks = 5;
|
||||
}
|
||||
}
|
||||
else if(bin.addTicks > 0 && bin.getItemCount() > 0)
|
||||
{
|
||||
ItemStack[] inv = entityplayer.inventory.mainInventory;
|
||||
|
||||
for(int i = 0; i < inv.length; i++)
|
||||
{
|
||||
if(bin.getItemCount() == bin.MAX_STORAGE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(inv[i] != null)
|
||||
{
|
||||
ItemStack remain = bin.add(inv[i]);
|
||||
inv[i] = remain;
|
||||
bin.addTicks = 5;
|
||||
}
|
||||
|
||||
((EntityPlayerMP)entityplayer).sendContainerAndContentsToPlayer(entityplayer.openContainer, entityplayer.openContainer.getInventory());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if(type == BasicType.DYNAMIC_TANK || type == BasicType.DYNAMIC_VALVE || type == BasicType.INDUCTION_CASING || type == BasicType.INDUCTION_PORT)
|
||||
{
|
||||
return ((IMultiblock)world.getTileEntity(x, y, z)).onActivate(entityplayer);
|
||||
}
|
||||
else if(type == BasicType.STRUCTURAL_GLASS)
|
||||
{
|
||||
return ((IStructuralMultiblock)world.getTileEntity(x, y, z)).onActivate(entityplayer);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -568,7 +540,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
{
|
||||
return !(blockType == BasicBlock.BASIC_BLOCK_1 && world.getBlockMetadata(x, y, z) == 10);
|
||||
return BasicType.get(this, world.getBlockMetadata(x, y, z)) != BasicType.STRUCTURAL_GLASS;
|
||||
}
|
||||
|
||||
public static boolean manageInventory(EntityPlayer player, TileEntityDynamicTank tileEntity)
|
||||
@@ -838,35 +810,30 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player)
|
||||
{
|
||||
ItemStack ret = new ItemStack(this, 1, world.getBlockMetadata(x, y, z));
|
||||
BasicType type = BasicType.get(this, world.getBlockMetadata(x, y, z));
|
||||
ItemStack ret = new ItemStack(this, 1, type.meta);
|
||||
|
||||
if(blockType == BasicBlock.BASIC_BLOCK_1)
|
||||
if(type == BasicType.BIN)
|
||||
{
|
||||
if(ret.getItemDamage() == 6)
|
||||
TileEntityBin tileEntity = (TileEntityBin)world.getTileEntity(x, y, z);
|
||||
InventoryBin inv = new InventoryBin(ret);
|
||||
|
||||
inv.setItemCount(tileEntity.getItemCount());
|
||||
|
||||
if(tileEntity.getItemCount() > 0)
|
||||
{
|
||||
TileEntityBin tileEntity = (TileEntityBin)world.getTileEntity(x, y, z);
|
||||
InventoryBin inv = new InventoryBin(ret);
|
||||
|
||||
inv.setItemCount(tileEntity.getItemCount());
|
||||
|
||||
if(tileEntity.getItemCount() > 0)
|
||||
{
|
||||
inv.setItemType(tileEntity.itemType);
|
||||
}
|
||||
inv.setItemType(tileEntity.itemType);
|
||||
}
|
||||
}
|
||||
else if(blockType == BasicBlock.BASIC_BLOCK_2)
|
||||
else if(type == BasicType.INDUCTION_CELL)
|
||||
{
|
||||
if(ret.getItemDamage() == 3)
|
||||
{
|
||||
TileEntityInductionCell tileEntity = (TileEntityInductionCell)world.getTileEntity(x, y, z);
|
||||
((ItemBlockBasic)ret.getItem()).setTier(ret, tileEntity.tier.getBaseTier());
|
||||
}
|
||||
else if(ret.getItemDamage() == 4)
|
||||
{
|
||||
TileEntityInductionProvider tileEntity = (TileEntityInductionProvider)world.getTileEntity(x, y, z);
|
||||
((ItemBlockBasic)ret.getItem()).setTier(ret, tileEntity.tier.getBaseTier());
|
||||
}
|
||||
TileEntityInductionCell tileEntity = (TileEntityInductionCell)world.getTileEntity(x, y, z);
|
||||
((ItemBlockBasic)ret.getItem()).setTier(ret, tileEntity.tier.getBaseTier());
|
||||
}
|
||||
else if(type == BasicType.INDUCTION_PROVIDER)
|
||||
{
|
||||
TileEntityInductionProvider tileEntity = (TileEntityInductionProvider)world.getTileEntity(x, y, z);
|
||||
((ItemBlockBasic)ret.getItem()).setTier(ret, tileEntity.tier.getBaseTier());
|
||||
}
|
||||
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
@@ -932,7 +899,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
{
|
||||
Coord4D obj = new Coord4D(x, y, z).getFromSide(ForgeDirection.getOrientation(side).getOpposite());
|
||||
|
||||
if(blockType == BasicBlock.BASIC_BLOCK_1 && obj.getMetadata(world) == 10)
|
||||
if(BasicType.get(this, world.getBlockMetadata(x, y, z)) == BasicType.STRUCTURAL_GLASS)
|
||||
{
|
||||
return ctms[10][0].shouldRenderSide(world, x, y, z, side);
|
||||
}
|
||||
@@ -989,19 +956,18 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
{
|
||||
return ctms[meta][1];
|
||||
}
|
||||
|
||||
BasicType type = BasicType.get(this, world.getBlockMetadata(x, y, z));
|
||||
|
||||
if(blockType == BasicBlock.BASIC_BLOCK_2)
|
||||
if(type == BasicType.INDUCTION_CELL)
|
||||
{
|
||||
if(meta == 3)
|
||||
{
|
||||
TileEntityInductionCell tileEntity = (TileEntityInductionCell)world.getTileEntity(x, y, z);
|
||||
return ctms[meta][tileEntity.tier.ordinal()];
|
||||
}
|
||||
else if(meta == 4)
|
||||
{
|
||||
TileEntityInductionProvider tileEntity = (TileEntityInductionProvider)world.getTileEntity(x, y, z);
|
||||
return ctms[meta][tileEntity.tier.ordinal()];
|
||||
}
|
||||
TileEntityInductionCell tileEntity = (TileEntityInductionCell)world.getTileEntity(x, y, z);
|
||||
return ctms[meta][tileEntity.tier.ordinal()];
|
||||
}
|
||||
else if(type == BasicType.INDUCTION_PROVIDER)
|
||||
{
|
||||
TileEntityInductionProvider tileEntity = (TileEntityInductionProvider)world.getTileEntity(x, y, z);
|
||||
return ctms[meta][tileEntity.tier.ordinal()];
|
||||
}
|
||||
|
||||
return ctms[meta][0];
|
||||
@@ -1036,9 +1002,10 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
INDUCTION_PORT(BasicBlock.BASIC_BLOCK_2, 2, "InductionPort", TileEntityInductionPort.class, true),
|
||||
INDUCTION_CELL(BasicBlock.BASIC_BLOCK_2, 3, "InductionCell", TileEntityInductionCell.class, true),
|
||||
INDUCTION_PROVIDER(BasicBlock.BASIC_BLOCK_2, 4, "InductionProvider", TileEntityInductionProvider.class, true),
|
||||
SUPERHEATING_ELEMENT(BasicBlock.BASIC_BLOCK_2, 5, "SuperheatingElement", null, true);
|
||||
//BOILER_CASING(BasicBlock.BASIC_BLOCK_2, 6, "BoilerCasing", TileEntityBoilerCasing.class, true),
|
||||
//BOILER_VALVE(BasicBlock.BASIC_BLOCK_2, 7, "BoilerValve", TileEntityBoilerValve.class, true);
|
||||
SUPERHEATING_ELEMENT(BasicBlock.BASIC_BLOCK_2, 5, "SuperheatingElement", null, true),
|
||||
PRESSURE_DISPERSER(BasicBlock.BASIC_BLOCK_2, 6, "PressureDisperser", TileEntityPressureDisperser.class, true);
|
||||
//BOILER_CASING(BasicBlock.BASIC_BLOCK_2, 7, "BoilerCasing", TileEntityBoilerCasing.class, true),
|
||||
//BOILER_VALVE(BasicBlock.BASIC_BLOCK_2, 8, "BoilerValve", TileEntityBoilerValve.class, true);
|
||||
|
||||
public BasicBlock typeBlock;
|
||||
public int meta;
|
||||
|
||||
@@ -9,7 +9,7 @@ import mekanism.api.Coord4D;
|
||||
import mekanism.common.multiblock.MultiblockCache;
|
||||
import mekanism.common.multiblock.MultiblockManager;
|
||||
import mekanism.common.tile.TileEntityMultiblock;
|
||||
import mekanism.common.tile.TileEntityThermoelectricBoiler;
|
||||
import mekanism.common.tile.TileEntityBoilerCasing;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BoilerManager extends MultiblockManager<SynchronizedBoilerData>
|
||||
{
|
||||
String inventoryID = entry.getKey();
|
||||
|
||||
HashSet<TileEntityThermoelectricBoiler> boilers = new HashSet<TileEntityThermoelectricBoiler>();
|
||||
HashSet<TileEntityBoilerCasing> boilers = new HashSet<TileEntityBoilerCasing>();
|
||||
|
||||
for(Coord4D obj : entry.getValue().locations)
|
||||
{
|
||||
@@ -49,10 +49,10 @@ public class BoilerManager extends MultiblockManager<SynchronizedBoilerData>
|
||||
|
||||
tilesToKill.get(inventoryID).add(obj);
|
||||
}
|
||||
else if(tileEntity instanceof TileEntityThermoelectricBoiler)
|
||||
else if(tileEntity instanceof TileEntityBoilerCasing)
|
||||
{
|
||||
((TileEntityThermoelectricBoiler)tileEntity).simulateHeat();
|
||||
boilers.add((TileEntityThermoelectricBoiler) tileEntity);
|
||||
((TileEntityBoilerCasing)tileEntity).simulateHeat();
|
||||
boilers.add((TileEntityBoilerCasing) tileEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class BoilerManager extends MultiblockManager<SynchronizedBoilerData>
|
||||
boilers.iterator().next().getSynchronizedData().applyTemperatureChange();
|
||||
}
|
||||
|
||||
for (TileEntityThermoelectricBoiler boiler : boilers)
|
||||
for (TileEntityBoilerCasing boiler : boilers)
|
||||
{
|
||||
boiler.applyTemperatureChange();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package mekanism.common.content.boiler;
|
||||
|
||||
import mekanism.common.tile.TileEntityThermoelectricBoiler;
|
||||
import mekanism.common.tile.TileEntityBoilerCasing;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class BoilerSteamTank extends BoilerTank
|
||||
{
|
||||
public BoilerSteamTank(TileEntityThermoelectricBoiler tileEntity)
|
||||
public BoilerSteamTank(TileEntityBoilerCasing tileEntity)
|
||||
{
|
||||
super(tileEntity);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package mekanism.common.content.boiler;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.content.boiler.SynchronizedBoilerData.ValveData;
|
||||
import mekanism.common.tile.TileEntityThermoelectricBoiler;
|
||||
import mekanism.common.tile.TileEntityBoilerCasing;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -11,9 +11,9 @@ import net.minecraftforge.fluids.IFluidTank;
|
||||
|
||||
public abstract class BoilerTank implements IFluidTank
|
||||
{
|
||||
public TileEntityThermoelectricBoiler steamBoiler;
|
||||
public TileEntityBoilerCasing steamBoiler;
|
||||
|
||||
public BoilerTank(TileEntityThermoelectricBoiler tileEntity)
|
||||
public BoilerTank(TileEntityBoilerCasing tileEntity)
|
||||
{
|
||||
steamBoiler = tileEntity;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import mekanism.common.content.boiler.SynchronizedBoilerData.ValveData;
|
||||
import mekanism.common.multiblock.MultiblockCache;
|
||||
import mekanism.common.multiblock.MultiblockManager;
|
||||
import mekanism.common.multiblock.UpdateProtocol;
|
||||
import mekanism.common.tile.TileEntityThermoelectricBoiler;
|
||||
import mekanism.common.tile.TileEntityThermoelectricValve;
|
||||
import mekanism.common.tile.TileEntityBoilerCasing;
|
||||
import mekanism.common.tile.TileEntityBoilerValve;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol<SynchronizedBoilerData>
|
||||
public static final int WATER_PER_TANK = 16000;
|
||||
public static final int STEAM_PER_TANK = 160000;
|
||||
|
||||
public BoilerUpdateProtocol(TileEntityThermoelectricBoiler tileEntity)
|
||||
public BoilerUpdateProtocol(TileEntityBoilerCasing tileEntity)
|
||||
{
|
||||
super(tileEntity);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol<SynchronizedBoilerData>
|
||||
{
|
||||
for(Coord4D obj : structure.locations)
|
||||
{
|
||||
if(obj.getTileEntity(pointer.getWorldObj()) instanceof TileEntityThermoelectricValve)
|
||||
if(obj.getTileEntity(pointer.getWorldObj()) instanceof TileEntityBoilerValve)
|
||||
{
|
||||
ValveData data = new ValveData();
|
||||
data.location = obj;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package mekanism.common.content.boiler;
|
||||
|
||||
import mekanism.common.tile.TileEntityThermoelectricBoiler;
|
||||
import mekanism.common.tile.TileEntityBoilerCasing;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class BoilerWaterTank extends BoilerTank
|
||||
{
|
||||
public BoilerWaterTank(TileEntityThermoelectricBoiler tileEntity)
|
||||
public BoilerWaterTank(TileEntityBoilerCasing tileEntity)
|
||||
{
|
||||
super(tileEntity);
|
||||
}
|
||||
|
||||
@@ -60,8 +60,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
* 1:3: Induction Cell
|
||||
* 1:4: Induction Provider
|
||||
* 1:5: Superheating Element
|
||||
* 1:6: Boiler Casing
|
||||
* 1:7: Boiler Valve
|
||||
* 1:6: Pressure Disperser
|
||||
* 1:7: Boiler Casing
|
||||
* 1:8: Boiler Valve
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
@@ -79,7 +80,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem
|
||||
@Override
|
||||
public int getItemStackLimit(ItemStack stack)
|
||||
{
|
||||
if(Block.getBlockFromItem(this) == MekanismBlocks.BasicBlock && stack.getItemDamage() == 6)
|
||||
if(BasicType.get(stack) == BasicType.BIN)
|
||||
{
|
||||
return new InventoryBin(stack).getItemCount() == 0 ? super.getItemStackLimit(stack) : 1;
|
||||
}
|
||||
@@ -91,6 +92,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem
|
||||
{
|
||||
ItemStack stack = new ItemStack(MekanismBlocks.BasicBlock2, 1, 3);
|
||||
setTier(stack, tier.getBaseTier());
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -98,6 +100,7 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem
|
||||
{
|
||||
ItemStack stack = new ItemStack(MekanismBlocks.BasicBlock2, 1, 4);
|
||||
setTier(stack, tier.getBaseTier());
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -279,27 +282,23 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
if(BasicType.get(itemstack) != null)
|
||||
BasicType type = BasicType.get(itemstack);
|
||||
|
||||
if(type != null)
|
||||
{
|
||||
return getUnlocalizedName() + "." + BasicType.get(itemstack).name;
|
||||
String name = getUnlocalizedName() + "." + BasicType.get(itemstack).name;
|
||||
|
||||
if(type == BasicType.INDUCTION_CELL || type == BasicType.INDUCTION_PROVIDER)
|
||||
{
|
||||
name += getTier(itemstack).getName();
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
return "null";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack itemstack)
|
||||
{
|
||||
BasicType type = BasicType.get(itemstack);
|
||||
|
||||
if(type == BasicType.INDUCTION_CELL || type == BasicType.INDUCTION_PROVIDER)
|
||||
{
|
||||
return getTier(itemstack).getLocalizedName() + " " + super.getItemStackDisplayName(itemstack);
|
||||
}
|
||||
|
||||
return super.getItemStackDisplayName(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getEnergy(ItemStack itemStack)
|
||||
{
|
||||
|
||||
+4
-4
@@ -27,7 +27,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
|
||||
public class TileEntityThermoelectricBoiler extends TileEntityMultiblock<SynchronizedBoilerData> implements IFluidContainerManager, IHeatTransfer
|
||||
public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoilerData> implements IFluidContainerManager, IHeatTransfer
|
||||
{
|
||||
/** A client-sided and server-sided map of valves on this tank's structure, used on the client for rendering fluids. */
|
||||
public Map<ValveData, Integer> valveViewing = new HashMap<ValveData, Integer>();
|
||||
@@ -45,12 +45,12 @@ public class TileEntityThermoelectricBoiler extends TileEntityMultiblock<Synchro
|
||||
public double heatToAbsorb;
|
||||
public double invHeatCapacity = 5;
|
||||
|
||||
public TileEntityThermoelectricBoiler()
|
||||
public TileEntityBoilerCasing()
|
||||
{
|
||||
this("SteamBoiler");
|
||||
}
|
||||
|
||||
public TileEntityThermoelectricBoiler(String name)
|
||||
public TileEntityBoilerCasing(String name)
|
||||
{
|
||||
super(name);
|
||||
inventory = new ItemStack[2];
|
||||
@@ -399,7 +399,7 @@ public class TileEntityThermoelectricBoiler extends TileEntityMultiblock<Synchro
|
||||
|
||||
valveViewing.put(data, viewingTicks);
|
||||
|
||||
TileEntityThermoelectricBoiler tileEntity = (TileEntityThermoelectricBoiler)data.location.getTileEntity(worldObj);
|
||||
TileEntityBoilerCasing tileEntity = (TileEntityBoilerCasing)data.location.getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity != null)
|
||||
{
|
||||
+2
-2
@@ -11,12 +11,12 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
public class TileEntityThermoelectricValve extends TileEntityThermoelectricBoiler implements IFluidHandler
|
||||
public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFluidHandler
|
||||
{
|
||||
public BoilerTank waterTank;
|
||||
public BoilerTank steamTank;
|
||||
|
||||
public TileEntityThermoelectricValve()
|
||||
public TileEntityBoilerValve()
|
||||
{
|
||||
super("Boiler Valve");
|
||||
waterTank = new BoilerWaterTank(this);
|
||||
@@ -1,6 +1,5 @@
|
||||
package mekanism.common.tile;
|
||||
|
||||
|
||||
public class TileEntityPressureDisperser extends TileEntityBasicBlock
|
||||
{
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package mekanism.common.tile;
|
||||
|
||||
public class TileEntitySuperheatingElement extends TileEntityBasicBlock
|
||||
{
|
||||
@Override
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {}
|
||||
}
|
||||
@@ -60,7 +60,6 @@ public class GeneratorsCommonProxy implements IGuiProvider
|
||||
GameRegistry.registerTileEntity(TileEntityReactorPort.class, "ReactorPort");
|
||||
GameRegistry.registerTileEntity(TileEntityReactorLogicAdapter.class, "ReactorLogicAdapter");
|
||||
GameRegistry.registerTileEntity(TileEntityRotationalComplex.class, "RotationalComplex");
|
||||
GameRegistry.registerTileEntity(TileEntityPressureDisperser.class, "PressureDisperser");
|
||||
GameRegistry.registerTileEntity(TileEntityElectromagneticCoil.class, "ElectromagneticCoil");
|
||||
}
|
||||
|
||||
|
||||
@@ -143,19 +143,16 @@ public class MekanismGenerators implements IModule
|
||||
"SAS", "CAC", "SAS", Character.valueOf('S'), "ingotSteel", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('C'), "circuitAdvanced"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 9), new Object[] {
|
||||
"SFS", "FAF", "SFS", Character.valueOf('S'), "ingotSteel", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('F'), Blocks.iron_bars
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 1, 10), new Object[] {
|
||||
"SGS", "GEG", "SGS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "ingotGold", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 4, 11), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 4, 10), new Object[] {
|
||||
" S ", "SOS", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('O'), "ingotOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 2, 12), new Object[] {
|
||||
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Generator, 1, 11), Character.valueOf('C'), "circuitAdvanced"
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 2, 11), new Object[] {
|
||||
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Generator, 1, 10), Character.valueOf('C'), "circuitAdvanced"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 2, 13), new Object[] {
|
||||
" I ", "IFI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Generator, 1, 11), Character.valueOf('F'), Blocks.iron_bars
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(GeneratorsBlocks.Generator, 2, 12), new Object[] {
|
||||
" I ", "IFI", " I ", Character.valueOf('I'), new ItemStack(GeneratorsBlocks.Generator, 1, 10), Character.valueOf('F'), Blocks.iron_bars
|
||||
}));
|
||||
|
||||
//Reactor Recipes
|
||||
|
||||
@@ -20,7 +20,6 @@ import mekanism.common.multiblock.IMultiblock;
|
||||
import mekanism.common.tile.TileEntityBasicBlock;
|
||||
import mekanism.common.tile.TileEntityContainerBlock;
|
||||
import mekanism.common.tile.TileEntityElectricBlock;
|
||||
import mekanism.common.tile.TileEntityPressureDisperser;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.generators.common.GeneratorsBlocks;
|
||||
@@ -59,7 +58,6 @@ import buildcraft.api.tools.IToolWrench;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
/**
|
||||
* Block class for handling multiple generator block IDs.
|
||||
* 0: Heat Generator
|
||||
@@ -70,11 +68,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
* 6: Wind Generator
|
||||
* 7: Turbine Rotor
|
||||
* 8: Rotational Complex
|
||||
* 9: Pressure Disperser
|
||||
* 10: Electromagnetic Coil
|
||||
* 11: Turbine Casing
|
||||
* 12: Turbine Valve
|
||||
* 13: Turbine Vent
|
||||
* 9: Electromagnetic Coil
|
||||
* 10: Turbine Casing
|
||||
* 11: Turbine Valve
|
||||
* 12: Turbine Vent
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
@@ -102,20 +99,19 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
|
||||
{
|
||||
BASE_ICON = register.registerIcon("mekanism:SteelCasing");
|
||||
|
||||
ctms[10] = new CTMData("ctm/ElectromagneticCoil", this, Arrays.asList(10)).registerIcons(register);
|
||||
ctms[11] = new CTMData("ctm/TurbineCasing", this, Arrays.asList(11, 12, 13)).registerIcons(register);
|
||||
ctms[12] = new CTMData("ctm/TurbineValve", this, Arrays.asList(11, 12, 13)).registerIcons(register);
|
||||
ctms[13] = new CTMData("ctm/TurbineVent", this, Arrays.asList(11, 12, 13)).registerIcons(register);
|
||||
ctms[9] = new CTMData("ctm/ElectromagneticCoil", this, Arrays.asList(9)).registerIcons(register);
|
||||
ctms[10] = new CTMData("ctm/TurbineCasing", this, Arrays.asList(10, 11, 12)).registerIcons(register);
|
||||
ctms[11] = new CTMData("ctm/TurbineValve", this, Arrays.asList(10, 11, 12)).registerIcons(register);
|
||||
ctms[12] = new CTMData("ctm/TurbineVent", this, Arrays.asList(10, 11, 12)).registerIcons(register);
|
||||
|
||||
icons[7][0] = register.registerIcon("mekanism:TurbineRod");
|
||||
icons[8][0] = register.registerIcon("mekanism:RotationalComplexSide");
|
||||
icons[8][1] = register.registerIcon("mekanism:RotationalComplexTop");
|
||||
icons[9][0] = register.registerIcon("mekanism:PressureDisperser");
|
||||
|
||||
icons[9][0] = ctms[9].mainTextureData.icon;
|
||||
icons[10][0] = ctms[10].mainTextureData.icon;
|
||||
icons[11][0] = ctms[11].mainTextureData.icon;
|
||||
icons[12][0] = ctms[12].mainTextureData.icon;
|
||||
icons[13][0] = ctms[13].mainTextureData.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -724,11 +720,10 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
|
||||
WIND_GENERATOR(6, "WindGenerator", 5, 200000, TileEntityWindGenerator.class, true),
|
||||
TURBINE_ROTOR(7, "TurbineRotor", -1, -1, TileEntityTurbineRotor.class, false),
|
||||
ROTATIONAL_COMPLEX(8, "RotationalComplex", -1, -1, TileEntityRotationalComplex.class, false),
|
||||
PRESSURE_DISPERSER(9, "PressureDisperser", -1, -1, TileEntityPressureDisperser.class, false),
|
||||
ELECTROMAGNETIC_COIL(10, "ElectromagneticCoil", -1, -1, TileEntityElectromagneticCoil.class, false),
|
||||
TURBINE_CASING(11, "TurbineCasing", -1, -1, TileEntityTurbineCasing.class, false),
|
||||
TURBINE_VALVE(12, "TurbineValve", -1, -1, TileEntityTurbineValve.class, false),
|
||||
TURBINE_VENT(13, "TurbineVent", -1, -1, TileEntityTurbineVent.class, false);
|
||||
ELECTROMAGNETIC_COIL(9, "ElectromagneticCoil", -1, -1, TileEntityElectromagneticCoil.class, false),
|
||||
TURBINE_CASING(10, "TurbineCasing", -1, -1, TileEntityTurbineCasing.class, false),
|
||||
TURBINE_VALVE(11, "TurbineValve", -1, -1, TileEntityTurbineValve.class, false),
|
||||
TURBINE_VENT(12, "TurbineVent", -1, -1, TileEntityTurbineVent.class, false);
|
||||
|
||||
public int meta;
|
||||
public String name;
|
||||
|
||||
@@ -48,11 +48,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
* 6: Wind Generator
|
||||
* 7: Turbine Rotor
|
||||
* 8: Rotational Complex
|
||||
* 9: Pressure Disperser
|
||||
* 10: Electromagnetic Coil
|
||||
* 11: Turbine Casing
|
||||
* 12: Turbine Valve
|
||||
* 13: Turbine Vent
|
||||
* 9: Electromagnetic Coil
|
||||
* 10: Turbine Casing
|
||||
* 11: Turbine Valve
|
||||
* 12: Turbine Vent
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user