it's ZIRNOX time!
@ -431,6 +431,7 @@ public class ModBlocks {
|
||||
public static Block waste_trinitite;
|
||||
public static Block waste_trinitite_red;
|
||||
public static Block waste_log;
|
||||
public static Block waste_leaves;
|
||||
public static Block waste_planks;
|
||||
public static Block frozen_dirt;
|
||||
public static Block frozen_grass;
|
||||
@ -968,6 +969,9 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_reactor_small;
|
||||
public static final int guiID_reactor_small = 65;
|
||||
public static Block reactor_zirnox;
|
||||
public static final int guiID_reactor_zirnox = 124;
|
||||
public static Block zirnox_destroyed;
|
||||
|
||||
public static Block machine_controller;
|
||||
public static final int guiID_machine_controller = 78;
|
||||
@ -1089,6 +1093,7 @@ public class ModBlocks {
|
||||
public static Block gas_radon;
|
||||
public static Block gas_radon_dense;
|
||||
public static Block gas_radon_tomb;
|
||||
public static Block gas_meltdown;
|
||||
public static Block gas_monoxide;
|
||||
public static Block gas_asbestos;
|
||||
public static Block gas_coal;
|
||||
@ -1606,6 +1611,7 @@ public class ModBlocks {
|
||||
waste_trinitite = new BlockOre(Material.sand).setBlockName("waste_trinitite").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":waste_trinitite");
|
||||
waste_trinitite_red = new BlockOre(Material.sand).setBlockName("waste_trinitite_red").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":waste_trinitite_red");
|
||||
waste_log = new WasteLog(Material.wood).setBlockName("waste_log").setStepSound(Block.soundTypeWood).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(2.5F);
|
||||
waste_leaves = new WasteLeaves(Material.leaves).setBlockName("waste_leaves").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setBlockTextureName(RefStrings.MODID + ":waste_leaves");
|
||||
waste_planks = new BlockOre(Material.wood).setBlockName("waste_planks").setStepSound(Block.soundTypeWood).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":waste_planks");
|
||||
frozen_dirt = new BlockOre(Material.ground).setBlockName("frozen_dirt").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":frozen_dirt");
|
||||
frozen_grass = new WasteEarth(Material.ground, false).setBlockName("frozen_grass").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F);
|
||||
@ -2026,6 +2032,8 @@ public class ModBlocks {
|
||||
machine_epress = new MachineEPress(Material.iron).setBlockName("machine_epress").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_epress");
|
||||
machine_selenium = new MachineSeleniumEngine(Material.iron).setBlockName("machine_selenium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_selenium");
|
||||
machine_reactor_small = new MachineReactorSmall(Material.iron).setBlockName("machine_reactor_small").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor_small");
|
||||
reactor_zirnox = new ReactorZirnox(Material.iron).setBlockName("machine_zirnox").setHardness(100.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
zirnox_destroyed = new ZirnoxDestroyed(Material.iron).setBlockName("zirnox_destroyed").setHardness(100.0F).setResistance(800.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_controller = new MachineReactorControl(Material.iron).setBlockName("machine_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
|
||||
machine_boiler_off = new MachineBoiler(false).setBlockName("machine_boiler_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_boiler_off");
|
||||
@ -2090,6 +2098,7 @@ public class ModBlocks {
|
||||
gas_radon = new BlockGasRadon().setBlockName("gas_radon").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_radon");
|
||||
gas_radon_dense = new BlockGasRadonDense().setBlockName("gas_radon_dense").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_radon_dense");
|
||||
gas_radon_tomb = new BlockGasRadonTomb().setBlockName("gas_radon_tomb").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_radon_tomb");
|
||||
gas_meltdown = new BlockGasMeltdown().setBlockName("gas_meltdown").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_meltdown");
|
||||
gas_monoxide = new BlockGasMonoxide().setBlockName("gas_monoxide").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_monoxide");
|
||||
gas_asbestos = new BlockGasAsbestos().setBlockName("gas_asbestos").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_asbestos");
|
||||
gas_coal = new BlockGasCoal().setBlockName("gas_coal").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_coal");
|
||||
@ -2589,6 +2598,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(waste_trinitite, waste_trinitite.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(waste_trinitite_red, waste_trinitite_red.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(waste_log, waste_log.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(waste_leaves, waste_leaves.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(waste_planks, waste_planks.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(frozen_grass, frozen_grass.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(frozen_dirt, frozen_dirt.getUnlocalizedName());
|
||||
@ -2787,6 +2797,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_generator, machine_generator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_controller, machine_controller.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_reactor_small, machine_reactor_small.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(reactor_zirnox, reactor_zirnox.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(zirnox_destroyed, zirnox_destroyed.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_industrial_generator, machine_industrial_generator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_radgen, machine_radgen.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_cyclotron, machine_cyclotron.getUnlocalizedName());
|
||||
@ -3146,6 +3158,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(gas_radon, gas_radon.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_radon_dense, gas_radon_dense.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_radon_tomb, gas_radon_tomb.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_meltdown, gas_meltdown.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_monoxide, gas_monoxide.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_asbestos, gas_asbestos.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_coal, gas_coal.getUnlocalizedName());
|
||||
|
||||
93
src/main/java/com/hbm/blocks/gas/BlockGasMeltdown.java
Normal file
@ -0,0 +1,93 @@
|
||||
package com.hbm.blocks.gas;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockGasMeltdown extends BlockGasBase {
|
||||
|
||||
public BlockGasMeltdown() {
|
||||
super(0.1F, 0.4F, 0.1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity entity) {
|
||||
|
||||
if(!(entity instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
EntityLivingBase entityLiving = (EntityLivingBase) entity;
|
||||
|
||||
ContaminationUtil.contaminate((EntityLivingBase)entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.5F);
|
||||
entityLiving.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 2));
|
||||
|
||||
if(ArmorRegistry.hasAllProtection(entityLiving, 3, HazardClass.PARTICLE_FINE)) {
|
||||
ArmorUtil.damageGasMaskFilter(entityLiving, 1);
|
||||
} else {
|
||||
HbmLivingProps.incrementFibrosis(entityLiving, 5);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
|
||||
super.randomDisplayTick(world, x, y, z, rand);
|
||||
world.spawnParticle("townaura", x + rand.nextFloat(), y + rand.nextFloat(), z + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getFirstDirection(World world, int x, int y, int z) {
|
||||
|
||||
if(world.rand.nextInt(2) == 0)
|
||||
return ForgeDirection.UP;
|
||||
|
||||
return ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getSecondDirection(World world, int x, int y, int z) {
|
||||
return this.randomHorizontal(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||
|
||||
if(rand.nextInt(7) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_radon_dense);
|
||||
}
|
||||
|
||||
ChunkRadiationManager.proxy.incrementRad(world, x, y, z, 5);
|
||||
|
||||
if(rand.nextInt(450) == 0) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
super.updateTick(world, x, y, z, rand);
|
||||
}
|
||||
}
|
||||
68
src/main/java/com/hbm/blocks/generic/WasteLeaves.java
Normal file
@ -0,0 +1,68 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class WasteLeaves extends Block {
|
||||
|
||||
public WasteLeaves(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":waste_leaves");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(rand.nextInt(300) == 0) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
super.updateTick(world, x, y, z, rand);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
|
||||
super.randomDisplayTick(world, x, y, z, rand);
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "deadleaf");
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
}*/
|
||||
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean canSilkHarvest() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
75
src/main/java/com/hbm/blocks/machine/ReactorZirnox.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ReactorZirnox extends BlockDummyable implements IMultiblock {
|
||||
|
||||
public ReactorZirnox(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityReactorZirnox();
|
||||
if(meta >= 6)
|
||||
return new TileEntityProxyCombo(false, true, true);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_reactor_zirnox, world, pos[0], pos[1], pos[2]);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {4, 0, 2, 2, 2, 2,};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
this.makeExtra(world, x + dir.offsetX * o + rot.offsetX * 2, y + 1, z + dir.offsetZ * o + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x + dir.offsetX * o + rot.offsetX * 2, y + 3, z + dir.offsetZ * o + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x + dir.offsetX * o + rot.offsetX * -2, y + 1, z + dir.offsetZ * o + rot.offsetZ * -2);
|
||||
this.makeExtra(world, x + dir.offsetX * o + rot.offsetX * -2, y + 3, z + dir.offsetZ * o + rot.offsetZ * -2);
|
||||
}
|
||||
|
||||
}
|
||||
115
src/main/java/com/hbm/blocks/machine/ZirnoxDestroyed.java
Normal file
@ -0,0 +1,115 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityZirnoxDestroyed;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ZirnoxDestroyed extends BlockDummyable implements IMultiblock {
|
||||
|
||||
public ZirnoxDestroyed(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityZirnoxDestroyed();
|
||||
if(meta >= 6)
|
||||
return new TileEntityProxyCombo(false, true, true);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||
|
||||
if(rand.nextInt(4) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY + 1, z + dir.offsetZ) == Blocks.air) {
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY + 1, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
||||
}
|
||||
|
||||
super.updateTick(world, x, y, z, rand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World world) {
|
||||
|
||||
return 100 + world.rand.nextInt(20);
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
|
||||
if(!world.isRemote) {
|
||||
if(world.rand.nextInt(4) == 0) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "rbmkflame");
|
||||
data.setInteger("maxAge", 90);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + 0.25 + world.rand.nextDouble() * 0.5, y + 1.75, z + 0.25 + world.rand.nextDouble() * 0.5), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 1.75, z + 0.5, 75));
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5, z + 0.5, "fire.fire", 1.0F + world.rand.nextFloat(), world.rand.nextFloat() * 0.7F + 0.3F);
|
||||
}
|
||||
}
|
||||
|
||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
|
||||
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
drops.add(new ItemStack(ModBlocks.concrete_smooth, 6));
|
||||
drops.add(new ItemStack(ModBlocks.deco_pipe_quad, 4));
|
||||
drops.add(new ItemStack(ModBlocks.steel_grate, 2));
|
||||
drops.add(new ItemStack(ModItems.debris_metal, 6));
|
||||
drops.add(new ItemStack(ModItems.debris_graphite, 2));
|
||||
drops.add(new ItemStack(ModItems.fallout, 4));
|
||||
return drops;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 2, 2, 2, 2,};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,8 +8,10 @@ import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RBMKDebrisBurning extends RBMKDebris {
|
||||
|
||||
@ -33,6 +35,12 @@ public class RBMKDebrisBurning extends RBMKDebris {
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5, z + 0.5, "fire.fire", 1.0F + rand.nextFloat(), rand.nextFloat() * 0.7F + 0.3F);
|
||||
}
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||
|
||||
if(rand.nextInt(7) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
||||
}
|
||||
|
||||
if(rand.nextInt(100) == 0) {
|
||||
world.setBlock(x, y, z, ModBlocks.pribris);
|
||||
} else {
|
||||
|
||||
@ -15,11 +15,13 @@ import com.hbm.util.ContaminationUtil.HazardType;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RBMKDebrisRadiating extends RBMKDebrisBurning {
|
||||
|
||||
@ -46,6 +48,12 @@ public class RBMKDebrisRadiating extends RBMKDebrisBurning {
|
||||
|
||||
}
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||
|
||||
if(rand.nextInt(5) == 0 && world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
||||
}
|
||||
|
||||
if(rand.nextInt(1000) == 0) {
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
@ -42,9 +42,11 @@ public class RodRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_lead, 1), new Object[] { ModItems.rod_empty, PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.nugget_lead, 6), new Object[] { ModItems.rod_lead });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_lithium, 1), new Object[] { ModItems.rod_empty, LI.ingot() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_zirnox_lithium), new Object[] { ModItems.rod_zirnox_empty, LI.ingot(), LI.ingot() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.lithium, 1), new Object[] { ModItems.rod_lithium });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 1), new Object[] { ModItems.rod_tritium, ModItems.cell_empty });
|
||||
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 2), new Object[] { ModItems.rod_zirnox_tritium, ModItems.cell_empty, ModItems.cell_empty });
|
||||
|
||||
//Dual rods
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_empty, 2), new Object[] { ModItems.rod_dual_empty });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_empty, 1), new Object[] { ModItems.rod_empty, ModItems.rod_empty });
|
||||
@ -101,6 +103,29 @@ public class RodRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_quad_lithium, 1), new Object[] { ModItems.rod_quad_empty, LI.ingot(), LI.ingot(), LI.ingot(), LI.ingot() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.lithium, 4), new Object[] { ModItems.rod_quad_lithium });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cell_tritium, 4), new Object[] { ModItems.rod_quad_tritium, ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty, ModItems.cell_empty });
|
||||
|
||||
//Zirnox Fuel
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.rod_zirnox_empty, 4), new Object[] { "Z Z", "ZBZ", "Z Z", 'Z', "nuggetZirconium", 'B', "ingotBeryllium" }));
|
||||
addZIRNOXRod(ModItems.billet_uranium, ModItems.rod_zirnox_natural_uranium_fuel);
|
||||
addZIRNOXRod(ModItems.billet_uranium_fuel, ModItems.rod_zirnox_uranium_fuel);
|
||||
addZIRNOXRod(ModItems.billet_th232, ModItems.rod_zirnox_th232);
|
||||
addZIRNOXRod(ModItems.billet_thorium_fuel, ModItems.rod_zirnox_thorium_fuel);
|
||||
addZIRNOXRod(ModItems.billet_mox_fuel, ModItems.rod_zirnox_mox_fuel);
|
||||
addZIRNOXRod(ModItems.billet_plutonium_fuel, ModItems.rod_zirnox_plutonium_fuel);
|
||||
addZIRNOXRod(ModItems.billet_u233, ModItems.rod_zirnox_u233_fuel);
|
||||
addZIRNOXRod(ModItems.billet_u235, ModItems.rod_zirnox_u235_fuel);
|
||||
addZIRNOXRod(ModItems.billet_les, ModItems.rod_zirnox_les_fuel);
|
||||
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_natural_uranium_hot, 2), new Object[] { ModItems.rod_zirnox_natural_uranium_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_uranium_hot, 2), new Object[] { ModItems.rod_zirnox_uranium_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_thorium_hot, 2), new Object[] { ModItems.rod_zirnox_thorium_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_mox_hot, 2), new Object[] { ModItems.rod_zirnox_mox_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_plutonium_hot, 2), new Object[] { ModItems.rod_zirnox_plutonium_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u233_hot, 2), new Object[] { ModItems.rod_zirnox_u233_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_u235_hot, 2), new Object[] { ModItems.rod_zirnox_u235_fuel_depleted });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_schrabidium_hot, 2), new Object[] { ModItems.rod_zirnox_les_fuel_depleted });
|
||||
|
||||
|
||||
|
||||
//Pile fuel
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_uranium, 1), new Object[] { " U ", "PUP", " U ", 'P', IRON.plate(), 'U', U.billet() });
|
||||
@ -218,4 +243,9 @@ public class RodRecipes {
|
||||
public static void addRBMKRod(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rbmk_fuel_empty, billet, billet, billet, billet, billet, billet, billet, billet });
|
||||
}
|
||||
|
||||
//Fill rods with 2 billets
|
||||
public static void addZIRNOXRod(Item billet, Item out) {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(out), new Object[] { ModItems.rod_zirnox_empty, billet, billet });
|
||||
}
|
||||
}
|
||||
|
||||
227
src/main/java/com/hbm/entity/projectile/EntityDebrisBase.java
Normal file
@ -0,0 +1,227 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.crash.CrashReportCategory;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
abstract public class EntityDebrisBase extends Entity {
|
||||
|
||||
public float rot;
|
||||
public float lastRot;
|
||||
protected boolean hasSizeSet = false;
|
||||
|
||||
public EntityDebrisBase(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
this.dataWatcher.addObject(20, 0);
|
||||
this.rot = this.lastRot = this.rand.nextFloat() * 360;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeCollidedWith() {
|
||||
return true;
|
||||
}
|
||||
|
||||
abstract public boolean interactFirst(EntityPlayer player);
|
||||
|
||||
abstract protected int getLifetime();
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
this.dataWatcher.updateObject(20, nbt.getInteger("debtype"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("debtype", this.dataWatcher.getWatchableObjectInt(20));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveEntity(double moX, double moY, double moZ) {
|
||||
|
||||
this.worldObj.theProfiler.startSection("move");
|
||||
this.ySize *= 0.4F;
|
||||
|
||||
if(this.isInWeb) {
|
||||
this.isInWeb = false;
|
||||
}
|
||||
|
||||
double initMoX = moX;
|
||||
double initMoY = moY;
|
||||
double initMoZ = moZ;
|
||||
AxisAlignedBB axisalignedbb = this.boundingBox.copy();
|
||||
|
||||
List list = this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox.addCoord(moX, moY, moZ));
|
||||
|
||||
for(int i = 0; i < list.size(); ++i) {
|
||||
moY = ((AxisAlignedBB) list.get(i)).calculateYOffset(this.boundingBox, moY);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, moY, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoY != moY) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
boolean isGoingDown = this.onGround || initMoY != moY && initMoY < 0.0D;
|
||||
int j;
|
||||
|
||||
for(j = 0; j < list.size(); ++j) {
|
||||
moX = ((AxisAlignedBB) list.get(j)).calculateXOffset(this.boundingBox, moX);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(moX, 0.0D, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoX != moX) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
for(j = 0; j < list.size(); ++j) {
|
||||
moZ = ((AxisAlignedBB) list.get(j)).calculateZOffset(this.boundingBox, moZ);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, 0.0D, moZ);
|
||||
|
||||
if(!this.field_70135_K && initMoZ != moZ) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
double d10;
|
||||
double d11;
|
||||
int k;
|
||||
double d12;
|
||||
|
||||
if(this.stepHeight > 0.0F && isGoingDown && this.ySize < 0.05F && (initMoX != moX || initMoZ != moZ)) {
|
||||
d12 = moX;
|
||||
d10 = moY;
|
||||
d11 = moZ;
|
||||
moX = initMoX;
|
||||
moY = (double) this.stepHeight;
|
||||
moZ = initMoZ;
|
||||
AxisAlignedBB axisalignedbb1 = this.boundingBox.copy();
|
||||
this.boundingBox.setBB(axisalignedbb);
|
||||
list = this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox.addCoord(initMoX, moY, initMoZ));
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moY = ((AxisAlignedBB) list.get(k)).calculateYOffset(this.boundingBox, moY);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, moY, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoY != moY) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moX = ((AxisAlignedBB) list.get(k)).calculateXOffset(this.boundingBox, moX);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(moX, 0.0D, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoX != moX) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moZ = ((AxisAlignedBB) list.get(k)).calculateZOffset(this.boundingBox, moZ);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, 0.0D, moZ);
|
||||
|
||||
if(!this.field_70135_K && initMoZ != moZ) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
if(!this.field_70135_K && initMoY != moY) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
} else {
|
||||
moY = (double) (-this.stepHeight);
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moY = ((AxisAlignedBB) list.get(k)).calculateYOffset(this.boundingBox, moY);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, moY, 0.0D);
|
||||
}
|
||||
|
||||
if(d12 * d12 + d11 * d11 >= moX * moX + moZ * moZ) {
|
||||
moX = d12;
|
||||
moY = d10;
|
||||
moZ = d11;
|
||||
this.boundingBox.setBB(axisalignedbb1);
|
||||
}
|
||||
}
|
||||
|
||||
this.worldObj.theProfiler.endSection();
|
||||
this.worldObj.theProfiler.startSection("rest");
|
||||
this.posX = (this.boundingBox.minX + this.boundingBox.maxX) / 2.0D;
|
||||
this.posY = this.boundingBox.minY + (double) this.yOffset - (double) this.ySize;
|
||||
this.posZ = (this.boundingBox.minZ + this.boundingBox.maxZ) / 2.0D;
|
||||
this.isCollidedHorizontally = initMoX != moX || initMoZ != moZ;
|
||||
this.isCollidedVertically = initMoY != moY;
|
||||
this.onGround = initMoY != moY && initMoY < 0.0D;
|
||||
this.isCollided = this.isCollidedHorizontally || this.isCollidedVertically;
|
||||
this.updateFallState(moY, this.onGround);
|
||||
|
||||
if(initMoX != moX) {
|
||||
//this.motionX = 0.0D;
|
||||
this.motionX *= -0.75D;
|
||||
|
||||
}
|
||||
|
||||
if(initMoY != moY) {
|
||||
this.motionY = 0.0D;
|
||||
}
|
||||
|
||||
if(initMoZ != moZ) {
|
||||
//this.motionZ = 0.0D;
|
||||
this.motionZ *= -0.75D;
|
||||
}
|
||||
|
||||
try {
|
||||
this.func_145775_I();
|
||||
} catch(Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Checking entity block collision");
|
||||
CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being checked for collision");
|
||||
this.addEntityCrashInfo(crashreportcategory);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
this.worldObj.theProfiler.endSection();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double dist) {
|
||||
|
||||
int range = 128;
|
||||
return dist < range * range;
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,23 +6,16 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.crash.CrashReportCategory;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityRBMKDebris extends Entity {
|
||||
public class EntityRBMKDebris extends EntityDebrisBase {
|
||||
|
||||
public float rot;
|
||||
public float lastRot;
|
||||
@ -38,17 +31,6 @@ public class EntityRBMKDebris extends Entity {
|
||||
this.setType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
this.dataWatcher.addObject(20, 0);
|
||||
this.rot = this.lastRot = this.rand.nextFloat() * 360;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeCollidedWith() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean interactFirst(EntityPlayer player) {
|
||||
|
||||
@ -152,7 +134,8 @@ public class EntityRBMKDebris extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
private int getLifetime() {
|
||||
@Override
|
||||
protected int getLifetime() {
|
||||
|
||||
switch(this.getType()) {
|
||||
case BLANK: return 3 * 60 * 20;
|
||||
@ -182,182 +165,6 @@ public class EntityRBMKDebris extends Entity {
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("debtype", this.dataWatcher.getWatchableObjectInt(20));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveEntity(double moX, double moY, double moZ) {
|
||||
|
||||
this.worldObj.theProfiler.startSection("move");
|
||||
this.ySize *= 0.4F;
|
||||
|
||||
if(this.isInWeb) {
|
||||
this.isInWeb = false;
|
||||
}
|
||||
|
||||
double initMoX = moX;
|
||||
double initMoY = moY;
|
||||
double initMoZ = moZ;
|
||||
AxisAlignedBB axisalignedbb = this.boundingBox.copy();
|
||||
|
||||
List list = this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox.addCoord(moX, moY, moZ));
|
||||
|
||||
for(int i = 0; i < list.size(); ++i) {
|
||||
moY = ((AxisAlignedBB) list.get(i)).calculateYOffset(this.boundingBox, moY);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, moY, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoY != moY) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
boolean isGoingDown = this.onGround || initMoY != moY && initMoY < 0.0D;
|
||||
int j;
|
||||
|
||||
for(j = 0; j < list.size(); ++j) {
|
||||
moX = ((AxisAlignedBB) list.get(j)).calculateXOffset(this.boundingBox, moX);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(moX, 0.0D, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoX != moX) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
for(j = 0; j < list.size(); ++j) {
|
||||
moZ = ((AxisAlignedBB) list.get(j)).calculateZOffset(this.boundingBox, moZ);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, 0.0D, moZ);
|
||||
|
||||
if(!this.field_70135_K && initMoZ != moZ) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
double d10;
|
||||
double d11;
|
||||
int k;
|
||||
double d12;
|
||||
|
||||
if(this.stepHeight > 0.0F && isGoingDown && this.ySize < 0.05F && (initMoX != moX || initMoZ != moZ)) {
|
||||
d12 = moX;
|
||||
d10 = moY;
|
||||
d11 = moZ;
|
||||
moX = initMoX;
|
||||
moY = (double) this.stepHeight;
|
||||
moZ = initMoZ;
|
||||
AxisAlignedBB axisalignedbb1 = this.boundingBox.copy();
|
||||
this.boundingBox.setBB(axisalignedbb);
|
||||
list = this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox.addCoord(initMoX, moY, initMoZ));
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moY = ((AxisAlignedBB) list.get(k)).calculateYOffset(this.boundingBox, moY);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, moY, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoY != moY) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moX = ((AxisAlignedBB) list.get(k)).calculateXOffset(this.boundingBox, moX);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(moX, 0.0D, 0.0D);
|
||||
|
||||
if(!this.field_70135_K && initMoX != moX) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moZ = ((AxisAlignedBB) list.get(k)).calculateZOffset(this.boundingBox, moZ);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, 0.0D, moZ);
|
||||
|
||||
if(!this.field_70135_K && initMoZ != moZ) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
}
|
||||
|
||||
if(!this.field_70135_K && initMoY != moY) {
|
||||
moZ = 0.0D;
|
||||
moY = 0.0D;
|
||||
moX = 0.0D;
|
||||
} else {
|
||||
moY = (double) (-this.stepHeight);
|
||||
|
||||
for(k = 0; k < list.size(); ++k) {
|
||||
moY = ((AxisAlignedBB) list.get(k)).calculateYOffset(this.boundingBox, moY);
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0.0D, moY, 0.0D);
|
||||
}
|
||||
|
||||
if(d12 * d12 + d11 * d11 >= moX * moX + moZ * moZ) {
|
||||
moX = d12;
|
||||
moY = d10;
|
||||
moZ = d11;
|
||||
this.boundingBox.setBB(axisalignedbb1);
|
||||
}
|
||||
}
|
||||
|
||||
this.worldObj.theProfiler.endSection();
|
||||
this.worldObj.theProfiler.startSection("rest");
|
||||
this.posX = (this.boundingBox.minX + this.boundingBox.maxX) / 2.0D;
|
||||
this.posY = this.boundingBox.minY + (double) this.yOffset - (double) this.ySize;
|
||||
this.posZ = (this.boundingBox.minZ + this.boundingBox.maxZ) / 2.0D;
|
||||
this.isCollidedHorizontally = initMoX != moX || initMoZ != moZ;
|
||||
this.isCollidedVertically = initMoY != moY;
|
||||
this.onGround = initMoY != moY && initMoY < 0.0D;
|
||||
this.isCollided = this.isCollidedHorizontally || this.isCollidedVertically;
|
||||
this.updateFallState(moY, this.onGround);
|
||||
|
||||
if(initMoX != moX) {
|
||||
//this.motionX = 0.0D;
|
||||
this.motionX *= -0.75D;
|
||||
|
||||
}
|
||||
|
||||
if(initMoY != moY) {
|
||||
this.motionY = 0.0D;
|
||||
}
|
||||
|
||||
if(initMoZ != moZ) {
|
||||
//this.motionZ = 0.0D;
|
||||
this.motionZ *= -0.75D;
|
||||
}
|
||||
|
||||
try {
|
||||
this.func_145775_I();
|
||||
} catch(Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Checking entity block collision");
|
||||
CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being checked for collision");
|
||||
this.addEntityCrashInfo(crashreportcategory);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
this.worldObj.theProfiler.endSection();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double dist) {
|
||||
|
||||
int range = 128;
|
||||
return dist < range * range;
|
||||
}
|
||||
|
||||
public static enum DebrisType {
|
||||
BLANK, //just a metal beam
|
||||
|
||||
160
src/main/java/com/hbm/entity/projectile/EntityZirnoxDebris.java
Normal file
@ -0,0 +1,160 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityZirnoxDebris extends EntityDebrisBase {
|
||||
|
||||
public EntityZirnoxDebris(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityZirnoxDebris(World world, double x, double y, double z, DebrisType type) {
|
||||
super(world);
|
||||
this.setPosition(x, y, z);
|
||||
this.setType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean interactFirst(EntityPlayer player) {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
switch(this.getType()) {
|
||||
case BLANK: if(player.inventory.addItemStackToInventory(new ItemStack(ModItems.debris_metal))) this.setDead(); break;
|
||||
case ELEMENT: if(player.inventory.addItemStackToInventory(new ItemStack(ModItems.debris_element))) this.setDead(); break;
|
||||
case SHRAPNEL: if(player.inventory.addItemStackToInventory(new ItemStack(ModItems.debris_shrapnel))) this.setDead(); break;
|
||||
case GRAPHITE: if(player.inventory.addItemStackToInventory(new ItemStack(ModItems.debris_graphite))) this.setDead(); break;
|
||||
case CONCRETE: if(player.inventory.addItemStackToInventory(new ItemStack(ModItems.debris_concrete))) this.setDead(); break;
|
||||
case EXCHANGER: if(player.inventory.addItemStackToInventory(new ItemStack(ModItems.debris_exchanger))) this.setDead(); break;
|
||||
}
|
||||
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(!hasSizeSet) {
|
||||
|
||||
switch(this.getType()) {
|
||||
case BLANK: this.setSize(0.5F, 0.5F); break;
|
||||
case ELEMENT: this.setSize(1F, 1F); break;
|
||||
case SHRAPNEL: this.setSize(0.5F, 0.5F); break;
|
||||
case GRAPHITE: this.setSize(0.25F, 0.25F); break;
|
||||
case CONCRETE: this.setSize(1F, 0.5F); break;
|
||||
case EXCHANGER: this.setSize(1F, 0.5F); break;
|
||||
}
|
||||
|
||||
hasSizeSet = true;
|
||||
}
|
||||
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
this.motionY -= 0.04D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
this.lastRot = this.rot;
|
||||
|
||||
if(this.onGround) {
|
||||
this.motionX *= 0.85D;
|
||||
this.motionZ *= 0.85D;
|
||||
this.motionY *= -0.5D;
|
||||
|
||||
} else {
|
||||
|
||||
this.rot += 10F;
|
||||
|
||||
if(rot >= 360F) {
|
||||
this.rot -= 360F;
|
||||
this.lastRot -= 360F;
|
||||
}
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
if((this.getType() == DebrisType.CONCRETE || this.getType() == DebrisType.EXCHANGER) && motionY > 0) {
|
||||
|
||||
Vec3 pos = Vec3.createVectorHelper(posX, posY, posZ);
|
||||
Vec3 next = Vec3.createVectorHelper(posX + motionX * 2, posY + motionY * 2, posZ + motionZ * 2);
|
||||
MovingObjectPosition mop = worldObj.func_147447_a(pos, next, false, false, false);
|
||||
|
||||
if(mop != null && mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
|
||||
int x = mop.blockX;
|
||||
int y = mop.blockY;
|
||||
int z = mop.blockZ;
|
||||
|
||||
for(int i = -1; i <= 1; i++) {
|
||||
for(int j = -1; j <= 1; j++) {
|
||||
for(int k = -1; k <= 1; k++) {
|
||||
|
||||
int rn = Math.abs(i) + Math.abs(j) + Math.abs(k);
|
||||
|
||||
if(rn <= 1 || rand.nextInt(rn) == 0)
|
||||
worldObj.setBlockToAir(x + i, y + j, z + k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
if(this.getType() == DebrisType.ELEMENT || this.getType() == DebrisType.GRAPHITE) {
|
||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(10, 10, 10));
|
||||
|
||||
for(EntityLivingBase e : entities) {
|
||||
e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 4));
|
||||
}
|
||||
}
|
||||
|
||||
if(!RBMKDials.getPermaScrap(worldObj) && this.ticksExisted > getLifetime() + this.getEntityId() % 50)
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
protected int getLifetime() {
|
||||
|
||||
switch(this.getType()) {
|
||||
case BLANK: return 3 * 60 * 20;
|
||||
case ELEMENT: return 10 * 60 * 20;
|
||||
case SHRAPNEL: return 15 * 60 * 20;
|
||||
case GRAPHITE: return 15 * 60 * 20;
|
||||
case CONCRETE: return 60 * 20;
|
||||
case EXCHANGER: return 60 * 20;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setType(DebrisType type) {
|
||||
this.dataWatcher.updateObject(20, type.ordinal());
|
||||
}
|
||||
|
||||
public DebrisType getType() {
|
||||
return DebrisType.values()[Math.abs(this.dataWatcher.getWatchableObjectInt(20)) % DebrisType.values().length];
|
||||
}
|
||||
|
||||
public static enum DebrisType {
|
||||
BLANK, //just a metal beam
|
||||
ELEMENT, //fuel element
|
||||
SHRAPNEL, //steel shrapnel from the pipes and walkways
|
||||
GRAPHITE, //spicy rock
|
||||
CONCRETE, //the all destroying harbinger of annihilation
|
||||
EXCHANGER; //the all destroying harbinger of annihilation: sideways edition
|
||||
}
|
||||
}
|
||||
@ -35,7 +35,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
public static final int maxAsbestos = 60 * 60 * 20;
|
||||
private int blacklung;
|
||||
public static final int maxBlacklung = 60 * 60 * 20;
|
||||
private int Fibrosis;
|
||||
private int fibrosis;
|
||||
public static final int maxFibrosis = 60 * 60 * 30;
|
||||
private float radEnv;
|
||||
private float radBuf;
|
||||
@ -212,14 +212,14 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
|
||||
/// PULMONARY FIBROSIS ///
|
||||
public static int getFibrosis(EntityLivingBase entity) {
|
||||
return getData(entity).Fibrosis;
|
||||
return getData(entity).fibrosis;
|
||||
}
|
||||
|
||||
public static void setFibrosis(EntityLivingBase entity, int fibrosis) {
|
||||
getData(entity).Fibrosis = fibrosis;
|
||||
getData(entity).fibrosis = fibrosis;
|
||||
|
||||
if (fibrosis >= maxFibrosis) {
|
||||
getData(entity).Fibrosis = 0;
|
||||
getData(entity).fibrosis = 0;
|
||||
entity.attackEntityFrom(ModDamageSource.asbestos, 1000);
|
||||
}
|
||||
}
|
||||
@ -260,6 +260,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
props.setInteger("hfr_bomb", bombTimer);
|
||||
props.setInteger("hfr_contagion", contagion);
|
||||
props.setInteger("hfr_blacklung", blacklung);
|
||||
props.setInteger("hfr_fibrosis", fibrosis);
|
||||
|
||||
props.setInteger("hfr_cont_count", this.contamination.size());
|
||||
|
||||
@ -282,6 +283,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
bombTimer = props.getInteger("hfr_bomb");
|
||||
contagion = props.getInteger("hfr_contagion");
|
||||
blacklung = props.getInteger("hfr_blacklung");
|
||||
fibrosis = props.getInteger("hfr_fibrosis");
|
||||
|
||||
int cont = props.getInteger("hfr_cont_count");
|
||||
|
||||
|
||||
@ -98,7 +98,8 @@ public class FluidTypeHandler {
|
||||
HELIUM3 (0xFCF0C4, 7, 2, 2, 3, 4, 0, EnumSymbol.ASPHYXIANT, "hbmfluid.helium3"),
|
||||
DEATH (0x717A88, 8, 2, 2, 2, 0, 1, EnumSymbol.ACID, "hbmfluid.death", 300, FluidTrait.CORROSIVE_2, FluidTrait.LEAD_CONTAINER),
|
||||
ETHANOL (0xe0ffff, 9, 2, 2, 2, 3, 0, EnumSymbol.NONE, "hbmfluid.ethanol"),
|
||||
HEAVYWATER (0x00a0b0, 10, 2, 2, 1, 0, 0, EnumSymbol.NONE, "hbmfluid.heavywater");
|
||||
HEAVYWATER (0x00a0b0, 10, 2, 2, 1, 0, 0, EnumSymbol.NONE, "hbmfluid.heavywater"),
|
||||
CARBONDIOXIDE (0x747474, 6, 2, 2, 3, 0, 0, EnumSymbol.ASPHYXIANT, "hbmfluid.carbondioxide");
|
||||
|
||||
//Approximate HEX Color of the fluid, used for pipe rendering
|
||||
private int color;
|
||||
|
||||
@ -860,6 +860,13 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_reactor_zirnox: {
|
||||
if(entity instanceof TileEntityReactorZirnox) {
|
||||
return new ContainerReactorZirnox(player.inventory, (TileEntityReactorZirnox) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// NON-TE CONTAINERS
|
||||
|
||||
@ -1709,6 +1716,13 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_reactor_zirnox: {
|
||||
if(entity instanceof TileEntityReactorZirnox) {
|
||||
return new GUIReactorZirnox(player.inventory, (TileEntityReactorZirnox) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// ITEM GUIS
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.packet.AuxParticlePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
@ -219,12 +220,17 @@ public class ChunkRadiationHandlerSimple extends ChunkRadiationHandler {
|
||||
|
||||
if(world.getBlock(x, y, z) == Blocks.grass) {
|
||||
world.setBlock(x, y, z, ModBlocks.waste_earth);
|
||||
|
||||
} else if(world.getBlock(x, y, z) == Blocks.tallgrass) {
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
} else if(world.getBlock(x, y, z) == Blocks.leaves) {
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
} else if(world.getBlock(x, y, z) == Blocks.leaves2) {
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
|
||||
} else if(world.getBlock(x, y, z).getMaterial() == Material.leaves && !(world.getBlock(x, y, z) == ModBlocks.waste_leaves)) {
|
||||
|
||||
if(world.rand.nextInt(7) <= 5) {
|
||||
world.setBlock(x, y, z, ModBlocks.waste_leaves);
|
||||
} else {
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,6 +168,27 @@ public class HazardRegistry {
|
||||
HazardSystem.register(block_corium_cobble, makeData(RADIATION, 150F));
|
||||
HazardSystem.register(sand_gold198, makeData(RADIATION, au198 * block * powder_mult));
|
||||
|
||||
HazardSystem.register(rod_zirnox_natural_uranium_fuel, makeData(RADIATION, u * rod_dual));
|
||||
HazardSystem.register(rod_zirnox_uranium_fuel, makeData(RADIATION, uf * rod_dual));
|
||||
HazardSystem.register(rod_zirnox_th232, makeData(RADIATION, th232 * rod_dual));
|
||||
HazardSystem.register(rod_zirnox_thorium_fuel, makeData(RADIATION, thf * rod_dual));
|
||||
HazardSystem.register(rod_zirnox_mox_fuel, makeData(RADIATION, mox * rod_dual));
|
||||
HazardSystem.register(rod_zirnox_plutonium_fuel, makeData(RADIATION, puf * rod_dual));
|
||||
HazardSystem.register(rod_zirnox_u233_fuel, makeData(RADIATION, u233 * rod_dual));
|
||||
HazardSystem.register(rod_zirnox_u235_fuel, makeData(RADIATION, u235 * rod_dual));
|
||||
|
||||
HazardSystem.register(rod_zirnox_les_fuel, makeData(RADIATION, saf * rod_dual));
|
||||
|
||||
HazardSystem.register(rod_zirnox_natural_uranium_fuel_depleted, makeData(RADIATION, 70F));
|
||||
HazardSystem.register(rod_zirnox_uranium_fuel_depleted, makeData(RADIATION, 80F));
|
||||
HazardSystem.register(rod_zirnox_thorium_fuel_depleted, makeData(RADIATION, 60F));
|
||||
HazardSystem.register(rod_zirnox_mox_fuel_depleted, makeData(RADIATION, 100F));
|
||||
HazardSystem.register(rod_zirnox_plutonium_fuel_depleted, makeData(RADIATION, 110F));
|
||||
HazardSystem.register(rod_zirnox_u233_fuel_depleted, makeData(RADIATION, 120F));
|
||||
HazardSystem.register(rod_zirnox_u235_fuel_depleted, makeData(RADIATION, 110F));
|
||||
HazardSystem.register(rod_zirnox_les_fuel_depleted, new HazardData().addEntry(RADIATION, 120F).addEntry(BLINDING, 5F));
|
||||
|
||||
HazardSystem.register(waste_natural_uranium, makeData(RADIATION, 30F));
|
||||
HazardSystem.register(waste_uranium, makeData(RADIATION, 15F));
|
||||
HazardSystem.register(waste_thorium, makeData(RADIATION, 10F));
|
||||
HazardSystem.register(waste_plutonium, makeData(RADIATION, 15F));
|
||||
@ -179,6 +200,14 @@ public class HazardRegistry {
|
||||
HazardSystem.register(waste_mox_hot, new HazardData().addEntry(RADIATION, 15F).addEntry(HOT, 5F));
|
||||
HazardSystem.register(waste_schrabidium_hot, new HazardData().addEntry(RADIATION, 40F).addEntry(HOT, 5F).addEntry(BLINDING, 5F));
|
||||
|
||||
HazardSystem.register(debris_graphite, new HazardData().addEntry(RADIATION, 70F).addEntry(HOT, 5F));
|
||||
HazardSystem.register(debris_metal, makeData(RADIATION, 5F));
|
||||
HazardSystem.register(debris_fuel, new HazardData().addEntry(RADIATION, 500F).addEntry(HOT, 5F));
|
||||
HazardSystem.register(debris_concrete, makeData(RADIATION, 30F));
|
||||
HazardSystem.register(debris_exchanger, makeData(RADIATION, 25F));
|
||||
HazardSystem.register(debris_shrapnel, makeData(RADIATION, 2.5F));
|
||||
HazardSystem.register(debris_element, makeData(RADIATION, 100F));
|
||||
|
||||
HazardSystem.register(nugget_uranium_fuel, makeData(RADIATION, uf * nugget));
|
||||
HazardSystem.register(billet_uranium_fuel, makeData(RADIATION, uf * billet));
|
||||
HazardSystem.register(ingot_uranium_fuel, makeData(RADIATION, uf * ingot));
|
||||
|
||||
@ -0,0 +1,116 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.items.machine.ItemZirnoxRod;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerReactorZirnox extends Container {
|
||||
|
||||
private TileEntityReactorZirnox zirnox;
|
||||
|
||||
public ContainerReactorZirnox(InventoryPlayer invPlayer, TileEntityReactorZirnox te) {
|
||||
zirnox = te;
|
||||
|
||||
//Rods
|
||||
this.addSlotToContainer(new Slot(te, 0, 26, 16));
|
||||
this.addSlotToContainer(new Slot(te, 1, 62, 16));
|
||||
this.addSlotToContainer(new Slot(te, 2, 98, 16));
|
||||
this.addSlotToContainer(new Slot(te, 3, 8, 34));
|
||||
this.addSlotToContainer(new Slot(te, 4, 44, 34));
|
||||
this.addSlotToContainer(new Slot(te, 5, 80, 34));
|
||||
this.addSlotToContainer(new Slot(te, 6, 116, 34));
|
||||
this.addSlotToContainer(new Slot(te, 7, 26, 52));
|
||||
this.addSlotToContainer(new Slot(te, 8, 62, 52));
|
||||
this.addSlotToContainer(new Slot(te, 9, 98, 52));
|
||||
this.addSlotToContainer(new Slot(te, 10, 8, 70));
|
||||
this.addSlotToContainer(new Slot(te, 11, 44, 70));
|
||||
this.addSlotToContainer(new Slot(te, 12, 80, 70));
|
||||
this.addSlotToContainer(new Slot(te, 13, 116, 70));
|
||||
this.addSlotToContainer(new Slot(te, 14, 26, 88));
|
||||
this.addSlotToContainer(new Slot(te, 15, 62, 88));
|
||||
this.addSlotToContainer(new Slot(te, 16, 98, 88));
|
||||
this.addSlotToContainer(new Slot(te, 17, 8, 106));
|
||||
this.addSlotToContainer(new Slot(te, 18, 44, 106));
|
||||
this.addSlotToContainer(new Slot(te, 19, 80, 106));
|
||||
this.addSlotToContainer(new Slot(te, 20, 116, 106));
|
||||
this.addSlotToContainer(new Slot(te, 21, 26, 124));
|
||||
this.addSlotToContainer(new Slot(te, 22, 62, 124));
|
||||
this.addSlotToContainer(new Slot(te, 23, 98, 124));
|
||||
|
||||
//Fluid IO
|
||||
this.addSlotToContainer(new Slot(te, 24, 143, 124));
|
||||
this.addSlotToContainer(new SlotMachineOutput(te, 26, 143, 142));
|
||||
this.addSlotToContainer(new Slot(te, 25, 179, 124));
|
||||
this.addSlotToContainer(new SlotMachineOutput(te, 27, 179, 142));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 90));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 232));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
|
||||
ItemStack var3 = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if (slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
var3 = stack.copy();
|
||||
|
||||
if (index <= 27) {
|
||||
if (!this.mergeItemStack(stack, 28, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(FluidContainerRegistry.getFluidContent(stack, FluidType.CARBONDIOXIDE) > 0) {
|
||||
if(!this.mergeItemStack(stack, 24, 25, true))
|
||||
return null;
|
||||
|
||||
} else if(FluidContainerRegistry.getFluidContent(stack, FluidType.WATER) > 0) {
|
||||
if(!this.mergeItemStack(stack, 25, 26, true))
|
||||
return null;
|
||||
|
||||
} else {
|
||||
|
||||
if(stack.getItem() instanceof ItemZirnoxRod) {
|
||||
|
||||
if(!this.mergeItemStack(stack, 0, 24, true))
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return zirnox.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -64,6 +64,7 @@ public class Fluids {
|
||||
public static FluidType PLASMA_HT;
|
||||
public static FluidType PLASMA_XM;
|
||||
public static FluidType PLASMA_BF;
|
||||
public static FluidType CARBONDIOXIDE;
|
||||
|
||||
public static final HashMap<Integer, FluidType> idMapping = new HashMap();
|
||||
public static final List<FluidType> metaOrder = new ArrayList();
|
||||
@ -138,7 +139,7 @@ public class Fluids {
|
||||
PLASMA_XM = new FluidType(0xC6A5FF, 11, 1, 2, 0, 4, 1, EnumSymbol.RADIATION, "hbmfluid.plasma_xm", 4250, FluidTrait.NO_CONTAINER, FluidTrait.NO_ID);
|
||||
PLASMA_BF = new FluidType(0xA7F1A3, 12, 1, 2, 4, 5, 4, EnumSymbol.ANTIMATTER, "hbmfluid.plasma_bf", 8500, FluidTrait.NO_CONTAINER, FluidTrait.NO_ID);
|
||||
// v v v v v v v v
|
||||
|
||||
CARBONDIOXIDE = new FluidType(0x404040, 6, 2, 2, 3, 0, 0, EnumSymbol.ASPHYXIANT, "hbmfluid.carbondioxide");
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
//ADD NEW FLUIDS HERE
|
||||
//AND DON'T FORGET THE META DOWN HERE
|
||||
@ -156,6 +157,7 @@ public class Fluids {
|
||||
metaOrder.add(ULTRAHOTSTEAM);
|
||||
metaOrder.add(SPENTSTEAM);
|
||||
//coolants
|
||||
metaOrder.add(CARBONDIOXIDE);
|
||||
metaOrder.add(COOLANT);
|
||||
metaOrder.add(CRYOGEL);
|
||||
//pure elements, cyogenic gasses
|
||||
|
||||
128
src/main/java/com/hbm/inventory/gui/GUIReactorZirnox.java
Normal file
@ -0,0 +1,128 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerReactorZirnox;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIReactorZirnox extends GuiInfoContainer {
|
||||
|
||||
//fuck you
|
||||
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/gui/reactors/gui_zirnox.png");
|
||||
private TileEntityReactorZirnox zirnox;
|
||||
|
||||
public GUIReactorZirnox(InventoryPlayer invPlayer, TileEntityReactorZirnox tile) {
|
||||
super(new ContainerReactorZirnox(invPlayer, tile));
|
||||
zirnox = tile;
|
||||
|
||||
this.xSize = 203;
|
||||
this.ySize = 256;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
zirnox.steam.renderTankInfo(this, mouseX, mouseY, guiLeft + 160, guiTop + 108, 18, 12);
|
||||
zirnox.carbonDioxide.renderTankInfo(this, mouseX, mouseY, guiLeft + 142, guiTop + 108, 18, 12);
|
||||
zirnox.water.renderTankInfo(this, mouseX, mouseY, guiLeft + 178, guiTop + 108, 18, 12);
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 160, guiTop + 33, 18, 17, new String[] { "Temperature:", " " + Math.round((zirnox.heat) * 0.00001 * 480 + 20) + "°C" });
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 178, guiTop + 33, 18, 17, new String[] { "Pressure:", " " + Math.round((zirnox.pressure) * 0.00001 * 30) + " bar" });
|
||||
|
||||
String[] info = new String[] { "CO2 transfers heat from the core", "to the water. This will boil", "the water into steam.", "Water Consumption Rate:", "100 mB/t", "2000 mB/s" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, info);
|
||||
|
||||
String[] info2 = new String[] { "Pressure can be reduced by",
|
||||
"reducing the amount of CO2",
|
||||
"in the reactor." };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, info2);
|
||||
|
||||
if(zirnox.water.getFill() <= 0) {
|
||||
String[] warn1 = new String[] { "Error: Water is required for",
|
||||
"the reactor to function properly!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, warn1);
|
||||
}
|
||||
|
||||
if(zirnox.carbonDioxide.getFill() < 4000) {
|
||||
String[] warn2 = new String[] { "Error: CO2 is required for",
|
||||
"the reactor to function properly!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 32 + 16, warn2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft + 144 <= x && guiLeft + 144 + 14 > x && guiTop + 35 < y && guiTop + 35 + 14 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(zirnox.xCoord, zirnox.yCoord, zirnox.zCoord, 0, 0));
|
||||
}
|
||||
|
||||
if(guiLeft + 151 <= x && guiLeft + 151 + 36 > x && guiTop + 51 < y && guiTop + 51 + 36 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(zirnox.xCoord, zirnox.yCoord, zirnox.zCoord, 0, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.zirnox.hasCustomInventoryName() ? this.zirnox.getInventoryName() : I18n.format(this.zirnox.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int s = zirnox.getGaugeScaled(6, 0);
|
||||
drawTexturedModalRect(guiLeft + 160, guiTop + 108, 238, 0 + 12 * s, 18, 12);
|
||||
|
||||
int c = zirnox.getGaugeScaled(6, 1);
|
||||
drawTexturedModalRect(guiLeft + 142, guiTop + 108, 238, 0 + 12 * c, 18, 12);
|
||||
|
||||
int w = zirnox.getGaugeScaled(6, 2);
|
||||
drawTexturedModalRect(guiLeft + 178, guiTop + 108, 238, 0 + 12 * w, 18, 12);
|
||||
|
||||
int h = zirnox.getGaugeScaled(12, 3);
|
||||
drawTexturedModalRect(guiLeft + 160, guiTop + 33, 220, 0 + 18 * h, 18, 17);
|
||||
|
||||
int p = zirnox.getGaugeScaled(12, 4);
|
||||
drawTexturedModalRect(guiLeft + 178, guiTop + 33, 220, 0 + 18 * p, 18, 17);
|
||||
|
||||
if(zirnox.isOn) {
|
||||
for(int x = 0; x < 4; x++)
|
||||
for(int y = 0; y < 4; y++)
|
||||
drawTexturedModalRect(guiLeft + 7 + 36 * x, guiTop + 15 + 36 * y, 238, 238, 18, 18);
|
||||
for(int x = 0; x < 3; x++)
|
||||
for(int y = 0; y < 3; y++)
|
||||
drawTexturedModalRect(guiLeft + 25 + 36 * x, guiTop + 33 + 36 * y, 238, 238, 18, 18);
|
||||
drawTexturedModalRect(guiLeft + 142, guiTop + 15, 220, 238, 18, 18);
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
|
||||
if(zirnox.water.getFill() <= 0)
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
|
||||
|
||||
if(zirnox.carbonDioxide.getFill() <= 8000)
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32 + 16, 16, 16, 7);
|
||||
}
|
||||
|
||||
}
|
||||
@ -513,6 +513,21 @@ public class AssemblerRecipes {
|
||||
new ComparableStack(ModItems.circuit_red_copper, 8),
|
||||
new ComparableStack(ModItems.circuit_gold, 3),
|
||||
}, 600);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.reactor_zirnox, 1), new AStack[] {
|
||||
new ComparableStack(ModItems.hull_big_steel, 3),
|
||||
new ComparableStack(ModItems.hull_small_steel, 6),
|
||||
new ComparableStack(ModBlocks.steel_scaffold, 4),
|
||||
new ComparableStack(ModBlocks.steel_grate, 8),
|
||||
new ComparableStack(ModBlocks.concrete_smooth, 12),
|
||||
new ComparableStack(ModBlocks.deco_pipe_quad, 12),
|
||||
new ComparableStack(ModItems.motor, 4),
|
||||
new OreDictStack(B.ingot(), 2),
|
||||
new OreDictStack(PB.ingot(), 4),
|
||||
new OreDictStack(GRAPHITE.ingot(), 24),
|
||||
new ComparableStack(ModItems.circuit_copper, 4),
|
||||
new ComparableStack(ModItems.circuit_red_copper, 2),
|
||||
}, 600);
|
||||
|
||||
makeRecipe(new ComparableStack(ModItems.gun_zomg, 1), new AStack[] {
|
||||
new ComparableStack(ModItems.crystal_xen, 2),
|
||||
|
||||
@ -23,35 +23,53 @@ public class CentrifugeRecipes {
|
||||
|
||||
public static void register() {
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_natural_uranium), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_u238, 1),
|
||||
new ItemStack(ModItems.nugget_pu_mix, 2),
|
||||
new ItemStack(ModItems.nugget_pu239, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 2) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_uranium), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_u238, 1),
|
||||
new ItemStack(ModItems.nugget_pu_mix, 2),
|
||||
new ItemStack(ModItems.nugget_technetium, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 2) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_plutonium), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_pu_mix, 1),
|
||||
new ItemStack(ModItems.nugget_pu_mix, 1),
|
||||
new ItemStack(ModItems.nugget_polonium, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_mox), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_pu_mix, 1),
|
||||
new ItemStack(ModItems.nugget_u238, 2),
|
||||
new ItemStack(ModItems.nugget_polonium, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 2) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_schrabidium), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_beryllium, 1),
|
||||
new ItemStack(ModItems.nugget_lead, 1),
|
||||
new ItemStack(ModItems.nugget_solinium, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_thorium), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_u238, 1),
|
||||
new ItemStack(ModItems.nugget_th232, 1),
|
||||
new ItemStack(ModItems.nugget_u233, 3),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 1) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_mox), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_pu_mix, 1),
|
||||
new ItemStack(ModItems.nugget_technetium, 1),
|
||||
new ItemStack(ModItems.nugget_ra226, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_plutonium), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_pu_mix, 1),
|
||||
new ItemStack(ModItems.nugget_pu_mix, 1),
|
||||
new ItemStack(ModItems.nugget_ra226, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_u233), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_u235, 1),
|
||||
new ItemStack(ModItems.nugget_technetium, 1),
|
||||
new ItemStack(ModItems.nugget_ra226, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_u235), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_pu238, 1),
|
||||
new ItemStack(ModItems.nugget_neptunium, 1),
|
||||
new ItemStack(ModItems.nugget_technetium, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.waste_schrabidium), new ItemStack[] {
|
||||
new ItemStack(ModItems.nugget_beryllium, 2),
|
||||
new ItemStack(ModItems.nugget_pu239, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) });
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.powder_cloud), new ItemStack[] {
|
||||
new ItemStack(ModItems.powder_copper, 1),
|
||||
|
||||
@ -1477,6 +1477,10 @@ public class MachineRecipes {
|
||||
case ETHANOL:
|
||||
list.add(new ItemStack(ModItems.biomass, 6));
|
||||
break;
|
||||
case METH:
|
||||
list.add(new ItemStack(Items.wheat, 1));
|
||||
list.add(new ItemStack(Items.dye, 2, 3));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1726,6 +1730,13 @@ public class MachineRecipes {
|
||||
case OSMIRIDIUM_DEATH:
|
||||
input[0] = new FluidStack(1000, FluidType.ACID);
|
||||
break;
|
||||
case METH:
|
||||
input[0] = new FluidStack(400, FluidType.LUBRICANT);
|
||||
input[1] = new FluidStack(400, FluidType.ACID);
|
||||
break;
|
||||
case CO2:
|
||||
input[0] = new FluidStack(1000, FluidType.GAS);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1883,6 +1894,10 @@ public class MachineRecipes {
|
||||
case TEL:
|
||||
output[0] = new ItemStack(ModItems.antiknock, 1);
|
||||
break;
|
||||
case METH:
|
||||
output[0] = new ItemStack(ModItems.chocolate, 2);
|
||||
output[1] = new ItemStack(ModItems.chocolate, 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -2039,6 +2054,9 @@ public class MachineRecipes {
|
||||
case ETHANOL:
|
||||
output[0] = new FluidStack(1000, FluidType.ETHANOL);
|
||||
break;
|
||||
case CO2:
|
||||
output[0] = new FluidStack(1000, FluidType.CARBONDIOXIDE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -889,6 +889,7 @@ public class ModItems {
|
||||
public static Item chocolate_milk;
|
||||
public static Item coffee;
|
||||
public static Item coffee_radium;
|
||||
public static Item chocolate;
|
||||
public static Item cap_nuka;
|
||||
public static Item cap_quantum;
|
||||
public static Item cap_sparkle;
|
||||
@ -1018,6 +1019,45 @@ public class ModItems {
|
||||
public static Item rod_coolant;
|
||||
public static Item rod_dual_coolant;
|
||||
public static Item rod_quad_coolant;
|
||||
|
||||
public static Item rod_zirnox_empty;
|
||||
public static Item rod_zirnox_natural_uranium_fuel;
|
||||
public static Item rod_zirnox_uranium_fuel;
|
||||
public static Item rod_zirnox_th232;
|
||||
public static Item rod_zirnox_thorium_fuel;
|
||||
public static Item rod_zirnox_mox_fuel;
|
||||
public static Item rod_zirnox_plutonium_fuel;
|
||||
public static Item rod_zirnox_u233_fuel;
|
||||
public static Item rod_zirnox_u235_fuel;
|
||||
public static Item rod_zirnox_les_fuel;
|
||||
public static Item rod_zirnox_lithium;
|
||||
public static Item rod_zirnox_tritium;
|
||||
|
||||
public static Item rod_zirnox_natural_uranium_fuel_depleted;
|
||||
public static Item rod_zirnox_uranium_fuel_depleted;
|
||||
public static Item rod_zirnox_thorium_fuel_depleted;
|
||||
public static Item rod_zirnox_mox_fuel_depleted;
|
||||
public static Item rod_zirnox_plutonium_fuel_depleted;
|
||||
public static Item rod_zirnox_u233_fuel_depleted;
|
||||
public static Item rod_zirnox_u235_fuel_depleted;
|
||||
public static Item rod_zirnox_les_fuel_depleted;
|
||||
|
||||
public static Item waste_natural_uranium;
|
||||
public static Item waste_uranium;
|
||||
public static Item waste_thorium;
|
||||
public static Item waste_mox;
|
||||
public static Item waste_plutonium;
|
||||
public static Item waste_u233;
|
||||
public static Item waste_u235;
|
||||
public static Item waste_schrabidium;
|
||||
public static Item waste_natural_uranium_hot;
|
||||
public static Item waste_uranium_hot;
|
||||
public static Item waste_thorium_hot;
|
||||
public static Item waste_mox_hot;
|
||||
public static Item waste_plutonium_hot;
|
||||
public static Item waste_u233_hot;
|
||||
public static Item waste_u235_hot;
|
||||
public static Item waste_schrabidium_hot;
|
||||
|
||||
public static Item pile_rod_uranium;
|
||||
public static Item pile_rod_plutonium;
|
||||
@ -1121,20 +1161,14 @@ public class ModItems {
|
||||
public static Item rod_waste;
|
||||
public static Item rod_dual_waste;
|
||||
public static Item rod_quad_waste;
|
||||
public static Item waste_uranium;
|
||||
public static Item waste_thorium;
|
||||
public static Item waste_plutonium;
|
||||
public static Item waste_mox;
|
||||
public static Item waste_schrabidium;
|
||||
public static Item waste_uranium_hot;
|
||||
public static Item waste_thorium_hot;
|
||||
public static Item waste_plutonium_hot;
|
||||
public static Item waste_mox_hot;
|
||||
public static Item waste_schrabidium_hot;
|
||||
|
||||
public static Item debris_graphite;
|
||||
public static Item debris_metal;
|
||||
public static Item debris_fuel;
|
||||
public static Item debris_concrete;
|
||||
public static Item debris_exchanger;
|
||||
public static Item debris_shrapnel;
|
||||
public static Item debris_element;
|
||||
|
||||
public static Item containment_box;
|
||||
|
||||
@ -3232,6 +3266,7 @@ public class ModItems {
|
||||
radx = new ItemPill(0).setUnlocalizedName("radx").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radx");
|
||||
siox = new ItemPill(0).setUnlocalizedName("siox").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":siox");
|
||||
xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2");
|
||||
chocolate = new ItemPill(0).setUnlocalizedName("chocolate").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":chocolate");
|
||||
fmn = new ItemPill(0).setUnlocalizedName("fmn").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tablet");
|
||||
pirfenidone = new ItemPill(0).setUnlocalizedName("pirfenidone").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pirfenidone");
|
||||
five_htp = new ItemPill(0).setUnlocalizedName("five_htp").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":5htp");
|
||||
@ -3444,21 +3479,60 @@ public class ModItems {
|
||||
rod_quad_balefire = new ItemHazard(600000F).setUnlocalizedName("rod_quad_balefire").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_balefire");
|
||||
rod_quad_balefire_blazing = new ItemHazard(1000000F, true).setUnlocalizedName("rod_quad_balefire_blazing").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_balefire_blazing");
|
||||
|
||||
rod_thorium_fuel = new ItemFuelRod(ItemHazard.thf * ItemHazard.rod, false, 100000, 10).setUnlocalizedName("rod_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_thorium_fuel");
|
||||
rod_dual_thorium_fuel = new ItemFuelRod(ItemHazard.thf * ItemHazard.rod_dual, false, 100000, 20).setUnlocalizedName("rod_dual_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_thorium_fuel");
|
||||
rod_quad_thorium_fuel = new ItemFuelRod(ItemHazard.thf * ItemHazard.rod_quad, false, 100000, 40).setUnlocalizedName("rod_quad_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_thorium_fuel");
|
||||
rod_uranium_fuel = new ItemFuelRod(ItemHazard.uf * ItemHazard.rod, false, 100000, 15).setUnlocalizedName("rod_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel");
|
||||
rod_dual_uranium_fuel = new ItemFuelRod(ItemHazard.uf * ItemHazard.rod_dual, false, 100000, 30).setUnlocalizedName("rod_dual_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel");
|
||||
rod_quad_uranium_fuel = new ItemFuelRod(ItemHazard.uf * ItemHazard.rod_quad, false, 100000, 60).setUnlocalizedName("rod_quad_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel");
|
||||
rod_plutonium_fuel = new ItemFuelRod(ItemHazard.puf * ItemHazard.rod, false, 75000, 25).setUnlocalizedName("rod_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel");
|
||||
rod_dual_plutonium_fuel = new ItemFuelRod(ItemHazard.puf * ItemHazard.rod_dual, false, 75000, 50).setUnlocalizedName("rod_dual_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel");
|
||||
rod_quad_plutonium_fuel = new ItemFuelRod(ItemHazard.puf * ItemHazard.rod_quad, false, 75000, 100).setUnlocalizedName("rod_quad_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel");
|
||||
rod_mox_fuel = new ItemFuelRod(ItemHazard.mox * ItemHazard.rod, false, 150000, 10).setUnlocalizedName("rod_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel");
|
||||
rod_dual_mox_fuel = new ItemFuelRod(ItemHazard.mox * ItemHazard.rod_dual, false, 150000, 20).setUnlocalizedName("rod_dual_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel");
|
||||
rod_quad_mox_fuel = new ItemFuelRod(ItemHazard.mox * ItemHazard.rod_quad, false, 150000, 40).setUnlocalizedName("rod_quad_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel");
|
||||
rod_schrabidium_fuel = new ItemFuelRod(ItemHazard.saf * ItemHazard.rod, true, 500000, 250).setUnlocalizedName("rod_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel");
|
||||
rod_dual_schrabidium_fuel = new ItemFuelRod(ItemHazard.saf * ItemHazard.rod_dual, true, 500000, 500).setUnlocalizedName("rod_dual_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel");
|
||||
rod_quad_schrabidium_fuel = new ItemFuelRod(ItemHazard.saf * ItemHazard.rod_quad, true, 500000, 1000).setUnlocalizedName("rod_quad_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel");
|
||||
rod_thorium_fuel = new ItemFuelRod(100000, 10).setUnlocalizedName("rod_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_thorium_fuel");
|
||||
rod_dual_thorium_fuel = new ItemFuelRod(100000, 20).setUnlocalizedName("rod_dual_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_thorium_fuel");
|
||||
rod_quad_thorium_fuel = new ItemFuelRod(100000, 40).setUnlocalizedName("rod_quad_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_thorium_fuel");
|
||||
rod_uranium_fuel = new ItemFuelRod(100000, 15).setUnlocalizedName("rod_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel");
|
||||
rod_dual_uranium_fuel = new ItemFuelRod(100000, 30).setUnlocalizedName("rod_dual_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel");
|
||||
rod_quad_uranium_fuel = new ItemFuelRod( 100000, 60).setUnlocalizedName("rod_quad_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel");
|
||||
rod_plutonium_fuel = new ItemFuelRod(75000, 25).setUnlocalizedName("rod_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel");
|
||||
rod_dual_plutonium_fuel = new ItemFuelRod(75000, 50).setUnlocalizedName("rod_dual_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel");
|
||||
rod_quad_plutonium_fuel = new ItemFuelRod(75000, 100).setUnlocalizedName("rod_quad_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel");
|
||||
rod_mox_fuel = new ItemFuelRod(150000, 10).setUnlocalizedName("rod_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel");
|
||||
rod_dual_mox_fuel = new ItemFuelRod(150000, 20).setUnlocalizedName("rod_dual_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel");
|
||||
rod_quad_mox_fuel = new ItemFuelRod(150000, 40).setUnlocalizedName("rod_quad_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel");
|
||||
rod_schrabidium_fuel = new ItemFuelRod(500000, 250).setUnlocalizedName("rod_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel");
|
||||
rod_dual_schrabidium_fuel = new ItemFuelRod(500000, 500).setUnlocalizedName("rod_dual_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel");
|
||||
rod_quad_schrabidium_fuel = new ItemFuelRod(500000, 1000).setUnlocalizedName("rod_quad_schrabidium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel");
|
||||
|
||||
rod_zirnox_empty = new Item().setUnlocalizedName("rod_zirnox_empty").setMaxStackSize(64).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_empty");
|
||||
rod_zirnox_natural_uranium_fuel = new ItemZirnoxRod(120000, 35).setUnlocalizedName("rod_zirnox_natural_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_natural_uranium_fuel");
|
||||
rod_zirnox_uranium_fuel = new ItemZirnoxRod(100000, 50).setUnlocalizedName("rod_zirnox_uranium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_uranium_fuel");
|
||||
rod_zirnox_th232 = new ItemZirnoxBreedingRod(10000, 0).setUnlocalizedName("rod_zirnox_th232").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_th232");
|
||||
rod_zirnox_thorium_fuel = new ItemZirnoxRod(120000, 30).setUnlocalizedName("rod_zirnox_thorium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_thorium_fuel");
|
||||
rod_zirnox_mox_fuel = new ItemZirnoxRod(85000, 60).setUnlocalizedName("rod_zirnox_mox_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_mox_fuel");
|
||||
rod_zirnox_plutonium_fuel = new ItemZirnoxRod(75000, 75).setUnlocalizedName("rod_zirnox_plutonium_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_plutonium_fuel");
|
||||
rod_zirnox_u233_fuel = new ItemZirnoxRod(100000, 70).setUnlocalizedName("rod_zirnox_u233_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u233_fuel");
|
||||
rod_zirnox_u235_fuel = new ItemZirnoxRod(80000, 80).setUnlocalizedName("rod_zirnox_u235_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_u235_fuel");
|
||||
rod_zirnox_les_fuel = new ItemZirnoxRod(200000, 150).setUnlocalizedName("rod_zirnox_les_fuel").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_les_fuel");
|
||||
rod_zirnox_lithium = new ItemZirnoxBreedingRod(20000, 0).setUnlocalizedName("rod_zirnox_lithium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_zirnox_lithium");
|
||||
rod_zirnox_tritium = new Item().setUnlocalizedName("rod_zirnox_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_tritium");
|
||||
|
||||
rod_zirnox_natural_uranium_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_natural_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_uranium_fuel_depleted");
|
||||
rod_zirnox_uranium_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_uranium_fuel_depleted");
|
||||
rod_zirnox_thorium_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_thorium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_thorium_fuel_depleted");
|
||||
rod_zirnox_mox_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_mox_fuel_depleted");
|
||||
rod_zirnox_plutonium_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_plutonium_fuel_depleted");
|
||||
rod_zirnox_u233_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_u233_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_u233_fuel_depleted");
|
||||
rod_zirnox_u235_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_u235_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_u235_fuel_depleted");
|
||||
rod_zirnox_les_fuel_depleted = new Item().setUnlocalizedName("rod_zirnox_les_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_zirnox_empty).setTextureName(RefStrings.MODID + ":rod_zirnox_les_fuel_depleted");
|
||||
|
||||
waste_natural_uranium = new ItemNuclearWaste().setUnlocalizedName("waste_natural_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium");
|
||||
waste_uranium = new ItemNuclearWaste().setUnlocalizedName("waste_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium");
|
||||
waste_thorium = new ItemNuclearWaste().setUnlocalizedName("waste_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium");
|
||||
waste_mox = new ItemNuclearWaste().setUnlocalizedName("waste_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox");
|
||||
waste_plutonium = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium");
|
||||
waste_u233 = new ItemNuclearWaste().setUnlocalizedName("waste_u233").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium");
|
||||
waste_u235 = new ItemNuclearWaste().setUnlocalizedName("waste_u235").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium");
|
||||
waste_schrabidium = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium");
|
||||
waste_natural_uranium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_natural_uranium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot");
|
||||
waste_uranium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_uranium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot");
|
||||
waste_thorium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_thorium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium_hot");
|
||||
waste_mox_hot = new ItemNuclearWaste().setUnlocalizedName("waste_mox_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox_hot");
|
||||
waste_plutonium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium_hot");
|
||||
waste_u233_hot = new ItemNuclearWaste().setUnlocalizedName("waste_u233_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot");
|
||||
waste_u235_hot = new ItemNuclearWaste().setUnlocalizedName("waste_u235_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot");
|
||||
waste_schrabidium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium_hot");
|
||||
|
||||
rod_water = new ItemCustomLore().setUnlocalizedName("rod_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_water");
|
||||
rod_dual_water = new ItemCustomLore().setUnlocalizedName("rod_dual_water").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_water");
|
||||
@ -3735,16 +3809,6 @@ public class ModItems {
|
||||
nuclear_waste_tiny = new ItemNuclearWaste().setUnlocalizedName("nuclear_waste_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_tiny");
|
||||
nuclear_waste_vitrified = new ItemNuclearWaste().setUnlocalizedName("nuclear_waste_vitrified").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_vitrified");
|
||||
nuclear_waste_vitrified_tiny = new ItemNuclearWaste().setUnlocalizedName("nuclear_waste_vitrified_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_vitrified_tiny");
|
||||
waste_uranium = new ItemNuclearWaste().setUnlocalizedName("waste_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium");
|
||||
waste_thorium = new ItemNuclearWaste().setUnlocalizedName("waste_thorium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium");
|
||||
waste_plutonium = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium");
|
||||
waste_mox = new ItemNuclearWaste().setUnlocalizedName("waste_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox");
|
||||
waste_schrabidium = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium");
|
||||
waste_uranium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_uranium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_uranium_hot");
|
||||
waste_thorium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_thorium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_thorium_hot");
|
||||
waste_plutonium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_plutonium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plutonium_hot");
|
||||
waste_mox_hot = new ItemNuclearWaste().setUnlocalizedName("waste_mox_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_mox_hot");
|
||||
waste_schrabidium_hot = new ItemNuclearWaste().setUnlocalizedName("waste_schrabidium_hot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_schrabidium_hot");
|
||||
scrap = new Item().setUnlocalizedName("scrap").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":scrap");
|
||||
scrap_nuclear = new Item().setUnlocalizedName("scrap_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":scrap_nuclear");
|
||||
containment_box = new ItemLeadBox().setUnlocalizedName("containment_box").setCreativeTab(null).setTextureName(RefStrings.MODID + ":containment_box");
|
||||
@ -3767,10 +3831,14 @@ public class ModItems {
|
||||
rod_dual_waste = new ItemHazard(30F).setUnlocalizedName("rod_dual_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_waste");
|
||||
rod_quad_waste = new ItemHazard(60F).setUnlocalizedName("rod_quad_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_waste");
|
||||
|
||||
debris_graphite = new ItemHazard().addRadiation(70F).toItem().setUnlocalizedName("debris_graphite").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_graphite");
|
||||
debris_metal = new ItemHazard().addRadiation(5F).toItem().setUnlocalizedName("debris_metal").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_metal");
|
||||
debris_fuel = new ItemHazard().addRadiation(1500F).addFire(15).toItem().setUnlocalizedName("debris_fuel").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_fuel");
|
||||
|
||||
debris_graphite = new Item().setUnlocalizedName("debris_graphite").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_graphite");
|
||||
debris_metal = new Item().setUnlocalizedName("debris_metal").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_metal");
|
||||
debris_fuel = new Item().setUnlocalizedName("debris_fuel").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_fuel");
|
||||
debris_concrete = new Item().setUnlocalizedName("debris_concrete").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_concrete");
|
||||
debris_exchanger = new Item().setUnlocalizedName("debris_exchanger").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_exchanger");
|
||||
debris_shrapnel =new Item().setUnlocalizedName("debris_shrapnel").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_shrapnel");
|
||||
debris_element =new Item().setUnlocalizedName("debris_element").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":debris_element");
|
||||
|
||||
pellet_cluster = new ItemCustomLore().setUnlocalizedName("pellet_cluster").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellet_cluster");
|
||||
powder_fire = new ItemCustomLore().setUnlocalizedName("powder_fire").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_red_phosphorus");
|
||||
powder_ice = new ItemCustomLore().setUnlocalizedName("powder_ice").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_ice");
|
||||
@ -4723,6 +4791,11 @@ public class ModItems {
|
||||
robes_legs = new ArmorFSB(ArmorMaterial.CHAIN, 7, 2, RefStrings.MODID + ":textures/armor/robes_2.png").cloneStats((ArmorFSB) robes_helmet).setUnlocalizedName("robes_legs").setTextureName(RefStrings.MODID + ":robes_legs");
|
||||
robes_boots = new ArmorFSB(ArmorMaterial.CHAIN, 7, 3, RefStrings.MODID + ":textures/armor/robes_1.png").cloneStats((ArmorFSB) robes_helmet).setUnlocalizedName("robes_boots").setTextureName(RefStrings.MODID + ":robes_boots");
|
||||
|
||||
initializeItem2();
|
||||
}
|
||||
|
||||
public static void initializeItem2() {
|
||||
|
||||
ArmorMaterial aMatZirconium = EnumHelper.addArmorMaterial("HBM_ZIRCONIUM", 1000, new int[] { 2, 5, 3, 1 }, 100);
|
||||
aMatZirconium.customCraftingMaterial = ModItems.ingot_zirconium;
|
||||
zirconium_legs = new ArmorFSB(aMatZirconium, 7, 2, RefStrings.MODID + ":textures/armor/zirconium_2.png").setMod(0.0F).setUnlocalizedName("zirconium_legs").setTextureName(RefStrings.MODID + ":zirconium_legs");
|
||||
@ -4869,11 +4942,6 @@ public class ModItems {
|
||||
jackt = new ModArmor(MainRegistry.aMatSteel, 7, 1).setUnlocalizedName("jackt").setTextureName(RefStrings.MODID + ":jackt");
|
||||
jackt2 = new ModArmor(MainRegistry.aMatSteel, 7, 1).setUnlocalizedName("jackt2").setTextureName(RefStrings.MODID + ":jackt2");
|
||||
|
||||
initializeItem2();
|
||||
}
|
||||
|
||||
public static void initializeItem2() {
|
||||
|
||||
chainsaw = new ItemToolAbility(25, -0.05, MainRegistry.tMatChainsaw, EnumToolType.AXE)
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
@ -6545,6 +6613,46 @@ public class ModItems {
|
||||
GameRegistry.registerItem(rod_waste, rod_waste.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_dual_waste, rod_dual_waste.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_quad_waste, rod_quad_waste.getUnlocalizedName());
|
||||
|
||||
//ZIRNOX parts
|
||||
GameRegistry.registerItem(rod_zirnox_empty, rod_zirnox_empty.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_natural_uranium_fuel, rod_zirnox_natural_uranium_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_uranium_fuel, rod_zirnox_uranium_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_th232, rod_zirnox_th232.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_thorium_fuel, rod_zirnox_thorium_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_mox_fuel, rod_zirnox_mox_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_plutonium_fuel, rod_zirnox_plutonium_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_u233_fuel, rod_zirnox_u233_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_u235_fuel, rod_zirnox_u235_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_les_fuel, rod_zirnox_les_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_lithium, rod_zirnox_lithium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_tritium, rod_zirnox_tritium.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(rod_zirnox_natural_uranium_fuel_depleted, rod_zirnox_natural_uranium_fuel_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_uranium_fuel_depleted, rod_zirnox_uranium_fuel_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_thorium_fuel_depleted, rod_zirnox_thorium_fuel_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_mox_fuel_depleted, rod_zirnox_mox_fuel_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_plutonium_fuel_depleted, rod_zirnox_plutonium_fuel_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_u233_fuel_depleted, rod_zirnox_u233_fuel_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_u235_fuel_depleted, rod_zirnox_u235_fuel_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rod_zirnox_les_fuel_depleted, rod_zirnox_les_fuel_depleted.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(waste_natural_uranium_hot, waste_natural_uranium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_uranium_hot, waste_uranium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_thorium_hot, waste_thorium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_mox_hot, waste_mox_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_plutonium_hot, waste_plutonium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_u233_hot, waste_u233_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_u235_hot, waste_u235_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_schrabidium_hot, waste_schrabidium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_natural_uranium, waste_natural_uranium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_uranium, waste_uranium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_thorium, waste_thorium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_mox, waste_mox.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_plutonium, waste_plutonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_u233, waste_u233.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_u235, waste_u235.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_schrabidium, waste_schrabidium.getUnlocalizedName());
|
||||
|
||||
//Pile parts
|
||||
GameRegistry.registerItem(pile_rod_uranium, pile_rod_uranium.getUnlocalizedName());
|
||||
@ -6621,20 +6729,14 @@ public class ModItems {
|
||||
GameRegistry.registerItem(debris_graphite, debris_graphite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(debris_metal, debris_metal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(debris_fuel, debris_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(debris_concrete, debris_concrete.getUnlocalizedName());
|
||||
GameRegistry.registerItem(debris_exchanger, debris_exchanger.getUnlocalizedName());
|
||||
GameRegistry.registerItem(debris_shrapnel, debris_shrapnel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(debris_element, debris_element.getUnlocalizedName());
|
||||
GameRegistry.registerItem(undefined, undefined.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(scrap, scrap.getUnlocalizedName());
|
||||
GameRegistry.registerItem(scrap_nuclear, scrap_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_uranium_hot, waste_uranium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_thorium_hot, waste_thorium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_plutonium_hot, waste_plutonium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_mox_hot, waste_mox_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_schrabidium_hot, waste_schrabidium_hot.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_uranium, waste_uranium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_thorium, waste_thorium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_plutonium, waste_plutonium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_mox, waste_mox.getUnlocalizedName());
|
||||
GameRegistry.registerItem(waste_schrabidium, waste_schrabidium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(trinitite, trinitite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nuclear_waste_long, nuclear_waste_long.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nuclear_waste_long_tiny, nuclear_waste_long_tiny.getUnlocalizedName());
|
||||
@ -7357,6 +7459,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(siox, siox.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pill_iodine, pill_iodine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(xanax, xanax.getUnlocalizedName());
|
||||
GameRegistry.registerItem(chocolate, chocolate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fmn, fmn.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pirfenidone, pirfenidone.getUnlocalizedName());
|
||||
GameRegistry.registerItem(five_htp, five_htp.getUnlocalizedName());
|
||||
|
||||
@ -61,6 +61,15 @@ public class ItemPill extends ItemFood {
|
||||
float digamma = HbmLivingProps.getDigamma(player);
|
||||
HbmLivingProps.setDigamma(player, Math.max(digamma - 0.5F, 0F));
|
||||
}
|
||||
|
||||
if(this == ModItems.chocolate) {
|
||||
if(rand.nextInt(25) == 0) {
|
||||
player.attackEntityFrom(ModDamageSource.overdose, 1000);
|
||||
}
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 60 * 20, 3));
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 3));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 60 * 20, 3));
|
||||
}
|
||||
|
||||
if(this == ModItems.fmn) {
|
||||
float digamma = HbmLivingProps.getDigamma(player);
|
||||
@ -100,6 +109,9 @@ public class ItemPill extends ItemFood {
|
||||
if(this == ModItems.fmn) {
|
||||
list.add("Removes all DRX above 2,000mDRX");
|
||||
}
|
||||
if(this == ModItems.chocolate) {
|
||||
list.add("Radium Chocolate? Pretty sure this is just meth.");
|
||||
}
|
||||
if(this == ModItems.pirfenidone) {
|
||||
list.add("Removes all Pulmonary Fibrosis over 35%");
|
||||
}
|
||||
|
||||
@ -105,7 +105,9 @@ public class ItemChemistryTemplate extends Item {
|
||||
FRACKSOL,
|
||||
HELIUM3,
|
||||
OSMIRIDIUM_DEATH,
|
||||
ETHANOL;
|
||||
ETHANOL,
|
||||
METH,
|
||||
CO2;
|
||||
|
||||
public static EnumChemistryTemplate getEnum(int i) {
|
||||
if(i < EnumChemistryTemplate.values().length)
|
||||
@ -309,6 +311,10 @@ public class ItemChemistryTemplate extends Item {
|
||||
return 240;
|
||||
case ETHANOL:
|
||||
return 50;
|
||||
case METH:
|
||||
return 30;
|
||||
case CO2:
|
||||
return 60;
|
||||
default:
|
||||
return 100;
|
||||
}
|
||||
|
||||
@ -2,35 +2,29 @@ package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.special.ItemHazard;
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemFuelRod extends ItemHazard {
|
||||
public class ItemFuelRod extends Item {
|
||||
|
||||
public int lifeTime;
|
||||
public int heat;
|
||||
|
||||
public ItemFuelRod(float radiation, boolean blinding, int life, int heat) {
|
||||
super();
|
||||
public ItemFuelRod(int life, int heat) {
|
||||
this.lifeTime = life;
|
||||
this.heat = heat;
|
||||
this.canRepair = false;
|
||||
|
||||
this.addRadiation(radiation);
|
||||
if(blinding)
|
||||
this.addBlinding();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add(EnumChatFormatting.YELLOW + "[Reactor Fuel Rod]");
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "[Reactor Fuel Rod]");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " Generates " + heat + " heat per tick");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " Lasts " + Library.getShortNumber(lifeTime) + " ticks");
|
||||
|
||||
@ -38,6 +32,7 @@ public class ItemFuelRod extends ItemHazard {
|
||||
}
|
||||
|
||||
public static void setLifeTime(ItemStack stack, int time) {
|
||||
|
||||
if(!stack.hasTagCompound())
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
|
||||
@ -45,6 +40,7 @@ public class ItemFuelRod extends ItemHazard {
|
||||
}
|
||||
|
||||
public static int getLifeTime(ItemStack stack) {
|
||||
|
||||
if(!stack.hasTagCompound()) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
return 0;
|
||||
@ -57,9 +53,7 @@ public class ItemFuelRod extends ItemHazard {
|
||||
return true;
|
||||
}
|
||||
|
||||
public double getDurabilityForDisplay(ItemStack stack)
|
||||
{
|
||||
public double getDurabilityForDisplay(ItemStack stack) {
|
||||
return (double)getLifeTime(stack) / (double)((ItemFuelRod)stack.getItem()).lifeTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemZirnoxBreedingRod extends ItemZirnoxRod {
|
||||
|
||||
public ItemZirnoxBreedingRod(int life, int heat) {
|
||||
super(life, heat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "[ZIRNOX Breeding Rod]");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " Place next to fuel rods to breed");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " Lasts " + Library.getShortNumber(lifeTime) + " ticks");
|
||||
}
|
||||
}
|
||||
24
src/main/java/com/hbm/items/machine/ItemZirnoxRod.java
Normal file
@ -0,0 +1,24 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemZirnoxRod extends ItemFuelRod {
|
||||
|
||||
public ItemZirnoxRod(int life, int heat) {
|
||||
super(life, heat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "[ZIRNOX Fuel Rod]");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " Generates " + heat + " heat per tick");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + " Lasts " + Library.getShortNumber(lifeTime) + " ticks");
|
||||
}
|
||||
}
|
||||
@ -51,6 +51,7 @@ public class ModDamageSource extends DamageSource {
|
||||
public static DamageSource blacklung = (new DamageSource("blacklung")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource mku = (new DamageSource("mku")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource vacuum = (new DamageSource("vacuum")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
public static DamageSource overdose = (new DamageSource("overdose")).setDamageIsAbsolute().setDamageBypassesArmor();
|
||||
|
||||
public static final String s_bullet = "revolverBullet";
|
||||
public static final String s_emplacer = "chopperBullet";
|
||||
|
||||
@ -211,6 +211,9 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSLimiter.class, new RenderAMSLimiter());
|
||||
//ZIRNOX
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityReactorZirnox.class, new RenderZirnox());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityZirnoxDestroyed.class, new RenderZirnoxDestroyed());
|
||||
//DFC
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoreEmitter.class, new RenderCoreComponent());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoreReceiver.class, new RenderCoreComponent());
|
||||
@ -466,6 +469,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEMP.class, new RenderEmpty());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBeamVortex.class, new RenderVortexBeam());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRBMKDebris.class, new RenderRBMKDebris());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityZirnoxDebris.class, new RenderZirnoxDebris());
|
||||
//grenades
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeGeneric.class, new RenderSnowball(ModItems.grenade_generic));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeStrong.class, new RenderSnowball(ModItems.grenade_strong));
|
||||
@ -1420,6 +1424,10 @@ public class ClientProxy extends ServerProxy {
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
|
||||
if("deadleaf".equals(type)) {
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleDeadLeaf(man, world, x, y, z));
|
||||
}
|
||||
|
||||
if("anim".equals(type)) {
|
||||
|
||||
if("crucible".equals(data.getString("mode")) && player.getHeldItem() != null) {
|
||||
|
||||
@ -465,6 +465,7 @@ public class MainRegistry {
|
||||
EntityRegistry.registerModEntity(EntitySpear.class, "entity_digamma_spear", 158, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityMissileVolcano.class, "entity_missile_volcano", 159, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityMissileShuttle.class, "entity_missile_shuttle", 160, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityZirnoxDebris.class, "entity_zirnox_debris", 161, this, 1000, 1, true);
|
||||
|
||||
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
|
||||
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
|
||||
|
||||
@ -263,6 +263,10 @@ public class ResourceManager {
|
||||
public static final IModelCustom spider = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mobs/blockspider.obj"));
|
||||
public static final IModelCustom ufo = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/mobs/ufo.obj"));
|
||||
|
||||
//ZIRNOX
|
||||
public static final IModelCustom zirnox = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/zirnox.obj"));
|
||||
public static final IModelCustom zirnox_destroyed = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/zirnox_destroyed.obj"));
|
||||
|
||||
//Belt
|
||||
public static final IModelCustom arrow = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/arrow.obj"));
|
||||
|
||||
@ -551,6 +555,10 @@ public class ResourceManager {
|
||||
public static final ResourceLocation iou = new ResourceLocation(RefStrings.MODID, "textures/entity/iou.png");
|
||||
public static final ResourceLocation spider_tex = new ResourceLocation(RefStrings.MODID, "textures/entity/blockspider.png");
|
||||
public static final ResourceLocation ufo_tex = new ResourceLocation(RefStrings.MODID, "textures/entity/ufo.png");
|
||||
|
||||
//ZIRNOX
|
||||
public static final ResourceLocation zirnox_tex = new ResourceLocation(RefStrings.MODID, "textures/models/zirnox.png");
|
||||
public static final ResourceLocation zirnox_destroyed_tex = new ResourceLocation(RefStrings.MODID, "textures/models/zirnox_destroyed.png");
|
||||
|
||||
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorSmall;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorControl;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
import com.hbm.tileentity.machine.TileEntitySoyuzLauncher;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
@ -282,6 +283,23 @@ public class AuxButtonPacket implements IMessage {
|
||||
base.handleButtonPacket(m.value, m.id);
|
||||
}
|
||||
|
||||
if(te instanceof TileEntityReactorZirnox) {
|
||||
TileEntityReactorZirnox zirnox = (TileEntityReactorZirnox)te;
|
||||
|
||||
if(m.id == 0) {
|
||||
zirnox.isOn = !zirnox.isOn;
|
||||
}
|
||||
|
||||
if(m.id == 1) {
|
||||
int fill = zirnox.carbonDioxide.getFill();
|
||||
zirnox.carbonDioxide.setFill(fill - 1000);
|
||||
if(fill < 0) {
|
||||
zirnox.carbonDioxide.setFill(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//why make new packets when you can just abuse and uglify the existing ones?
|
||||
if(te == null && m.value == 999) {
|
||||
|
||||
|
||||
55
src/main/java/com/hbm/particle/ParticleDeadLeaf.java
Normal file
@ -0,0 +1,55 @@
|
||||
package com.hbm.particle;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleDeadLeaf extends EntityFX {
|
||||
|
||||
public ParticleDeadLeaf(TextureManager texman, World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
this.particleRed = 0.7F + world.rand.nextFloat() * 0.05F;
|
||||
this.particleGreen = 0.2F + world.rand.nextFloat() * 0.05F;
|
||||
this.particleBlue = 0.2F + world.rand.nextFloat() * 0.05F;
|
||||
this.particleScale = 1F;
|
||||
this.particleMaxAge = 100 + world.rand.nextInt(20);
|
||||
this.particleGravity = 0.2F;
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!this.onGround) {
|
||||
this.motionX += rand.nextGaussian() * 0.075D;
|
||||
this.motionZ += rand.nextGaussian() * 0.075D;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator tess, float interp, float x, float y, float z, float tx, float tz) {
|
||||
|
||||
tess.setNormal(0.0F, 1.0F, 0.0F);
|
||||
tess.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha);
|
||||
|
||||
float f10 = this.particleScale * 0.1F;
|
||||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) interp - interpPosX);
|
||||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) interp - interpPosY);
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) interp - interpPosZ);
|
||||
|
||||
tess.addVertexWithUV((double) (f11 - x * f10 - tx * f10), (double) (f12 - y * f10), (double) (f13 - z * f10 - tz * f10), (double) 0, (double) 0);
|
||||
tess.addVertexWithUV((double) (f11 - x * f10 + tx * f10), (double) (f12 + y * f10), (double) (f13 - z * f10 + tz * f10), (double) 0, (double) 1);
|
||||
tess.addVertexWithUV((double) (f11 + x * f10 + tx * f10), (double) (f12 + y * f10), (double) (f13 + z * f10 + tz * f10), (double) 1, (double) 1);
|
||||
tess.addVertexWithUV((double)(f11 + x * f10 - tx * f10), (double)(f12 - y * f10), (double)(f13 + z * f10 - tz * f10), (double)1, (double)0);
|
||||
}
|
||||
}
|
||||
@ -84,7 +84,7 @@ public class ParticleRadiationFog extends EntityFX {
|
||||
|
||||
float alpha = 0;
|
||||
|
||||
alpha = (float) Math.sin(particleAge * Math.PI / (400F)) * 0.25F;
|
||||
alpha = (float) Math.sin(particleAge * Math.PI / (400F)) * 0.125F;
|
||||
|
||||
GL11.glColor4f(0.85F, 0.9F, 0.5F, alpha);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
package com.hbm.render.entity.projectile;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.projectile.EntityZirnoxDebris;
|
||||
import com.hbm.entity.projectile.EntityZirnoxDebris.DebrisType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderZirnoxDebris extends Render {
|
||||
|
||||
//for fallback only
|
||||
private static final ResourceLocation tex_base = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_side.png");
|
||||
private static final ResourceLocation tex_element = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_element.png");
|
||||
private static final ResourceLocation tex_blank = new ResourceLocation(RefStrings.MODID + ":textures/blocks/rbmk/rbmk_blank.png");
|
||||
private static final ResourceLocation tex_graphite = new ResourceLocation(RefStrings.MODID + ":textures/blocks/block_graphite.png");
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double x, double y, double z, float f0, float f1) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y + 0.125D, z);
|
||||
|
||||
EntityZirnoxDebris debris = (EntityZirnoxDebris) entity;
|
||||
|
||||
GL11.glRotatef(debris.getEntityId() % 360, 0, 1, 0); //rotate based on entity ID to add unique randomness
|
||||
GL11.glRotatef(debris.lastRot + (debris.rot - debris.lastRot) * f1, 1, 1, 1);
|
||||
|
||||
DebrisType type = debris.getType();
|
||||
|
||||
switch(type) {
|
||||
case BLANK: bindTexture(tex_blank); ResourceManager.deb_blank.renderAll(); break;
|
||||
case ELEMENT: bindTexture(tex_element); ResourceManager.deb_element.renderAll(); break;
|
||||
case SHRAPNEL: bindTexture(tex_blank); ResourceManager.deb_blank.renderAll(); break;
|
||||
case GRAPHITE: bindTexture(tex_graphite); ResourceManager.deb_graphite.renderAll(); break;
|
||||
case CONCRETE: bindTexture(tex_blank); ResourceManager.deb_lid.renderAll(); break;
|
||||
case EXCHANGER: bindTexture(tex_blank); ResourceManager.deb_lid.renderAll(); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||
return tex_base;
|
||||
}
|
||||
}
|
||||
@ -1157,6 +1157,17 @@ public class ItemRenderLibrary {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.reactor_zirnox), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(2.8, 2.8, 2.8);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.zirnox_tex); ResourceManager.zirnox.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
}
|
||||
|
||||
private static void bindTexture(ResourceLocation res) {
|
||||
|
||||
39
src/main/java/com/hbm/render/tileentity/RenderZirnox.java
Normal file
@ -0,0 +1,39 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderZirnox extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
switch(tileEntity.getBlockMetadata() - 10) {
|
||||
case 2:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 3:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 5:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.zirnox_tex);
|
||||
ResourceManager.zirnox.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderZirnoxDestroyed extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
switch(tileEntity.getBlockMetadata() - 10) {
|
||||
case 2:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 3:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 5:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.zirnox_destroyed_tex);
|
||||
ResourceManager.zirnox_destroyed.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
}
|
||||
@ -245,6 +245,9 @@ public class TileMappings {
|
||||
map.put(TileEntityMachineFrackingTower.class, "tileentity_fracking_tower");
|
||||
map.put(TileEntityMachineGasFlare.class, "tileentity_gasflare");
|
||||
map.put(TileEntityMachineRefinery.class, "tileentity_refinery");
|
||||
|
||||
map.put(TileEntityReactorZirnox.class, "tileentity_zirnox");
|
||||
map.put(TileEntityZirnoxDestroyed.class, "tileentity_zirnox_destroyed");
|
||||
}
|
||||
|
||||
private static void putPile() {
|
||||
|
||||
@ -77,9 +77,9 @@ public class TileEntityDeuteriumTower extends TileEntityDeuteriumExtractor imple
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord,
|
||||
xCoord - 1,
|
||||
yCoord,
|
||||
zCoord,
|
||||
zCoord - 1,
|
||||
xCoord + 2,
|
||||
yCoord + 10,
|
||||
zCoord + 2
|
||||
|
||||
@ -0,0 +1,467 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.entity.projectile.EntityZirnoxDebris;
|
||||
import com.hbm.entity.projectile.EntityZirnoxDebris.DebrisType;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemZirnoxBreedingRod;
|
||||
import com.hbm.items.machine.ItemZirnoxRod;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource {
|
||||
|
||||
public int heat;
|
||||
public static final int maxHeat = 100000;
|
||||
public int pressure;
|
||||
public static final int maxPressure = 100000;
|
||||
public boolean isOn = false;
|
||||
|
||||
public List<IFluidAcceptor> list = new ArrayList<IFluidAcceptor>();
|
||||
public byte age;
|
||||
|
||||
public FluidTank steam;
|
||||
public FluidTank carbonDioxide;
|
||||
public FluidTank water;
|
||||
|
||||
private static final HashMap<ComparableStack, ItemStack> fuelMap = new HashMap<ComparableStack, ItemStack>();
|
||||
static {
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_natural_uranium_fuel), new ItemStack(ModItems.rod_zirnox_natural_uranium_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_uranium_fuel), new ItemStack(ModItems.rod_zirnox_uranium_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_th232), new ItemStack(ModItems.rod_zirnox_thorium_fuel));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_thorium_fuel), new ItemStack(ModItems.rod_zirnox_thorium_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_mox_fuel), new ItemStack(ModItems.rod_zirnox_mox_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_plutonium_fuel), new ItemStack(ModItems.rod_zirnox_plutonium_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_u233_fuel), new ItemStack(ModItems.rod_zirnox_u233_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_u235_fuel), new ItemStack(ModItems.rod_zirnox_u235_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_les_fuel), new ItemStack(ModItems.rod_zirnox_les_fuel_depleted));
|
||||
fuelMap.put(new ComparableStack(ModItems.rod_zirnox_lithium), new ItemStack(ModItems.rod_zirnox_tritium));
|
||||
}
|
||||
|
||||
public TileEntityReactorZirnox() {
|
||||
super(28);
|
||||
steam = new FluidTank(FluidType.HOTSTEAM, 8000, 0);
|
||||
carbonDioxide = new FluidTank(FluidType.CARBONDIOXIDE, 16000, 1);
|
||||
water = new FluidTank(FluidType.WATER, 32000, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.zirnox";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
heat = nbt.getInteger("heat");
|
||||
pressure = nbt.getInteger("pressure");
|
||||
isOn = nbt.getBoolean("isOn");
|
||||
steam.readFromNBT(nbt, "steam");
|
||||
carbonDioxide.readFromNBT(nbt, "carbondioxide");
|
||||
water.readFromNBT(nbt, "water");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("heat", heat);
|
||||
nbt.setInteger("pressure", pressure);
|
||||
nbt.setBoolean("isOn", isOn);
|
||||
steam.writeToNBT(nbt, "steam");
|
||||
carbonDioxide.writeToNBT(nbt, "carbondioxide");
|
||||
water.writeToNBT(nbt, "water");
|
||||
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
this.heat = data.getInteger("heat");
|
||||
this.pressure = data.getInteger("pressure");
|
||||
this.isOn = data.getBoolean("isOn");
|
||||
}
|
||||
|
||||
public int getGaugeScaled(int i, int type) {
|
||||
switch (type) {
|
||||
case 0: return (steam.getFill() * i) / steam.getMaxFill();
|
||||
case 1: return (carbonDioxide.getFill() * i) / carbonDioxide.getMaxFill();
|
||||
case 2: return (water.getFill() * i) / water.getMaxFill();
|
||||
case 3: return (this.heat * i) / maxHeat;
|
||||
case 4: return (this.pressure * i) / maxPressure;
|
||||
default: return 1;
|
||||
}
|
||||
}
|
||||
|
||||
private int[] getNeighbouringSlots(int id) {
|
||||
|
||||
switch(id) {
|
||||
case 0:
|
||||
return new int[] { 1, 7 };
|
||||
case 1:
|
||||
return new int[] { 0, 2, 8 };
|
||||
case 2:
|
||||
return new int[] { 1, 9 };
|
||||
case 3:
|
||||
return new int[] { 4, 10 };
|
||||
case 4:
|
||||
return new int[] { 3, 5, 11 };
|
||||
case 5:
|
||||
return new int[] { 4, 6, 12 };
|
||||
case 6:
|
||||
return new int[] { 1, 5, 13 };
|
||||
case 7:
|
||||
return new int[] { 0, 8, 14 };
|
||||
case 8:
|
||||
return new int[] { 1, 7, 9, 15 };
|
||||
case 9:
|
||||
return new int[] { 4, 8, 16};
|
||||
case 10:
|
||||
return new int[] { 11, 17 };
|
||||
case 11:
|
||||
return new int[] { 10, 12, 18 };
|
||||
case 12:
|
||||
return new int[] { 11, 13, 19 };
|
||||
case 13:
|
||||
return new int[] { 12, 20 };
|
||||
case 14:
|
||||
return new int[] { 7, 15, 21 };
|
||||
case 15:
|
||||
return new int[] { 8, 14, 16, 22 };
|
||||
case 16:
|
||||
return new int[] { 9, 15, 23 };
|
||||
case 17:
|
||||
return new int[] { 10, 18 };
|
||||
case 18:
|
||||
return new int[] { 11, 17, 19 };
|
||||
case 19:
|
||||
return new int[] { 12, 18, 20 };
|
||||
case 20:
|
||||
return new int[] { 13, 19 };
|
||||
case 21:
|
||||
return new int[] { 14, 22 };
|
||||
case 22:
|
||||
return new int[] { 15, 21, 23 };
|
||||
case 23:
|
||||
return new int[] { 16, 22 };
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
age++;
|
||||
|
||||
if (age >= 20) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if(age == 9 || age == 19) {
|
||||
fillFluidInit(steam.getTankType());
|
||||
}
|
||||
|
||||
carbonDioxide.loadTank(24, 26, slots);
|
||||
water.loadTank(25, 27, slots);
|
||||
|
||||
if(isOn) {
|
||||
|
||||
for(int i = 0; i < 24; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
if(slots[i].getItem() instanceof ItemZirnoxRod)
|
||||
decay(i);
|
||||
else if(slots[i].getItem() == ModItems.meteorite_sword_bred)
|
||||
slots[i] = new ItemStack(ModItems.meteorite_sword_irradiated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.pressure = (int) ((float)this.heat * (1.5 * this.carbonDioxide.getFill() / 16000));
|
||||
|
||||
if(this.heat > 0 && this.heat < maxHeat && this.water.getFill() > 0 && this.carbonDioxide.getFill() > 0) {
|
||||
generateSteam();
|
||||
this.heat -= (int) ((float)this.heat * (Math.sqrt(this.carbonDioxide.getFill()) / 1800));
|
||||
}
|
||||
|
||||
checkIfMeltdown();
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("heat", heat);
|
||||
data.setInteger("pressure", pressure);
|
||||
data.setBoolean("isOn", isOn);
|
||||
this.networkPack(data, 150);
|
||||
|
||||
steam.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
carbonDioxide.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
water.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSteam() {
|
||||
|
||||
// function of SHS produced per tick
|
||||
// maxes out at heat% * tank capacity / 20
|
||||
double Steam = (((double) heat / (double) maxHeat) * ((double) water.getMaxFill() / 50D));
|
||||
|
||||
double Water = Steam /= 10;
|
||||
|
||||
water.setFill(water.getFill() - (int) Math.ceil(Water));
|
||||
steam.setFill(steam.getFill() + (int) Math.floor(Steam));
|
||||
|
||||
if(water.getFill() < 0)
|
||||
water.setFill(0);
|
||||
|
||||
if(steam.getFill() > steam.getMaxFill())
|
||||
steam.setFill(steam.getMaxFill());
|
||||
|
||||
}
|
||||
|
||||
private boolean hasFuelRod(int id) {
|
||||
if(id > 23)
|
||||
return false;
|
||||
|
||||
if(slots[id] != null) {
|
||||
if(!(slots[id].getItem() instanceof ItemZirnoxBreedingRod)) {
|
||||
return slots[id].getItem() instanceof ItemZirnoxRod;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private int getNeighbourCount(int id) {
|
||||
|
||||
int[] neighbours = this.getNeighbouringSlots(id);
|
||||
|
||||
if(neighbours == null)
|
||||
return 0;
|
||||
|
||||
int count = 0;
|
||||
|
||||
for(int i = 0; i < neighbours.length; i++)
|
||||
if(hasFuelRod(neighbours[i]))
|
||||
count++;
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
// itemstack in slots[id] has to contain ItemZirnoxRod
|
||||
private void decay(int id) {
|
||||
if(id > 23)
|
||||
return;
|
||||
|
||||
int decay = getNeighbourCount(id);
|
||||
|
||||
if(!(slots[id].getItem() instanceof ItemZirnoxBreedingRod)) {
|
||||
decay = getNeighbourCount(id) + 1;
|
||||
}
|
||||
|
||||
for(int i = 0; i < decay; i++) {
|
||||
ItemZirnoxRod rod = ((ItemZirnoxRod) slots[id].getItem());
|
||||
this.heat += rod.heat;
|
||||
ItemZirnoxRod.setLifeTime(slots[id], ItemZirnoxRod.getLifeTime(slots[id]) + 1);
|
||||
|
||||
if(ItemZirnoxRod.getLifeTime(slots[id]) > ((ItemZirnoxRod) slots[id].getItem()).lifeTime) {
|
||||
slots[id] = fuelMap.get(new ComparableStack(getStackInSlot(id)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void checkIfMeltdown() {
|
||||
if (this.pressure > maxPressure || this.heat > maxHeat) {
|
||||
meltdown();
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnDebris(DebrisType type) {
|
||||
|
||||
EntityZirnoxDebris debris = new EntityZirnoxDebris(worldObj, xCoord + 0.5D, yCoord + 4D, zCoord + 0.5D, type);
|
||||
debris.motionX = worldObj.rand.nextGaussian() * 1.25D;
|
||||
debris.motionZ = worldObj.rand.nextGaussian() * 1.25D;
|
||||
debris.motionY = 0.01D + worldObj.rand.nextDouble() * 1.25D;
|
||||
|
||||
if(type == DebrisType.CONCRETE) {
|
||||
debris.motionX *= 0.5D;
|
||||
debris.motionY += 0.5D;
|
||||
debris.motionZ *= 0.5D;
|
||||
}
|
||||
|
||||
if(type == DebrisType.EXCHANGER) {
|
||||
debris.motionX += 0.5D;
|
||||
debris.motionY *= 0.1D;
|
||||
debris.motionZ += 0.5D;
|
||||
}
|
||||
|
||||
worldObj.spawnEntityInWorld(debris);
|
||||
}
|
||||
|
||||
private void zirnoxDebris() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
spawnDebris(DebrisType.CONCRETE);
|
||||
spawnDebris(DebrisType.EXCHANGER);
|
||||
}
|
||||
for (int i = 0; i < 20; i++) {
|
||||
spawnDebris(DebrisType.BLANK);
|
||||
spawnDebris(DebrisType.ELEMENT);
|
||||
spawnDebris(DebrisType.SHRAPNEL);
|
||||
spawnDebris(DebrisType.GRAPHITE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void meltdown() {
|
||||
|
||||
for(int i = 0; i < slots.length; i++) {
|
||||
this.slots[i] = null;
|
||||
}
|
||||
|
||||
int[] dimensions = {1, 0, 2, 2, 2, 2,};
|
||||
worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, ModBlocks.zirnox_destroyed, this.getBlockMetadata(), 3);
|
||||
MultiblockHandlerXR.fillSpace(worldObj, this.xCoord, this.yCoord, this.zCoord, dimensions, ModBlocks.zirnox_destroyed, ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset));
|
||||
worldObj.playSoundEffect(xCoord, yCoord + 2, zCoord, "hbm:block.rbmk_explosion", 10.0F, 1.0F);
|
||||
worldObj.createExplosion(null, this.xCoord, this.yCoord + 3, this.zCoord, 12.0F, true);
|
||||
zirnoxDebris();
|
||||
ExplosionNukeGeneric.waste(worldObj, this.xCoord, this.yCoord, this.zCoord, 35);
|
||||
|
||||
if(MobConfig.enableElementals) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(100, 100, 100));
|
||||
|
||||
for(EntityPlayer player : players) {
|
||||
player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).setBoolean("radMark", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
fillFluid(this.xCoord + rot.offsetX * 3, this.yCoord + 1, this.zCoord + rot.offsetZ * 3, getTact(), type);
|
||||
fillFluid(this.xCoord + rot.offsetX * 3, this.yCoord + 3, this.zCoord + rot.offsetZ * 3, getTact(), type);
|
||||
|
||||
fillFluid(this.xCoord + rot.offsetX * -3, this.yCoord + 1, this.zCoord + rot.offsetZ * -3, getTact(), type);
|
||||
fillFluid(this.xCoord + rot.offsetX * -3, this.yCoord + 3, this.zCoord + rot.offsetZ * -3, getTact(), type);
|
||||
}
|
||||
|
||||
public boolean getTact() {
|
||||
if(age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
switch (type) {
|
||||
case HOTSTEAM: return steam.getMaxFill();
|
||||
case CARBONDIOXIDE: return carbonDioxide.getMaxFill();
|
||||
case WATER: return water.getMaxFill();
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
switch (type) {
|
||||
case HOTSTEAM: steam.setFill(i);
|
||||
break;
|
||||
case CARBONDIOXIDE: carbonDioxide.setFill(i);
|
||||
break;
|
||||
case WATER: water.setFill(i);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFluidFill(FluidType type) {
|
||||
switch (type) {
|
||||
case HOTSTEAM: return steam.getFill();
|
||||
case CARBONDIOXIDE: return carbonDioxide.getFill();
|
||||
case WATER: return water.getFill();
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setFillstate(int fill, int index) {
|
||||
switch (index) {
|
||||
case 0: steam.setFill(fill);
|
||||
break;
|
||||
case 1: carbonDioxide.setFill(fill);
|
||||
break;
|
||||
case 2: water.setFill(fill);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
public void setType(FluidType type, int index) {
|
||||
switch (index) {
|
||||
case 0: steam.setTankType(type);
|
||||
break;
|
||||
case 1: carbonDioxide.setTankType(type);
|
||||
break;
|
||||
case 2: water.setTankType(type);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList<FluidTank>();
|
||||
list.add(steam);
|
||||
list.add(carbonDioxide);
|
||||
list.add(water);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return AxisAlignedBB.getBoundingBox(xCoord - 2, yCoord, zCoord - 2, xCoord + 3, yCoord + 5, zCoord + 3);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemRBMKRod;
|
||||
|
||||
@ -20,6 +22,18 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory {
|
||||
|
||||
private String customName;
|
||||
|
||||
private static final HashMap<ItemStack, ItemStack> wasteMap = new HashMap<ItemStack, ItemStack>();
|
||||
static {
|
||||
wasteMap.put(new ItemStack(ModItems.waste_natural_uranium_hot), new ItemStack(ModItems.waste_natural_uranium));
|
||||
wasteMap.put(new ItemStack(ModItems.waste_uranium_hot), new ItemStack(ModItems.waste_uranium));
|
||||
wasteMap.put(new ItemStack(ModItems.waste_thorium_hot), new ItemStack(ModItems.waste_thorium));
|
||||
wasteMap.put(new ItemStack(ModItems.waste_mox_hot), new ItemStack(ModItems.waste_mox));
|
||||
wasteMap.put(new ItemStack(ModItems.waste_plutonium_hot), new ItemStack(ModItems.waste_plutonium));
|
||||
wasteMap.put(new ItemStack(ModItems.waste_u233_hot), new ItemStack(ModItems.waste_u233));
|
||||
wasteMap.put(new ItemStack(ModItems.waste_u235_hot), new ItemStack(ModItems.waste_u235));
|
||||
wasteMap.put(new ItemStack(ModItems.waste_schrabidium_hot), new ItemStack(ModItems.waste_schrabidium));
|
||||
}
|
||||
|
||||
public TileEntityWasteDrum() {
|
||||
slots = new ItemStack[12];
|
||||
}
|
||||
@ -94,18 +108,7 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory {
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
|
||||
Item item = itemStack.getItem();
|
||||
|
||||
if(item == ModItems.waste_mox_hot ||
|
||||
item == ModItems.waste_plutonium_hot ||
|
||||
item == ModItems.waste_schrabidium_hot ||
|
||||
item == ModItems.waste_thorium_hot ||
|
||||
item == ModItems.waste_uranium_hot)
|
||||
return true;
|
||||
|
||||
if(item instanceof ItemRBMKRod)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return wasteMap.keySet().contains(item) || item instanceof ItemRBMKRod;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -183,18 +186,11 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory {
|
||||
|
||||
Item item = itemStack.getItem();
|
||||
|
||||
if(item == ModItems.waste_mox ||
|
||||
item == ModItems.waste_plutonium ||
|
||||
item == ModItems.waste_schrabidium ||
|
||||
item == ModItems.waste_thorium ||
|
||||
item == ModItems.waste_uranium)
|
||||
return true;
|
||||
|
||||
if(item instanceof ItemRBMKRod) {
|
||||
return ItemRBMKRod.getCoreHeat(itemStack) < 50 && ItemRBMKRod.getHullHeat(itemStack) < 50;
|
||||
} else {
|
||||
return wasteMap.containsValue(item);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -233,16 +229,9 @@ public class TileEntityWasteDrum extends TileEntity implements ISidedInventory {
|
||||
|
||||
} else if(worldObj.rand.nextInt(r) == 0) {
|
||||
|
||||
if(slots[i].getItem() == ModItems.waste_uranium_hot)
|
||||
slots[i] = new ItemStack(ModItems.waste_uranium);
|
||||
else if(slots[i].getItem() == ModItems.waste_plutonium_hot)
|
||||
slots[i] = new ItemStack(ModItems.waste_plutonium);
|
||||
else if(slots[i].getItem() == ModItems.waste_thorium_hot)
|
||||
slots[i] = new ItemStack(ModItems.waste_thorium);
|
||||
else if(slots[i].getItem() == ModItems.waste_mox_hot)
|
||||
slots[i] = new ItemStack(ModItems.waste_mox);
|
||||
else if(slots[i].getItem() == ModItems.waste_schrabidium_hot)
|
||||
slots[i] = new ItemStack(ModItems.waste_schrabidium);
|
||||
if(wasteMap.keySet().contains(slots[i].getItem())) {
|
||||
slots[i] = wasteMap.get(new ItemStack(slots[i].getItem()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityZirnoxDestroyed extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(!worldObj.isRemote) {
|
||||
radiate(worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
private void radiate(World world, int x, int y, int z) {
|
||||
|
||||
float rads = 500000F;
|
||||
double range = 100D;
|
||||
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5).expand(range, range, range));
|
||||
|
||||
for(EntityLivingBase e : entities) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(e.posX - (x + 0.5), (e.posY + e.getEyeHeight()) - (y + 0.5), e.posZ - (z + 0.5));
|
||||
double len = vec.lengthVector();
|
||||
vec = vec.normalize();
|
||||
|
||||
float res = 0;
|
||||
|
||||
for(int i = 1; i < len; i++) {
|
||||
|
||||
int ix = (int)Math.floor(x + 0.5 + vec.xCoord * i);
|
||||
int iy = (int)Math.floor(y + 0.5 + vec.yCoord * i);
|
||||
int iz = (int)Math.floor(z + 0.5 + vec.zCoord * i);
|
||||
|
||||
res += world.getBlock(ix, iy, iz).getExplosionResistance(null);
|
||||
}
|
||||
|
||||
if(res < 1)
|
||||
res = 1;
|
||||
|
||||
float eRads = rads;
|
||||
eRads /= (float)res;
|
||||
eRads /= (float)(len * len);
|
||||
|
||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads);
|
||||
|
||||
if(len < 5) {
|
||||
e.attackEntityFrom(DamageSource.onFire, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return AxisAlignedBB.getBoundingBox(xCoord - 2, yCoord, zCoord - 2, xCoord + 3, yCoord + 1, zCoord + 3);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
3588
src/main/resources/assets/hbm/models/zirnox.obj
Normal file
3748
src/main/resources/assets/hbm/models/zirnox_destroyed.obj
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/gas_meltdown.png
Normal file
|
After Width: | Height: | Size: 164 B |
BIN
src/main/resources/assets/hbm/textures/blocks/waste_leaves.png
Normal file
|
After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
BIN
src/main/resources/assets/hbm/textures/items/chem_icon_CO2.png
Normal file
|
After Width: | Height: | Size: 230 B |
BIN
src/main/resources/assets/hbm/textures/items/chem_icon_METH.png
Normal file
|
After Width: | Height: | Size: 273 B |
BIN
src/main/resources/assets/hbm/textures/items/chocolate.png
Normal file
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 502 B |
|
After Width: | Height: | Size: 482 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 456 B |
|
After Width: | Height: | Size: 490 B |
|
After Width: | Height: | Size: 468 B |
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 464 B |
|
After Width: | Height: | Size: 487 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 466 B |
|
After Width: | Height: | Size: 493 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 494 B |
|
After Width: | Height: | Size: 464 B |
|
After Width: | Height: | Size: 491 B |
|
After Width: | Height: | Size: 483 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 508 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 516 B |
|
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 446 B |
|
Before Width: | Height: | Size: 376 B After Width: | Height: | Size: 501 B |
|
After Width: | Height: | Size: 440 B |
BIN
src/main/resources/assets/hbm/textures/models/zirnox.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 11 KiB |
BIN
src/main/resources/assets/hbm/textures/particle/dead_leaf.png
Normal file
|
After Width: | Height: | Size: 184 B |