new missile part textures, analyzer, battery fix, stray safes
@ -1505,6 +1505,7 @@ item.thruster_large.name=Großes Raketentriebwerk
|
|||||||
item.wand_k.name=Konstruktions-Zauberstab
|
item.wand_k.name=Konstruktions-Zauberstab
|
||||||
item.wand_s.name=Struktur-Zauberstab
|
item.wand_s.name=Struktur-Zauberstab
|
||||||
item.wand_d.name=Debug-Zauberstab
|
item.wand_d.name=Debug-Zauberstab
|
||||||
|
item.analyzer.name=Analysierer
|
||||||
|
|
||||||
item.screwdriver.name=Schraubenzieher
|
item.screwdriver.name=Schraubenzieher
|
||||||
item.overfuse.name=Singularitätsschraubenzieher
|
item.overfuse.name=Singularitätsschraubenzieher
|
||||||
@ -1576,7 +1577,10 @@ item.cape_ayy.name=Ayys Cape
|
|||||||
|
|
||||||
tile.machine_converter_he_rf.name=HE zu RF Konverter
|
tile.machine_converter_he_rf.name=HE zu RF Konverter
|
||||||
tile.machine_converter_rf_he.name=RF zu HE Konverter
|
tile.machine_converter_rf_he.name=RF zu HE Konverter
|
||||||
tile.machine_transformer.name=Transformator
|
tile.machine_transformer.name=10k-20Hz-Transformator
|
||||||
|
tile.machine_transformer_dnt.name=DNT-20Hz-Transformator
|
||||||
|
tile.machine_transformer_20.name=10k-1Hz-Transformator
|
||||||
|
tile.machine_transformer_dnt_20.name=DNT-1Hz-Transformator
|
||||||
|
|
||||||
tile.vent_chlorine.name=Chlorgas-Auslass
|
tile.vent_chlorine.name=Chlorgas-Auslass
|
||||||
tile.vent_cloud.name=Wolken-Auslass
|
tile.vent_cloud.name=Wolken-Auslass
|
||||||
|
|||||||
@ -1505,6 +1505,7 @@ item.thruster_large.name=Large Thruster
|
|||||||
item.wand_k.name=Construction Wand
|
item.wand_k.name=Construction Wand
|
||||||
item.wand_s.name=Structure Wand
|
item.wand_s.name=Structure Wand
|
||||||
item.wand_d.name=Debug Wand
|
item.wand_d.name=Debug Wand
|
||||||
|
item.analyzer.name=Analyzer
|
||||||
|
|
||||||
item.screwdriver.name=Screwdriver
|
item.screwdriver.name=Screwdriver
|
||||||
item.overfuse.name=Singularity Screwdriver
|
item.overfuse.name=Singularity Screwdriver
|
||||||
@ -1576,7 +1577,10 @@ item.cape_ayy.name=Ayy's Cape
|
|||||||
|
|
||||||
tile.machine_converter_he_rf.name=HE to RF Converter
|
tile.machine_converter_he_rf.name=HE to RF Converter
|
||||||
tile.machine_converter_rf_he.name=RF to HE Converter
|
tile.machine_converter_rf_he.name=RF to HE Converter
|
||||||
tile.machine_transformer.name=Transformer
|
tile.machine_transformer.name=10k-20Hz Transformer
|
||||||
|
tile.machine_transformer_dnt.name=DNT-20Hz Transformer
|
||||||
|
tile.machine_transformer_20.name=10k-1Hz Transformer
|
||||||
|
tile.machine_transformer_dnt_20.name=DNT-1Hz Transformer
|
||||||
|
|
||||||
tile.vent_chlorine.name=Chlorine Vent
|
tile.vent_chlorine.name=Chlorine Vent
|
||||||
tile.vent_cloud.name=Cloud Vent
|
tile.vent_cloud.name=Cloud Vent
|
||||||
|
|||||||
BIN
assets/hbm/textures/items/analyzer.png
Normal file
|
After Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 269 B |
BIN
assets/hbm/textures/items/fuel_tank_large_alt.png
Normal file
|
After Width: | Height: | Size: 203 B |
|
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 362 B |
BIN
assets/hbm/textures/items/fuel_tank_medium_alt.png
Normal file
|
After Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 292 B |
BIN
assets/hbm/textures/items/fuel_tank_small_alt.png
Normal file
|
After Width: | Height: | Size: 291 B |
BIN
assets/hbm/textures/items/grenade_if_antioch.png
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
assets/hbm/textures/items/grenade_if_antioch_alt.png
Normal file
|
After Width: | Height: | Size: 341 B |
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 207 B |
BIN
assets/hbm/textures/items/plan_c_alt.png
Normal file
|
After Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 461 B |
BIN
assets/hbm/textures/items/thruster_large_alt.png
Normal file
|
After Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 399 B |
BIN
assets/hbm/textures/items/thruster_medium_alt.png
Normal file
|
After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 326 B |
BIN
assets/hbm/textures/items/thruster_small_alt.png
Normal file
|
After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 256 B |
BIN
assets/hbm/textures/items/warhead_mirv_alt.png
Normal file
|
After Width: | Height: | Size: 187 B |
|
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 249 B |
BIN
assets/hbm/textures/items/warhead_thermo_endo_alt.png
Normal file
|
After Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 246 B |
BIN
assets/hbm/textures/items/warhead_thermo_exo_alt.png
Normal file
|
After Width: | Height: | Size: 231 B |
@ -336,6 +336,9 @@ public class ModBlocks {
|
|||||||
public static Block fluid_duct;
|
public static Block fluid_duct;
|
||||||
|
|
||||||
public static Block machine_transformer;
|
public static Block machine_transformer;
|
||||||
|
public static Block machine_transformer_20;
|
||||||
|
public static Block machine_transformer_dnt;
|
||||||
|
public static Block machine_transformer_dnt_20;
|
||||||
|
|
||||||
public static Block bomb_multi_large;
|
public static Block bomb_multi_large;
|
||||||
public static final int guiID_bomb_multi_large = 18;
|
public static final int guiID_bomb_multi_large = 18;
|
||||||
@ -828,8 +831,11 @@ public class ModBlocks {
|
|||||||
gas_duct_solid = new GasDuctSolid(Material.iron).setBlockName("gas_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_solid");
|
gas_duct_solid = new GasDuctSolid(Material.iron).setBlockName("gas_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_solid");
|
||||||
gas_duct = new BlockGasDuct(Material.iron).setBlockName("gas_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_icon");
|
gas_duct = new BlockGasDuct(Material.iron).setBlockName("gas_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_icon");
|
||||||
fluid_duct = new BlockFluidDuct(Material.iron).setBlockName("fluid_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_icon");
|
fluid_duct = new BlockFluidDuct(Material.iron).setBlockName("fluid_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_icon");
|
||||||
|
|
||||||
machine_transformer = new MachineTransformer(Material.iron).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer");
|
machine_transformer = new MachineTransformer(Material.iron, 10000L, 1).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||||
|
machine_transformer_dnt = new MachineTransformer(Material.iron, 1000000000000000L, 1).setBlockName("machine_transformer_dnt").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer");
|
||||||
|
machine_transformer_20 = new MachineTransformer(Material.iron, 10000L, 20).setBlockName("machine_transformer_20").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||||
|
machine_transformer_dnt_20 = new MachineTransformer(Material.iron, 1000000000000000L, 20).setBlockName("machine_transformer_dnt_20").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer");
|
||||||
|
|
||||||
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
||||||
machine_telelinker = new MachineTeleLinker(Material.iron).setBlockName("machine_telelinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":machine_telelinker_side");
|
machine_telelinker = new MachineTeleLinker(Material.iron).setBlockName("machine_telelinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":machine_telelinker_side");
|
||||||
@ -1021,7 +1027,7 @@ public class ModBlocks {
|
|||||||
dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
dummy_block_vault = new DummyBlockVault(Material.iron).setBlockName("dummy_block_vault").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
dummy_block_blast = new DummyBlockBlast(Material.iron).setBlockName("dummy_block_blast").setHardness(10.0F).setResistance(10000.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
dummy_block_gascent = new DummyBlockMachine(Material.iron, guiID_gascent, machine_gascent).setBlockName("dummy_block_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
dummy_block_gascent = new DummyBlockMachine(Material.iron, guiID_gascent, machine_gascent).setBlockName("dummy_block_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
dummy_block_uf6 = new DummyBlockMachine(Material.iron, guiID_uf6_tank, machine_uf6_tank).setBlockName("dummy_block_uf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
dummy_block_uf6 = new DummyBlockMachine(Material.iron, guiID_uf6_tank, machine_uf6_tank).setBlockName("dummy_block_uf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium");
|
||||||
dummy_block_puf6 = new DummyBlockMachine(Material.iron, guiID_puf6_tank, machine_puf6_tank).setBlockName("dummy_block_puf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
dummy_block_puf6 = new DummyBlockMachine(Material.iron, guiID_puf6_tank, machine_puf6_tank).setBlockName("dummy_block_puf6").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
ntm_dirt = new BlockNTMDirt().setBlockName("ntm_dirt").setHardness(0.5F).setStepSound(Block.soundTypeGravel).setCreativeTab(null).setBlockTextureName("dirt");
|
ntm_dirt = new BlockNTMDirt().setBlockName("ntm_dirt").setHardness(0.5F).setStepSound(Block.soundTypeGravel).setCreativeTab(null).setBlockTextureName("dirt");
|
||||||
@ -1305,6 +1311,9 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(machine_schrabidium_battery, machine_schrabidium_battery.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_schrabidium_battery, machine_schrabidium_battery.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_dineutronium_battery, machine_dineutronium_battery.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_dineutronium_battery, machine_dineutronium_battery.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_transformer, machine_transformer.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_transformer, machine_transformer.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(machine_transformer_20, machine_transformer_20.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(machine_transformer_dnt, machine_transformer_dnt.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(machine_transformer_dnt_20, machine_transformer_dnt_20.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_converter_he_rf, machine_converter_he_rf.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_converter_he_rf, machine_converter_he_rf.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_electric_furnace_off, machine_electric_furnace_off.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_electric_furnace_off, machine_electric_furnace_off.getUnlocalizedName());
|
||||||
|
|||||||
@ -140,23 +140,9 @@ public class MachineBattery extends BlockContainer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
return new TileEntityMachineBattery();
|
return new TileEntityMachineBattery(maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_)
|
|
||||||
{
|
|
||||||
TileEntityMachineBattery entity = (TileEntityMachineBattery) p_149695_1_.getTileEntity(x, y, z);
|
|
||||||
if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z))
|
|
||||||
{
|
|
||||||
entity.conducts = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
entity.conducts = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
if(world.isRemote)
|
if(world.isRemote)
|
||||||
|
|||||||
@ -15,20 +15,31 @@ import net.minecraft.util.IIcon;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class MachineTransformer extends BlockContainer {
|
public class MachineTransformer extends BlockContainer {
|
||||||
|
|
||||||
|
long buffer;
|
||||||
|
int delay;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconTop;
|
private IIcon iconTop;
|
||||||
|
|
||||||
public MachineTransformer(Material p_i45394_1_) {
|
public MachineTransformer(Material p_i45394_1_, long b, int d) {
|
||||||
super(p_i45394_1_);
|
super(p_i45394_1_);
|
||||||
|
buffer = b;
|
||||||
|
delay = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
|
||||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top");
|
if(this == ModBlocks.machine_transformer || this == ModBlocks.machine_transformer_20) {
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer");
|
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top_iron");
|
||||||
|
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_iron");
|
||||||
|
}
|
||||||
|
if(this == ModBlocks.machine_transformer_dnt || this == ModBlocks.machine_transformer_dnt_20) {
|
||||||
|
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top");
|
||||||
|
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -39,6 +50,6 @@ public class MachineTransformer extends BlockContainer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
return new TileEntityMachineTransformer();
|
return new TileEntityMachineTransformer(buffer, delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ public class FluidTypeHandler {
|
|||||||
NONE (0x888888, 8947848, 0, 1, 1, "hbmfluid.none"),
|
NONE (0x888888, 8947848, 0, 1, 1, "hbmfluid.none"),
|
||||||
|
|
||||||
WATER (0x3333FF, 3355647, 1, 1, 1, "hbmfluid.water"),
|
WATER (0x3333FF, 3355647, 1, 1, 1, "hbmfluid.water"),
|
||||||
STEAM (0xe5e5e5, 15066597, 9, 1, 1, "hbmfluid.steam"),
|
STEAM (0xe5e5e5, 15066597, 9, 2, 1, "hbmfluid.steam"),
|
||||||
COOLANT (0xd8fcff, 14220543, 2, 1, 1, "hbmfluid.coolant"),
|
COOLANT (0xd8fcff, 14220543, 2, 1, 1, "hbmfluid.coolant"),
|
||||||
|
|
||||||
LAVA (0xFF3300, 16724736, 3, 1, 1, "hbmfluid.lava"),
|
LAVA (0xFF3300, 16724736, 3, 1, 1, "hbmfluid.lava"),
|
||||||
|
|||||||
@ -2,12 +2,8 @@ package com.hbm.interfaces;
|
|||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
|
|
||||||
public interface IFluidAcceptor {
|
public interface IFluidAcceptor extends IFluidContainer {
|
||||||
|
|
||||||
void setAFluidFill(int i, FluidType type);
|
int getMaxFluidFill(FluidType type);
|
||||||
|
|
||||||
int getAFluidFill(FluidType type);
|
|
||||||
|
|
||||||
int getMaxAFluidFill(FluidType type);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,24 @@
|
|||||||
package com.hbm.interfaces;
|
package com.hbm.interfaces;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
|
import com.hbm.inventory.FluidTank;
|
||||||
|
|
||||||
public interface IFluidContainer {
|
public interface IFluidContainer {
|
||||||
|
|
||||||
//Args: fill, what the fill should be set to; index, index for array if there are multiple tanks
|
//Args: fill, what the fill should be set to; index, index for array if there are multiple tanks
|
||||||
public void setFillstate(int fill, int index);
|
public void setFillstate(int fill, int index);
|
||||||
|
|
||||||
|
//Args: fill: what the fill should be set to; type, what type the tank in question has
|
||||||
|
void setFluidFill(int fill, FluidType type);
|
||||||
|
|
||||||
//Args: type, what the type should be set to; index, index for array if there are multiple tanks
|
//Args: type, what the type should be set to; index, index for array if there are multiple tanks
|
||||||
public void setType(FluidType type, int index);
|
public void setType(FluidType type, int index);
|
||||||
|
|
||||||
|
public List<FluidTank> getTanks();
|
||||||
|
|
||||||
|
//Args: type, what type the tank in question has
|
||||||
|
int getFluidFill(FluidType type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
package com.hbm.interfaces;
|
package com.hbm.interfaces;
|
||||||
|
|
||||||
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
|
|
||||||
public interface IFluidDuct {
|
public interface IFluidDuct {
|
||||||
|
|
||||||
|
public FluidType getType();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,15 +4,13 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
|
|
||||||
public interface IFluidSource {
|
public interface IFluidSource extends IFluidContainer {
|
||||||
|
|
||||||
void fillFluidInit(FluidType type);
|
void fillFluidInit(FluidType type);
|
||||||
|
|
||||||
void fillFluid(int x, int y, int z, boolean newTact, FluidType type);
|
void fillFluid(int x, int y, int z, boolean newTact, FluidType type);
|
||||||
|
|
||||||
boolean getTact();
|
boolean getTact();
|
||||||
int getSFluidFill(FluidType type);
|
|
||||||
void setSFluidFill(int i, FluidType type);
|
|
||||||
List<IFluidAcceptor> getFluidList(FluidType type);
|
List<IFluidAcceptor> getFluidList(FluidType type);
|
||||||
void clearFluidList(FluidType type);
|
void clearFluidList(FluidType type);
|
||||||
|
|
||||||
|
|||||||
@ -2869,7 +2869,7 @@ public class MachineRecipes {
|
|||||||
list.add(new ItemStack(ModItems.ingot_combine_steel, 32));
|
list.add(new ItemStack(ModItems.ingot_combine_steel, 32));
|
||||||
list.add(new ItemStack(ModItems.coil_magnetized_tungsten, 8));
|
list.add(new ItemStack(ModItems.coil_magnetized_tungsten, 8));
|
||||||
break;
|
break;
|
||||||
case HE_TO_RF:
|
/*case HE_TO_RF:
|
||||||
list.add(new ItemStack(ModItems.ingot_steel, 4));
|
list.add(new ItemStack(ModItems.ingot_steel, 4));
|
||||||
list.add(new ItemStack(ModItems.plate_steel, 4));
|
list.add(new ItemStack(ModItems.plate_steel, 4));
|
||||||
list.add(new ItemStack(ModItems.coil_copper, 2));
|
list.add(new ItemStack(ModItems.coil_copper, 2));
|
||||||
@ -2880,7 +2880,7 @@ public class MachineRecipes {
|
|||||||
list.add(new ItemStack(ModItems.plate_steel, 4));
|
list.add(new ItemStack(ModItems.plate_steel, 4));
|
||||||
list.add(new ItemStack(ModItems.coil_copper, 2));
|
list.add(new ItemStack(ModItems.coil_copper, 2));
|
||||||
list.add(new ItemStack(ModItems.coil_copper_torus, 1));
|
list.add(new ItemStack(ModItems.coil_copper_torus, 1));
|
||||||
break;
|
break;*/
|
||||||
case SHREDDER:
|
case SHREDDER:
|
||||||
list.add(new ItemStack(ModItems.ingot_steel, 2));
|
list.add(new ItemStack(ModItems.ingot_steel, 2));
|
||||||
list.add(new ItemStack(ModItems.plate_steel, 4));
|
list.add(new ItemStack(ModItems.plate_steel, 4));
|
||||||
@ -4177,12 +4177,12 @@ public class MachineRecipes {
|
|||||||
case BATTERY_D:
|
case BATTERY_D:
|
||||||
output = new ItemStack(ModBlocks.machine_dineutronium_battery, 1);
|
output = new ItemStack(ModBlocks.machine_dineutronium_battery, 1);
|
||||||
break;
|
break;
|
||||||
case HE_TO_RF:
|
/*case HE_TO_RF:
|
||||||
output = new ItemStack(ModBlocks.machine_converter_he_rf, 1);
|
output = new ItemStack(ModBlocks.machine_converter_he_rf, 1);
|
||||||
break;
|
break;
|
||||||
case RF_TO_HE:
|
case RF_TO_HE:
|
||||||
output = new ItemStack(ModBlocks.machine_converter_rf_he, 1);
|
output = new ItemStack(ModBlocks.machine_converter_rf_he, 1);
|
||||||
break;
|
break;*/
|
||||||
case SHREDDER:
|
case SHREDDER:
|
||||||
output = new ItemStack(ModBlocks.machine_shredder, 1);
|
output = new ItemStack(ModBlocks.machine_shredder, 1);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -68,7 +68,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int getPageCount() {
|
int getPageCount() {
|
||||||
return (int)Math.ceil(stacks.size() / (5 * 7));
|
return (int)Math.ceil((stacks.size() - 1) / (5 * 7));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateScreen() {
|
public void updateScreen() {
|
||||||
|
|||||||
@ -1141,6 +1141,7 @@ public class ModItems {
|
|||||||
public static Item wand;
|
public static Item wand;
|
||||||
public static Item wand_s;
|
public static Item wand_s;
|
||||||
public static Item wand_d;
|
public static Item wand_d;
|
||||||
|
public static Item analyzer;
|
||||||
|
|
||||||
public static Item cape_test;
|
public static Item cape_test;
|
||||||
public static Item cape_radiation;
|
public static Item cape_radiation;
|
||||||
@ -2290,6 +2291,7 @@ public class ModItems {
|
|||||||
wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand");
|
wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand");
|
||||||
wand_s = new ItemWandS().setUnlocalizedName("wand_s").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s");
|
wand_s = new ItemWandS().setUnlocalizedName("wand_s").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s");
|
||||||
wand_d = new ItemWandD().setUnlocalizedName("wand_d").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_d");
|
wand_d = new ItemWandD().setUnlocalizedName("wand_d").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_d");
|
||||||
|
analyzer = new ItemAnalyzer().setUnlocalizedName("analyzer").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":analyzer");
|
||||||
|
|
||||||
nuke_starter_kit = new ItemStarterKit().setUnlocalizedName("nuke_starter_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":nuke_starter_kit");
|
nuke_starter_kit = new ItemStarterKit().setUnlocalizedName("nuke_starter_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":nuke_starter_kit");
|
||||||
nuke_advanced_kit = new ItemStarterKit().setUnlocalizedName("nuke_advanced_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":nuke_advanced_kit");
|
nuke_advanced_kit = new ItemStarterKit().setUnlocalizedName("nuke_advanced_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":nuke_advanced_kit");
|
||||||
@ -3931,6 +3933,7 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(wand, wand.getUnlocalizedName());
|
GameRegistry.registerItem(wand, wand.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(wand_s, wand_s.getUnlocalizedName());
|
GameRegistry.registerItem(wand_s, wand_s.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(wand_d, wand_d.getUnlocalizedName());
|
GameRegistry.registerItem(wand_d, wand_d.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(analyzer, analyzer.getUnlocalizedName());
|
||||||
//GameRegistry.registerItem(remote, remote.getUnlocalizedName());
|
//GameRegistry.registerItem(remote, remote.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName());
|
GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(polaroid, polaroid.getUnlocalizedName());
|
GameRegistry.registerItem(polaroid, polaroid.getUnlocalizedName());
|
||||||
|
|||||||
137
com/hbm/items/tool/ItemAnalyzer.java
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
package com.hbm.items.tool;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.interfaces.IConsumer;
|
||||||
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
|
import com.hbm.interfaces.IFluidDuct;
|
||||||
|
import com.hbm.interfaces.ISource;
|
||||||
|
import com.hbm.inventory.FluidTank;
|
||||||
|
import com.hbm.tileentity.conductor.TileEntityPylonRedWire;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityLockableBase;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.inventory.ISidedInventory;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class ItemAnalyzer extends Item {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int b, float f0, float f1, float f2)
|
||||||
|
{
|
||||||
|
Block block = world.getBlock(x, y, z);
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(!world.isRemote) {
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Block: " + I18n.format(block.getUnlocalizedName() + ".name") + " (" + block.getUnlocalizedName() + ")"
|
||||||
|
));
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Meta: " + world.getBlockMetadata(x, y, z)
|
||||||
|
));
|
||||||
|
|
||||||
|
if(te == null) {
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Tile Entity: none"));
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(te instanceof TileEntityDummy) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Dummy Block, references TE at " + ((TileEntityDummy)te).targetX + " / " + ((TileEntityDummy)te).targetY + " / " + ((TileEntityDummy)te).targetZ));
|
||||||
|
|
||||||
|
te = world.getTileEntity(((TileEntityDummy)te).targetX, ((TileEntityDummy)te).targetY, ((TileEntityDummy)te).targetZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] parts = te.toString().split("\\.");
|
||||||
|
|
||||||
|
if(parts.length == 0)
|
||||||
|
parts = new String[]{"error"};
|
||||||
|
|
||||||
|
String post = parts[parts.length - 1];
|
||||||
|
String name = post.split("@")[0];
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Tile Entity: " + name));
|
||||||
|
|
||||||
|
if(te instanceof IInventory) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Slots: " + ((IInventory)te).getSizeInventory()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te instanceof IConsumer) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Electricity: " + ((IConsumer)te).getPower() + " HE"));
|
||||||
|
} else if(te instanceof ISource) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Electricity: " + ((ISource)te).getSPower() + " HE"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te instanceof IFluidContainer) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Fluid Tanks:"));
|
||||||
|
|
||||||
|
List<FluidTank> tanks = ((IFluidContainer)te).getTanks();
|
||||||
|
|
||||||
|
for(int i = 0; i < tanks.size(); i++) {
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
" *Tank " + (i + 1) + ": " + tanks.get(i).getFill() + "mB " + I18n.format(tanks.get(i).getTankType().getUnlocalizedName())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te instanceof IFluidDuct) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Duct Type: " + I18n.format(((IFluidDuct)te).getType().getUnlocalizedName())));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te instanceof TileEntityPylonRedWire) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Connections:"));
|
||||||
|
|
||||||
|
List<TileEntityPylonRedWire> connections = ((TileEntityPylonRedWire)te).connected;
|
||||||
|
|
||||||
|
for(int i = 0; i < connections.size(); i++) {
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
" *" + connections.get(i).xCoord + " / " + connections.get(i).yCoord + " / " + connections.get(i).zCoord));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te instanceof TileEntityLockableBase) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Locked: " + ((TileEntityLockableBase)te).isLocked()));
|
||||||
|
|
||||||
|
if(((TileEntityLockableBase)te).isLocked()) {
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Pins: " + ((TileEntityLockableBase)te).getPins()));
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"Pick Chance: " + (((TileEntityLockableBase)te).getMod() * 100D) + "%"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText(
|
||||||
|
"----------------------------"
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -167,8 +167,8 @@ public class ItemAssemblyTemplate extends Item {
|
|||||||
BATTERY_L,
|
BATTERY_L,
|
||||||
BATTERY_S,
|
BATTERY_S,
|
||||||
BATTERY_D,
|
BATTERY_D,
|
||||||
HE_TO_RF,
|
//HE_TO_RF,
|
||||||
RF_TO_HE,
|
//RF_TO_HE,
|
||||||
SHREDDER,
|
SHREDDER,
|
||||||
DERRICK,
|
DERRICK,
|
||||||
PUMPJACK,
|
PUMPJACK,
|
||||||
@ -634,10 +634,10 @@ public class ItemAssemblyTemplate extends Item {
|
|||||||
return 800;
|
return 800;
|
||||||
case BATTERY_D:
|
case BATTERY_D:
|
||||||
return 1600;
|
return 1600;
|
||||||
case HE_TO_RF:
|
//case HE_TO_RF:
|
||||||
return 150;
|
// return 150;
|
||||||
case RF_TO_HE:
|
//case RF_TO_HE:
|
||||||
return 150;
|
// return 150;
|
||||||
case SHREDDER:
|
case SHREDDER:
|
||||||
return 200;
|
return 200;
|
||||||
case DERRICK:
|
case DERRICK:
|
||||||
|
|||||||
@ -286,6 +286,10 @@ public class ItemClip extends Item {
|
|||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 3));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 3));
|
||||||
if(player.inventory.hasItem(ModItems.gun_revolver_pip))
|
if(player.inventory.hasItem(ModItems.gun_revolver_pip))
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_pip_ammo, 12));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_pip_ammo, 12));
|
||||||
|
if(player.inventory.hasItem(ModItems.gun_calamity))
|
||||||
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_calamity_ammo, 16));
|
||||||
|
if(player.inventory.hasItem(ModItems.gun_calamity_dual))
|
||||||
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_calamity_ammo, 32));
|
||||||
if(player.inventory.hasItem(ModItems.gun_rpg))
|
if(player.inventory.hasItem(ModItems.gun_rpg))
|
||||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 3));
|
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 3));
|
||||||
if(player.inventory.hasItem(ModItems.gun_stinger))
|
if(player.inventory.hasItem(ModItems.gun_stinger))
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.items.special.ItemBattery;
|
||||||
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -231,6 +232,73 @@ public class HbmChestContents {
|
|||||||
new WeightedRandomChestContent(ModItems.powder_niobium, 0, 1, 32, 1),
|
new WeightedRandomChestContent(ModItems.powder_niobium, 0, 1, 32, 1),
|
||||||
new WeightedRandomChestContent(ModItems.powder_tennessine, 0, 1, 32, 1),
|
new WeightedRandomChestContent(ModItems.powder_tennessine, 0, 1, 32, 1),
|
||||||
new WeightedRandomChestContent(ModItems.powder_cerium, 0, 1, 32, 1) };
|
new WeightedRandomChestContent(ModItems.powder_cerium, 0, 1, 32, 1) };
|
||||||
|
|
||||||
|
private static WeightedRandomChestContent[] vault1 = new WeightedRandomChestContent[] {
|
||||||
|
new WeightedRandomChestContent(Items.gold_ingot, 0, 3, 14, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.pin, 0, 8, 8, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_calamity, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 3, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.ingot_advanced_alloy, 0, 4, 12, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_calamity_ammo, 0, 24, 48, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 6, 12, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gas_mask_m65, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.grenade_if_he, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.grenade_if_incendiary, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(Items.diamond, 0, 1, 2, 1) };
|
||||||
|
|
||||||
|
private static WeightedRandomChestContent[] vault2 = new WeightedRandomChestContent[] {
|
||||||
|
new WeightedRandomChestContent(ModItems.ingot_desh, 0, 2, 6, 1),
|
||||||
|
new WeightedRandomChestContent(ItemBattery.getFullBattery(ModItems.battery_advanced_cell_4), 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.powder_desh_mix, 0, 1, 5, 1),
|
||||||
|
new WeightedRandomChestContent(Items.diamond, 0, 3, 6, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.ammo_container, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.grenade_smart, 0, 1, 6, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.powder_yellowcake, 0, 16, 24, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_uzi, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_uzi_silencer, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.clip_uzi, 0, 1, 3, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 12, 16, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 2, 6, 1) };
|
||||||
|
|
||||||
|
private static WeightedRandomChestContent[] vault3 = new WeightedRandomChestContent[] {
|
||||||
|
new WeightedRandomChestContent(ModItems.ingot_desh, 0, 6, 16, 1),
|
||||||
|
new WeightedRandomChestContent(ItemBattery.getFullBattery(ModItems.battery_lithium), 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.powder_power, 0, 1, 5, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.sat_chip, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(Items.diamond, 0, 5, 9, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.warhead_nuclear, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 3, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.ammo_container, 0, 1, 4, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 2, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.grenade_mirv, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.powder_yellowcake, 0, 26, 42, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.ingot_u235, 0, 3, 6, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_revolver_pip, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.clip_revolver_pip, 0, 2, 4, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 18, 32, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 6, 12, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 6, 12, 1) };
|
||||||
|
|
||||||
|
private static WeightedRandomChestContent[] vault4 = new WeightedRandomChestContent[] {
|
||||||
|
new WeightedRandomChestContent(ModItems.ammo_container, 0, 3, 6, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.clip_fatman, 0, 2, 3, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_mirv_ammo, 0, 2, 3, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_mirv, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_proto, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.gun_b92, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.ingot_combine_steel, 0, 16, 28, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 8, 18, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.man_core, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.boy_kit, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.nuke_starter_kit, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.weaponized_starblaster_cell, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.warhead_mirv, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ItemBattery.getFullBattery(ModItems.battery_schrabidium_cell), 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.powder_nitan_mix, 0, 16, 32, 1) };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param i
|
* @param i
|
||||||
@ -267,6 +335,14 @@ public class HbmChestContents {
|
|||||||
return spaceship;
|
return spaceship;
|
||||||
case 9:
|
case 9:
|
||||||
return powder;
|
return powder;
|
||||||
|
case 10:
|
||||||
|
return vault1;
|
||||||
|
case 11:
|
||||||
|
return vault2;
|
||||||
|
case 12:
|
||||||
|
return vault3;
|
||||||
|
case 13:
|
||||||
|
return vault4;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.tileentity.machine.TileEntitySafe;
|
||||||
import com.hbm.world.Antenna;
|
import com.hbm.world.Antenna;
|
||||||
import com.hbm.world.Barrel;
|
import com.hbm.world.Barrel;
|
||||||
import com.hbm.world.Bunker;
|
import com.hbm.world.Bunker;
|
||||||
@ -371,12 +372,14 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
int z = j + rand.nextInt(16);
|
int z = j + rand.nextInt(16);
|
||||||
int y = world.getHeightValue(x, z);
|
int y = world.getHeightValue(x, z);
|
||||||
|
|
||||||
if(world.getBlock(x, y, z).canPlaceTorchOnTop(world, x, y, z))
|
if(world.getBlock(x, y, z).canPlaceTorchOnTop(world, x, y, z)) {
|
||||||
world.setBlock(x, y + 1, z, ModBlocks.mine_ap);
|
world.setBlock(x, y + 1, z, ModBlocks.mine_ap);
|
||||||
|
|
||||||
if(MainRegistry.enableDebugMode)
|
if(MainRegistry.enableDebugMode)
|
||||||
MainRegistry.logger.info("[Debug] Successfully spawned landmine at " + x + " " + (y + 1) +" " + z);
|
MainRegistry.logger.info("[Debug] Successfully spawned landmine at " + x + " " + (y + 1) +" " + z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MainRegistry.enableRad && rand.nextInt(MainRegistry.radfreq) == 0 && biome == BiomeGenBase.desert) {
|
if (MainRegistry.enableRad && rand.nextInt(MainRegistry.radfreq) == 0 && biome == BiomeGenBase.desert) {
|
||||||
|
|
||||||
for (int a = 0; a < 1; a++) {
|
for (int a = 0; a < 1; a++) {
|
||||||
@ -394,6 +397,53 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
MainRegistry.logger.info("[Debug] Successfully spawned raditation hotspot at " + x + " " + z);
|
MainRegistry.logger.info("[Debug] Successfully spawned raditation hotspot at " + x + " " + z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MainRegistry.enableVaults && rand.nextInt(/*MainRegistry.vaultfreq*/ 1) == 0) {
|
||||||
|
int x = i + rand.nextInt(16);
|
||||||
|
int z = j + rand.nextInt(16);
|
||||||
|
int y = world.getHeightValue(x, z);
|
||||||
|
|
||||||
|
if(world.getBlock(x, y, z).canPlaceTorchOnTop(world, x, y, z)) {
|
||||||
|
world.setBlock(x, y + 1, z, ModBlocks.safe, rand.nextInt(4) + 2, 2);
|
||||||
|
|
||||||
|
switch(rand.nextInt(10)) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setPins(rand.nextInt(999) + 1);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setMod(1);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).lock();
|
||||||
|
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(10), (TileEntitySafe)world.getTileEntity(x, y + 1, z), rand.nextInt(4) + 3);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setPins(rand.nextInt(999) + 1);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setMod(0.1);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).lock();
|
||||||
|
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(11), (TileEntitySafe)world.getTileEntity(x, y + 1, z), rand.nextInt(3) + 2);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
case 8:
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setPins(rand.nextInt(999) + 1);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setMod(0.02);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).lock();
|
||||||
|
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(12), (TileEntitySafe)world.getTileEntity(x, y + 1, z), rand.nextInt(3) + 1);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setPins(rand.nextInt(999) + 1);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).setMod(0.0);
|
||||||
|
((TileEntitySafe)world.getTileEntity(x, y + 1, z)).lock();
|
||||||
|
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(13), (TileEntitySafe)world.getTileEntity(x, y + 1, z), rand.nextInt(2) + 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(MainRegistry.enableDebugMode)
|
||||||
|
MainRegistry.logger.info("[Debug] Successfully spawned safe at " + x + " " + (y + 1) +" " + z);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rand.nextInt(25) == 0) {
|
if (rand.nextInt(25) == 0) {
|
||||||
|
|||||||
@ -37,6 +37,7 @@ import com.hbm.tileentity.conductor.TileEntityWireCoated;
|
|||||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineBattery;
|
import com.hbm.tileentity.machine.TileEntityMachineBattery;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineFluidTank;
|
import com.hbm.tileentity.machine.TileEntityMachineFluidTank;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachineTransformer;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@ -382,15 +383,7 @@ public class Library {
|
|||||||
public static boolean checkFluidConnectables(World world, int x, int y, int z, FluidType type)
|
public static boolean checkFluidConnectables(World world, int x, int y, int z, FluidType type)
|
||||||
{
|
{
|
||||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||||
if(tileentity != null && tileentity instanceof TileEntityFluidDuct && ((TileEntityFluidDuct)tileentity).type == type)
|
if(tileentity != null && tileentity instanceof IFluidDuct && ((IFluidDuct)tileentity).getType() == type)
|
||||||
return true;
|
|
||||||
if(tileentity != null && tileentity instanceof TileEntityOilDuct && ((TileEntityOilDuct)tileentity).type == type)
|
|
||||||
return true;
|
|
||||||
if(tileentity != null && tileentity instanceof TileEntityGasDuct && ((TileEntityGasDuct)tileentity).type == type)
|
|
||||||
return true;
|
|
||||||
if(tileentity != null && tileentity instanceof TileEntityOilDuctSolid && ((TileEntityOilDuctSolid)tileentity).type == type)
|
|
||||||
return true;
|
|
||||||
if(tileentity != null && tileentity instanceof TileEntityGasDuctSolid && ((TileEntityGasDuctSolid)tileentity).type == type)
|
|
||||||
return true;
|
return true;
|
||||||
if((tileentity != null && (tileentity instanceof IFluidAcceptor ||
|
if((tileentity != null && (tileentity instanceof IFluidAcceptor ||
|
||||||
tileentity instanceof IFluidSource)) ||
|
tileentity instanceof IFluidSource)) ||
|
||||||
@ -947,15 +940,21 @@ public class Library {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tileentity instanceof IConsumer && newTact && !(tileentity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)tileentity).conducts))
|
//TE will not be added as consumer if:
|
||||||
|
// -TE is the source (will not send to itself)
|
||||||
|
// -TE is already full
|
||||||
|
// -TE is a battery set to output only
|
||||||
|
// -TE as well as source are transformers of the same frequency
|
||||||
|
if(tileentity instanceof IConsumer && newTact && !(tileentity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)tileentity).conducts) &&
|
||||||
|
tileentity != that && ((IConsumer)tileentity).getPower() < ((IConsumer)tileentity).getMaxPower() &&
|
||||||
|
!(tileentity instanceof TileEntityMachineTransformer && that instanceof TileEntityMachineTransformer &&
|
||||||
|
((TileEntityMachineTransformer)tileentity).delay == ((TileEntityMachineTransformer)that).delay))
|
||||||
{
|
{
|
||||||
that.getList().add((IConsumer)tileentity);
|
that.getList().add((IConsumer)tileentity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!newTact)
|
if(!newTact)
|
||||||
{
|
{
|
||||||
//TODO: fix energy distr. quirks
|
|
||||||
|
|
||||||
int size = that.getList().size();
|
int size = that.getList().size();
|
||||||
if(size > 0)
|
if(size > 0)
|
||||||
{
|
{
|
||||||
@ -1217,18 +1216,18 @@ public class Library {
|
|||||||
int size = that.getFluidList(type).size();
|
int size = that.getFluidList(type).size();
|
||||||
if(size > 0)
|
if(size > 0)
|
||||||
{
|
{
|
||||||
int part = that.getSFluidFill(type) / size;
|
int part = that.getFluidFill(type) / size;
|
||||||
for(IFluidAcceptor consume : that.getFluidList(type))
|
for(IFluidAcceptor consume : that.getFluidList(type))
|
||||||
{
|
{
|
||||||
if(consume.getAFluidFill(type) < consume.getMaxAFluidFill(type))
|
if(consume.getFluidFill(type) < consume.getMaxFluidFill(type))
|
||||||
{
|
{
|
||||||
if(consume.getMaxAFluidFill(type) - consume.getAFluidFill(type) >= part)
|
if(consume.getMaxFluidFill(type) - consume.getFluidFill(type) >= part)
|
||||||
{
|
{
|
||||||
that.setSFluidFill(that.getSFluidFill(type)-part, type);
|
that.setFluidFill(that.getFluidFill(type)-part, type);
|
||||||
consume.setAFluidFill(consume.getAFluidFill(type) + part, type);
|
consume.setFluidFill(consume.getFluidFill(type) + part, type);
|
||||||
} else {
|
} else {
|
||||||
that.setSFluidFill(that.getSFluidFill(type) - (consume.getMaxAFluidFill(type) - consume.getAFluidFill(type)), type);
|
that.setFluidFill(that.getFluidFill(type) - (consume.getMaxFluidFill(type) - consume.getFluidFill(type)), type);
|
||||||
consume.setAFluidFill(consume.getMaxAFluidFill(type), type);
|
consume.setFluidFill(consume.getMaxFluidFill(type), type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,7 +88,7 @@ public class CraftingManager {
|
|||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSalpeter", Items.coal }));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSalpeter", Items.coal }));
|
||||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSalpeter", new ItemStack(Items.coal, 1, 1) }));
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSalpeter", new ItemStack(Items.coal, 1, 1) }));
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cell_empty, 6), new Object[] { "SSS", "G G", "SSS", 'S', "plateSteel", 'G', Item.getItemFromBlock(Blocks.glass_pane) }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cell_empty, 6), new Object[] { "SSS", "G G", "SSS", 'S', "plateSteel", 'G', "paneGlass" }));
|
||||||
//GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_uf6, 1), new Object[] { ModItems.cell_empty, "dustUranium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket }));
|
//GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_uf6, 1), new Object[] { ModItems.cell_empty, "dustUranium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket }));
|
||||||
//GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_puf6, 1), new Object[] { ModItems.cell_empty, "dustPlutonium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket }));
|
//GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_puf6, 1), new Object[] { ModItems.cell_empty, "dustPlutonium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket }));
|
||||||
GameRegistry.addRecipe(new ItemStack(ModItems.cell_deuterium, 8), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.cell_empty, 'T', ModItems.mike_deut });
|
GameRegistry.addRecipe(new ItemStack(ModItems.cell_deuterium, 8), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.cell_empty, 'T', ModItems.mike_deut });
|
||||||
@ -557,9 +557,9 @@ public class CraftingManager {
|
|||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_deuterium), 1), new Object[] { "TIT", "RFR", "CCC", 'T', ModItems.tank_steel, 'I', "ingotTitanium", 'R', ModItems.wire_red_copper, 'F', Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 'C', ModItems.coil_tungsten }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_deuterium), 1), new Object[] { "TIT", "RFR", "CCC", 'T', ModItems.tank_steel, 'I', "ingotTitanium", 'R', ModItems.wire_red_copper, 'F', Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 'C', ModItems.coil_tungsten }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TST", "RIR", "TLT", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TST", "RIR", "TLT", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TLT", "RIR", "TST", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TLT", "RIR", "TST", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_coal_off), 1), new Object[] { "STS", "SCS", "SFS", 'S', "ingotSteel", 'T', ModItems.tank_steel, 'C', "ingotRedstoneAlloy", 'F', Blocks.furnace }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_coal_off, 1), new Object[] { "STS", "SCS", "SFS", 'S', "ingotSteel", 'T', ModItems.tank_steel, 'C', "ingotRedstoneAlloy", 'F', Blocks.furnace }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_converter_he_rf), 1), new Object[] { "SSS", "CRC", "SSS", 'S', "ingotSteel", 'C', ModItems.coil_copper, 'R', ModItems.coil_copper_torus }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_converter_he_rf, 1), new Object[] { "SSS", "CRB", "SSS", 'S', "ingotSteel", 'C', ModItems.coil_copper, 'R', ModItems.coil_copper_torus, 'B', "blockRedstone" }));
|
||||||
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_converter_rf_he), 1), new Object[] { "SSS", "CRC", "SSS", 'S', ModItems.ingot_beryllium, 'C', ModItems.coil_copper, 'R', ModItems.coil_copper_torus });
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_converter_rf_he, 1), new Object[] { "SSS", "BRC", "SSS", 'S', ModItems.ingot_beryllium, 'C', ModItems.coil_copper, 'R', ModItems.coil_copper_torus, 'B', "blockRedstone" }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_schrabidium_transmutator), 1), new Object[] { "TST", "ARA", "BBB", 'S', ModItems.nugget_schrabidium , 'T', "ingotTitanium", 'A', Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 'R', Item.getItemFromBlock(ModBlocks.machine_reactor), 'B', Item.getItemFromBlock(ModBlocks.machine_battery) }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_schrabidium_transmutator), 1), new Object[] { "TST", "ARA", "BBB", 'S', ModItems.nugget_schrabidium , 'T', "ingotTitanium", 'A', Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 'R', Item.getItemFromBlock(ModBlocks.machine_reactor), 'B', Item.getItemFromBlock(ModBlocks.machine_battery) }));
|
||||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_diesel), 1), new Object[] { "HTH", "PRP", "SFS", 'S', "ingotSteel", 'T', ModItems.tank_steel, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'R', "ingotRedstoneAlloy", 'F', Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off) }));
|
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_diesel), 1), new Object[] { "HTH", "PRP", "SFS", 'S', "ingotSteel", 'T', ModItems.tank_steel, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'R', "ingotRedstoneAlloy", 'F', Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off) }));
|
||||||
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_shredder), 1), new Object[] { "SHS", "MBM", "CFC", 'H', ModItems.hull_big_steel, 'S', ModBlocks.steel_beam, 'M', ModItems.motor, 'B', Blocks.iron_bars, 'C', ModBlocks.red_wire_coated, 'F', Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off) });
|
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_shredder), 1), new Object[] { "SHS", "MBM", "CFC", 'H', ModItems.hull_big_steel, 'S', ModBlocks.steel_beam, 'M', ModItems.motor, 'B', Blocks.iron_bars, 'C', ModBlocks.red_wire_coated, 'F', Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off) });
|
||||||
@ -1240,14 +1240,14 @@ public class CraftingManager {
|
|||||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.powder_desh_mix, 9), new Object[] { ModItems.powder_actinium, ModItems.powder_actinium, ModItems.powder_lanthanium, ModItems.powder_lanthanium, ModItems.powder_cerium, ModItems.powder_cobalt, ModItems.powder_lithium, ModItems.powder_neodymium, ModItems.powder_niobium });
|
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.powder_desh_mix, 9), new Object[] { ModItems.powder_actinium, ModItems.powder_actinium, ModItems.powder_lanthanium, ModItems.powder_lanthanium, ModItems.powder_cerium, ModItems.powder_cobalt, ModItems.powder_lithium, ModItems.powder_neodymium, ModItems.powder_niobium });
|
||||||
|
|
||||||
|
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.dynosphere_base), new Object[] { "RPR", "PBP", "RPR", 'R', "dustRedAlloy", 'P', "plateSteel", 'B', "blockRedstone" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.dynosphere_base), new Object[] { "RPR", "PBP", "RPR", 'R', "dustRedstoneAlloy", 'P', "plateSteel", 'B', "blockRedstone" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_desh), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_desh_mix, 'P', "ingotDesh", 'B', ModItems.dynosphere_base }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_desh), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_desh_mix, 'P', "ingotDesh", 'B', ModItems.dynosphere_base }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_schrabidium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_power, 'P', "ingotSchrabidium", 'B', ModItems.dynosphere_desh_charged }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_schrabidium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_power, 'P', "ingotSchrabidium", 'B', ModItems.dynosphere_desh_charged }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_euphemium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_nitan_mix, 'P', "ingotEuphemium", 'B', ModItems.dynosphere_schrabidium_charged }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_euphemium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_nitan_mix, 'P', "ingotEuphemium", 'B', ModItems.dynosphere_schrabidium_charged }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_dineutronium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_spark_mix, 'P', "ingotDineutronium", 'B', ModItems.dynosphere_euphemium_charged }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_dineutronium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_spark_mix, 'P', "ingotDineutronium", 'B', ModItems.dynosphere_euphemium_charged }));
|
||||||
|
|
||||||
//Temporary Crappy Recipes
|
//Temporary Crappy Recipes
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip, 1), new Object[] { " G ", "SSP", " TI", 'G', Blocks.glass_pane, 'S', "plateSteel", 'P', ModItems.mechanism_revolver_2, 'T', ModItems.wire_tungsten, 'I', "ingotPolymer" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip, 1), new Object[] { " G ", "SSP", " TI", 'G', "paneGlass", 'S', "plateSteel", 'P', ModItems.mechanism_revolver_2, 'T', ModItems.wire_tungsten, 'I', "ingotPolymer" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip_ammo, 1), new Object[] { "S", "G", "C", 'S', "plateSteel", 'G', Items.gunpowder, 'C', "plateCopper" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip_ammo, 1), new Object[] { "S", "G", "C", 'S', "plateSteel", 'G', Items.gunpowder, 'C', "plateCopper" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_dineutronium, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_spark_mix, 'I', "ingotDineutronium", 'D', "ingotDesh" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_dineutronium, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_spark_mix, 'I', "ingotDineutronium", 'D', "ingotDesh" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_desh, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_polymer, 'I', "ingotDesh", 'D', "ingotDuraSteel" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_desh, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_polymer, 'I', "ingotDesh", 'D', "ingotDuraSteel" }));
|
||||||
@ -1289,7 +1289,10 @@ public class CraftingManager {
|
|||||||
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.machine_spp_bottom), new Object[] { ModBlocks.machine_spp_top });
|
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.machine_spp_bottom), new Object[] { ModBlocks.machine_spp_top });
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.machine_spp_top), new Object[] { ModBlocks.machine_spp_bottom });
|
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.machine_spp_top), new Object[] { ModBlocks.machine_spp_bottom });
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b93), new Object[] { "PCE", "SEB", "PCE", 'P', "plateDineutronium", 'C', ModItems.weaponized_starblaster_cell, 'E', ModItems.component_emitter, 'B', ModItems.gun_b92, 'S', ModItems.singularity_spark }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b93), new Object[] { "PCE", "SEB", "PCE", 'P', "plateDineutronium", 'C', ModItems.weaponized_starblaster_cell, 'E', ModItems.component_emitter, 'B', ModItems.gun_b92, 'S', ModItems.singularity_spark }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_transformer), new Object[] { "SDS", "MCM", "MCM", 'S', ModItems.ingot_starmetal, 'D', "ingotDesh", 'M', ModBlocks.fusion_conductor, 'C', ModItems.circuit_targeting_tier6 }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_transformer), new Object[] { "SDS", "MCM", "MCM", 'S', "ingotIron", 'D', "ingotRedstoneAlloy", 'M',ModItems.coil_advanced_alloy, 'C', ModItems.circuit_copper }));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_transformer_20), new Object[] { "SDS", "MCM", "MCM", 'S', "ingotIron", 'D', "ingotRedstoneAlloy", 'M', ModItems.coil_copper, 'C', ModItems.circuit_copper }));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_transformer_dnt), new Object[] { "SDS", "MCM", "MCM", 'S', ModItems.ingot_starmetal, 'D', "ingotDesh", 'M', ModBlocks.fwatz_conductor, 'C', ModItems.circuit_targeting_tier6 }));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_transformer_dnt_20), new Object[] { "SDS", "MCM", "MCM", 'S', ModItems.ingot_starmetal, 'D', "ingotDesh", 'M', ModBlocks.fusion_conductor, 'C', ModItems.circuit_targeting_tier6 }));
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle_sparkle), new Object[] { ModItems.bottle_quantum, Items.carrot, Items.gold_nugget });
|
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle_sparkle), new Object[] { ModItems.bottle_quantum, Items.carrot, Items.gold_nugget });
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_nuke), new Object[] { "CGC", "CGC", "PAP", 'C', ModBlocks.det_charge, 'G', ModItems.grenade_mk2, 'P', "plateAdvanced", 'A', Blocks.anvil }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_nuke), new Object[] { "CGC", "CGC", "PAP", 'C', ModBlocks.det_charge, 'G', ModItems.grenade_mk2, 'P', "plateAdvanced", 'A', Blocks.anvil }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.radiobox), new Object[] { "-C-", "8OI", "EUE", '-', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier4, '8', ModItems.coil_gold, 'O', ModItems.pellet_rtg, 'I', ModItems.fuse, 'E', "plateSteel", 'U', ModItems.rtg_unit }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.radiobox), new Object[] { "-C-", "8OI", "EUE", '-', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier4, '8', ModItems.coil_gold, 'O', ModItems.pellet_rtg, 'I', ModItems.fuse, 'E', "plateSteel", 'U', ModItems.rtg_unit }));
|
||||||
@ -1312,6 +1315,7 @@ public class CraftingManager {
|
|||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity, 1), new Object[] { " PI", "BBM", " PI", 'P', "plateIron", 'B', ModItems.pipes_steel, 'M', ModItems.mechanism_rifle_1, 'I', "ingotSteel" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity, 1), new Object[] { " PI", "BBM", " PI", 'P', "plateIron", 'B', ModItems.pipes_steel, 'M', ModItems.mechanism_rifle_1, 'I', "ingotSteel" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity_dual, 1), new Object[] { "BBM", " PI", "BBM", 'P', "plateIron", 'B', ModItems.pipes_steel, 'M', ModItems.mechanism_rifle_1, 'I', "ingotSteel" }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity_dual, 1), new Object[] { "BBM", " PI", "BBM", 'P', "plateIron", 'B', ModItems.pipes_steel, 'M', ModItems.mechanism_rifle_1, 'I', "ingotSteel" }));
|
||||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity_ammo, 8), new Object[] { "S", "C", "G", 'S', "plateSteel", 'C', "plateCopper", 'G', Items.gunpowder }));
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_calamity_ammo, 8), new Object[] { "S", "C", "G", 'S', "plateSteel", 'C', "plateCopper", 'G', Items.gunpowder }));
|
||||||
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.analyzer, 1), new Object[] { " S ", "SGS", " S ", 'S', "plateSteel", 'G', "paneGlassColorless" }));
|
||||||
|
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.assembly_template, 1, OreDictionary.WILDCARD_VALUE) });
|
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.assembly_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.chemistry_template, 1, OreDictionary.WILDCARD_VALUE) });
|
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.chemistry_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||||
|
|||||||
@ -476,6 +476,7 @@ public class MainRegistry
|
|||||||
public static boolean enableMeteorTails = true;
|
public static boolean enableMeteorTails = true;
|
||||||
public static boolean enableSpecialMeteors = true;
|
public static boolean enableSpecialMeteors = true;
|
||||||
public static boolean enableBomberShortMode = false;
|
public static boolean enableBomberShortMode = false;
|
||||||
|
public static boolean enableVaults = true;
|
||||||
|
|
||||||
public static int uraniumSpawn = 7;
|
public static int uraniumSpawn = 7;
|
||||||
public static int titaniumSpawn = 8;
|
public static int titaniumSpawn = 8;
|
||||||
@ -523,6 +524,7 @@ public class MainRegistry
|
|||||||
public static int broadcaster = 5000;
|
public static int broadcaster = 5000;
|
||||||
public static int minefreq = 64;
|
public static int minefreq = 64;
|
||||||
public static int radfreq = 5000;
|
public static int radfreq = 5000;
|
||||||
|
public static int vaultfreq = 2500;
|
||||||
public static int meteorStrikeChance = 20 * 60 * 180;
|
public static int meteorStrikeChance = 20 * 60 * 180;
|
||||||
public static int meteorShowerChance = 20 * 60 * 5;
|
public static int meteorShowerChance = 20 * 60 * 5;
|
||||||
public static int meteorShowerDuration = 6000;
|
public static int meteorShowerDuration = 6000;
|
||||||
@ -1554,6 +1556,7 @@ public class MainRegistry
|
|||||||
enableMeteorTails = config.get(Configuration.CATEGORY_GENERAL, "1.12_enableMeteorTails", true).getBoolean(true);
|
enableMeteorTails = config.get(Configuration.CATEGORY_GENERAL, "1.12_enableMeteorTails", true).getBoolean(true);
|
||||||
enableSpecialMeteors = config.get(Configuration.CATEGORY_GENERAL, "1.13_enableSpecialMeteors", false).getBoolean(false);
|
enableSpecialMeteors = config.get(Configuration.CATEGORY_GENERAL, "1.13_enableSpecialMeteors", false).getBoolean(false);
|
||||||
enableBomberShortMode = config.get(Configuration.CATEGORY_GENERAL, "1.14_enableBomberShortMode", false).getBoolean(false);
|
enableBomberShortMode = config.get(Configuration.CATEGORY_GENERAL, "1.14_enableBomberShortMode", false).getBoolean(false);
|
||||||
|
enableVaults = config.get(Configuration.CATEGORY_GENERAL, "1.15_enableVaultSpawn", true).getBoolean(true);
|
||||||
|
|
||||||
Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.00_uraniumSpawnrate", 7);
|
Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.00_uraniumSpawnrate", 7);
|
||||||
PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk";
|
PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk";
|
||||||
@ -1677,6 +1680,9 @@ public class MainRegistry
|
|||||||
Property propRad = config.get(Configuration.CATEGORY_GENERAL, "4.15_radHotsoptSpawn", 5000);
|
Property propRad = config.get(Configuration.CATEGORY_GENERAL, "4.15_radHotsoptSpawn", 5000);
|
||||||
propRad.comment = "Spawn radiation hotspot on every nTH chunk";
|
propRad.comment = "Spawn radiation hotspot on every nTH chunk";
|
||||||
radfreq = propRad.getInt();
|
radfreq = propRad.getInt();
|
||||||
|
Property propVault = config.get(Configuration.CATEGORY_GENERAL, "4.16_vaultSpawn", 2500);
|
||||||
|
propVault.comment = "Spawn locked safe on every nTH chunk";
|
||||||
|
vaultfreq = propVault.getInt();
|
||||||
|
|
||||||
Property propMeteorStrikeChance = config.get(Configuration.CATEGORY_GENERAL, "5.00_meteorStrikeChance", 20 * 60 * 180);
|
Property propMeteorStrikeChance = config.get(Configuration.CATEGORY_GENERAL, "5.00_meteorStrikeChance", 20 * 60 * 180);
|
||||||
propMeteorStrikeChance.comment = "The probability of a meteor spawning (an average of once every nTH ticks)";
|
propMeteorStrikeChance.comment = "The probability of a meteor spawning (an average of once every nTH ticks)";
|
||||||
|
|||||||
@ -76,4 +76,9 @@ public class TileEntityFluidDuct extends TileEntity implements IFluidDuct {
|
|||||||
{
|
{
|
||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,4 +77,9 @@ public class TileEntityGasDuct extends TileEntity implements IFluidDuct {
|
|||||||
{
|
{
|
||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,4 +15,9 @@ public class TileEntityGasDuctSolid extends TileEntity implements IFluidDuct {
|
|||||||
public FluidType type = FluidType.GAS;
|
public FluidType type = FluidType.GAS;
|
||||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,4 +77,9 @@ public class TileEntityOilDuct extends TileEntity implements IFluidDuct {
|
|||||||
{
|
{
|
||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,4 +16,9 @@ public class TileEntityOilDuctSolid extends TileEntity implements IFluidDuct {
|
|||||||
public FluidType type = FluidType.OIL;
|
public FluidType type = FluidType.OIL;
|
||||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -565,7 +565,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -579,7 +579,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -591,7 +591,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -672,4 +672,15 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IS
|
|||||||
{
|
{
|
||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
list.add(tanks[2]);
|
||||||
|
list.add(tanks[3]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||||
import com.hbm.explosion.ExplosionLarge;
|
import com.hbm.explosion.ExplosionLarge;
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
@ -379,13 +382,13 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
else
|
else
|
||||||
@ -393,7 +396,7 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
else
|
else
|
||||||
@ -421,4 +424,12 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
|||||||
{
|
{
|
||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -397,13 +397,13 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
else
|
else
|
||||||
@ -411,7 +411,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
return tank.getMaxFill();
|
return tank.getMaxFill();
|
||||||
else
|
else
|
||||||
@ -440,4 +440,12 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
|||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -437,7 +437,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
tanks[1].setFill(i);
|
tanks[1].setFill(i);
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -445,7 +445,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
return tanks[1].getFill();
|
return tanks[1].getFill();
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -455,7 +455,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
return tanks[1].getMaxFill();
|
return tanks[1].getMaxFill();
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
@ -463,4 +463,14 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
|||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
list.add(tanks[2]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1260,7 +1260,7 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -1270,7 +1270,7 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -1282,7 +1282,7 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -1293,4 +1293,14 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
list.add(tanks[2]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,10 +34,18 @@ public abstract class TileEntityLockableBase extends TileEntity {
|
|||||||
lock = pins;
|
lock = pins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPins() {
|
||||||
|
return lock;
|
||||||
|
}
|
||||||
|
|
||||||
public void setMod(double mod) {
|
public void setMod(double mod) {
|
||||||
lockMod = mod;
|
lockMod = mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getMod() {
|
||||||
|
return lockMod;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound nbt) {
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
super.readFromNBT(nbt);
|
super.readFromNBT(nbt);
|
||||||
|
|||||||
@ -35,8 +35,9 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
|
|||||||
|
|
||||||
private String customName;
|
private String customName;
|
||||||
|
|
||||||
public TileEntityMachineBattery() {
|
public TileEntityMachineBattery(long maxPower) {
|
||||||
slots = new ItemStack[2];
|
slots = new ItemStack[2];
|
||||||
|
this.maxPower = maxPower;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -216,8 +217,10 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
|
|||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
|
|
||||||
if(worldObj.getBlock(xCoord, yCoord, zCoord) instanceof MachineBattery) {
|
if(worldObj.getBlock(xCoord, yCoord, zCoord) instanceof MachineBattery && !worldObj.isRemote) {
|
||||||
this.maxPower = ((MachineBattery)worldObj.getBlock(xCoord, yCoord, zCoord)).maxPower;
|
this.maxPower = ((MachineBattery)worldObj.getBlock(xCoord, yCoord, zCoord)).maxPower;
|
||||||
|
|
||||||
|
conducts = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
|
||||||
|
|
||||||
if(this.conducts)
|
if(this.conducts)
|
||||||
{
|
{
|
||||||
@ -231,12 +234,10 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
|
|||||||
ffgeuaInit();
|
ffgeuaInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!worldObj.isRemote) {
|
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||||
power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
||||||
power = Library.chargeItemsFromTE(slots, 1, power, maxPower);
|
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
import com.hbm.interfaces.IConsumer;
|
import com.hbm.interfaces.IConsumer;
|
||||||
import com.hbm.interfaces.IFluidAcceptor;
|
import com.hbm.interfaces.IFluidAcceptor;
|
||||||
@ -331,18 +334,26 @@ public class TileEntityMachineCMBFactory extends TileEntity implements ISidedInv
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -810,34 +810,24 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
tanks[1].setFill(i);
|
tanks[1].setFill(i);
|
||||||
}
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getAFluidFill(FluidType type) {
|
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
|
||||||
return tanks[0].getFill();
|
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
|
||||||
return tanks[1].getFill();
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setSFluidFill(int i, FluidType type) {
|
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
|
||||||
tanks[2].setFill(i);
|
tanks[2].setFill(i);
|
||||||
else if(type.name().equals(tanks[3].getTankType().name()))
|
else if(type.name().equals(tanks[3].getTankType().name()))
|
||||||
tanks[3].setFill(i);
|
tanks[3].setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
|
return tanks[0].getFill();
|
||||||
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
|
return tanks[1].getFill();
|
||||||
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
return tanks[2].getFill();
|
return tanks[2].getFill();
|
||||||
else if(type.name().equals(tanks[3].getTankType().name()))
|
else if(type.name().equals(tanks[3].getTankType().name()))
|
||||||
return tanks[3].getFill();
|
return tanks[3].getFill();
|
||||||
@ -846,7 +836,7 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -917,4 +907,15 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
|
|||||||
if(type.name().equals(tanks[3].getTankType().name()))
|
if(type.name().equals(tanks[3].getTankType().name()))
|
||||||
list2.clear();
|
list2.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
list.add(tanks[2]);
|
||||||
|
list.add(tanks[3]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -350,18 +350,18 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,4 +374,12 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
|||||||
public void setType(FluidType type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -345,18 +345,26 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -241,7 +241,7 @@ public class TileEntityMachineFluidTank extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,12 +272,12 @@ public class TileEntityMachineFluidTank extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
@ -293,13 +293,10 @@ public class TileEntityMachineFluidTank extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSFluidFill(FluidType type) {
|
public List<FluidTank> getTanks() {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
List<FluidTank> list = new ArrayList();
|
||||||
}
|
list.add(tank);
|
||||||
|
|
||||||
@Override
|
return list;
|
||||||
public void setSFluidFill(int i, FluidType type) {
|
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
|
||||||
tank.setFill(i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -351,19 +351,27 @@ public class TileEntityMachineGasCent extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -312,18 +312,26 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -589,7 +589,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -599,7 +599,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -607,7 +607,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -627,4 +627,13 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
|||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -294,7 +294,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -304,7 +304,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -316,29 +316,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSFluidFill(int i, FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
|
||||||
tanks[0].setFill(i);
|
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
|
||||||
tanks[1].setFill(i);
|
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
|
||||||
tanks[2].setFill(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSFluidFill(FluidType type) {
|
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
|
||||||
return tanks[0].getFill();
|
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
|
||||||
return tanks[1].getFill();
|
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
|
||||||
return tanks[2].getFill();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -369,4 +347,14 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
|||||||
if(type.name().equals(tanks[2].getTankType().name()))
|
if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
list3.clear();
|
list3.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
list.add(tanks[2]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -477,7 +477,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -487,7 +487,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -523,4 +523,13 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent
|
|||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
@ -216,4 +219,23 @@ public class TileEntityMachinePuF6Tank extends TileEntity implements ISidedInven
|
|||||||
public void setType(FluidType type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFluidFill(FluidType type) {
|
||||||
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setFluidFill(int i, FluidType type) {
|
||||||
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
|
tank.setFill(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -503,7 +503,7 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -513,7 +513,7 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -548,4 +548,13 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
|||||||
if(index < 2 && tanks[index] != null)
|
if(index < 2 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -599,7 +599,7 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -609,7 +609,7 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -617,7 +617,7 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if (type.name().equals(tanks[0].getTankType().name()))
|
if (type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -638,6 +638,15 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
|||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
return TileEntity.INFINITE_EXTENT_AABB;
|
return TileEntity.INFINITE_EXTENT_AABB;
|
||||||
|
|||||||
@ -360,8 +360,10 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
|
return tanks[0].getFill();
|
||||||
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
return tanks[1].getFill();
|
return tanks[1].getFill();
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
return tanks[2].getFill();
|
return tanks[2].getFill();
|
||||||
@ -374,8 +376,10 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[1].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
|
tanks[0].setFill(i);
|
||||||
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
tanks[1].setFill(i);
|
tanks[1].setFill(i);
|
||||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||||
tanks[2].setFill(i);
|
tanks[2].setFill(i);
|
||||||
@ -411,21 +415,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
|
||||||
tanks[0].setFill(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getAFluidFill(FluidType type) {
|
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
|
||||||
return tanks[0].getFill();
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else
|
else
|
||||||
@ -443,6 +433,18 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
|||||||
if(index < 5 && tanks[index] != null)
|
if(index < 5 && tanks[index] != null)
|
||||||
tanks[index].setTankType(type);
|
tanks[index].setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
list.add(tanks[2]);
|
||||||
|
list.add(tanks[3]);
|
||||||
|
list.add(tanks[4]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getRenderBoundingBox() {
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
|||||||
@ -362,18 +362,26 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,30 +16,64 @@ import net.minecraft.tileentity.TileEntity;
|
|||||||
public class TileEntityMachineTransformer extends TileEntity implements ISource, IConsumer {
|
public class TileEntityMachineTransformer extends TileEntity implements ISource, IConsumer {
|
||||||
|
|
||||||
public long power;
|
public long power;
|
||||||
public static final long maxPower = 1000000000000000L;
|
public long maxPower = 10000;
|
||||||
|
public int delay = 1;
|
||||||
public List<IConsumer> list = new ArrayList();
|
public List<IConsumer> list = new ArrayList();
|
||||||
boolean tact;
|
boolean tact;
|
||||||
|
int age;
|
||||||
|
|
||||||
|
public TileEntityMachineTransformer(long buffer, int d) {
|
||||||
|
maxPower = buffer;
|
||||||
|
delay = d;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound nbt) {
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
super.readFromNBT(nbt);
|
super.readFromNBT(nbt);
|
||||||
|
|
||||||
this.power = nbt.getLong("powerTime");
|
this.power = nbt.getLong("powerTime");
|
||||||
|
this.maxPower = nbt.getLong("maxPower");
|
||||||
|
this.delay = nbt.getInteger("delay");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound nbt) {
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
super.writeToNBT(nbt);
|
super.writeToNBT(nbt);
|
||||||
nbt.setLong("powerTime", power);
|
nbt.setLong("powerTime", power);
|
||||||
|
nbt.setLong("maxPower", maxPower);
|
||||||
|
nbt.setInteger("delay", delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
tact = true;
|
|
||||||
ffgeuaInit();
|
if(!worldObj.isRemote) {
|
||||||
tact = false;
|
|
||||||
ffgeuaInit();
|
age++;
|
||||||
|
|
||||||
|
if(age == delay) {
|
||||||
|
|
||||||
|
maxPower /= (20D / delay);
|
||||||
|
long saved = 0;
|
||||||
|
|
||||||
|
if(power > maxPower) {
|
||||||
|
saved = power - maxPower;
|
||||||
|
power = maxPower;
|
||||||
|
}
|
||||||
|
|
||||||
|
tact = true;
|
||||||
|
ffgeuaInit();
|
||||||
|
tact = false;
|
||||||
|
ffgeuaInit();
|
||||||
|
|
||||||
|
age = 0;
|
||||||
|
|
||||||
|
maxPower *= (20D / delay);
|
||||||
|
|
||||||
|
power += saved;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -545,17 +545,17 @@ public class TileEntityMachineTurbofan extends TileEntity implements ISidedInven
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tank.getTankType().name()))
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
@ -571,4 +571,12 @@ public class TileEntityMachineTurbofan extends TileEntity implements ISidedInven
|
|||||||
{
|
{
|
||||||
return 65536.0D;
|
return 65536.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package com.hbm.tileentity.machine;
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||||
import com.hbm.interfaces.IFluidContainer;
|
import com.hbm.interfaces.IFluidContainer;
|
||||||
import com.hbm.inventory.FluidTank;
|
import com.hbm.inventory.FluidTank;
|
||||||
@ -218,4 +221,23 @@ public class TileEntityMachineUF6Tank extends TileEntity implements ISidedInvent
|
|||||||
public void setType(FluidType type, int index) {
|
public void setType(FluidType type, int index) {
|
||||||
tank.setTankType(type);
|
tank.setTankType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFluidFill(FluidType type) {
|
||||||
|
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setFluidFill(int i, FluidType type) {
|
||||||
|
if(type.name().equals(tank.getTankType().name()))
|
||||||
|
tank.setFill(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -717,7 +717,7 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
tanks[0].setFill(i);
|
tanks[0].setFill(i);
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -725,7 +725,7 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getAFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getFill();
|
return tanks[0].getFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -735,7 +735,7 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAFluidFill(FluidType type) {
|
public int getMaxFluidFill(FluidType type) {
|
||||||
if(type.name().equals(tanks[0].getTankType().name()))
|
if(type.name().equals(tanks[0].getTankType().name()))
|
||||||
return tanks[0].getMaxFill();
|
return tanks[0].getMaxFill();
|
||||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||||
@ -743,4 +743,13 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
|
|||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tanks[0]);
|
||||||
|
list.add(tanks[1]);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -747,11 +747,11 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
|||||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSFluidFill(FluidType type) {
|
public int getFluidFill(FluidType type) {
|
||||||
return tank.getFill();
|
return tank.getFill();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void setSFluidFill(int i, FluidType type) {
|
public void setFluidFill(int i, FluidType type) {
|
||||||
tank.setFill(i);
|
tank.setFill(i);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@ -762,4 +762,12 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
|||||||
public void clearFluidList(FluidType type) {
|
public void clearFluidList(FluidType type) {
|
||||||
list1.clear();
|
list1.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FluidTank> getTanks() {
|
||||||
|
List<FluidTank> list = new ArrayList();
|
||||||
|
list.add(tank);
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||