pile shenanigans pt. 2
@ -253,6 +253,9 @@ public class ModBlocks {
|
|||||||
public static Block block_graphite_plutonium;
|
public static Block block_graphite_plutonium;
|
||||||
public static Block block_graphite_rod;
|
public static Block block_graphite_rod;
|
||||||
public static Block block_graphite_source;
|
public static Block block_graphite_source;
|
||||||
|
public static Block block_graphite_lithium;
|
||||||
|
public static Block block_graphite_tritium;
|
||||||
|
public static Block block_graphite_detector;
|
||||||
public static Block block_boron;
|
public static Block block_boron;
|
||||||
public static Block block_lanthanium;
|
public static Block block_lanthanium;
|
||||||
public static Block block_ra226;
|
public static Block block_ra226;
|
||||||
@ -1485,6 +1488,9 @@ public class ModBlocks {
|
|||||||
block_graphite_plutonium = new BlockGraphiteSource().setBlockName("block_graphite_plutonium");
|
block_graphite_plutonium = new BlockGraphiteSource().setBlockName("block_graphite_plutonium");
|
||||||
block_graphite_rod = new BlockGraphiteRod().setBlockName("block_graphite_rod").setBlockTextureName(RefStrings.MODID + ":block_graphite_rod_in");
|
block_graphite_rod = new BlockGraphiteRod().setBlockName("block_graphite_rod").setBlockTextureName(RefStrings.MODID + ":block_graphite_rod_in");
|
||||||
block_graphite_source = new BlockGraphiteSource().setBlockName("block_graphite_source");
|
block_graphite_source = new BlockGraphiteSource().setBlockName("block_graphite_source");
|
||||||
|
block_graphite_lithium = new BlockGraphiteBreedingFuel().setBlockName("block_graphite_lithium");
|
||||||
|
block_graphite_tritium = new BlockGraphiteBreedingProduct().setBlockName("block_graphite_tritium");
|
||||||
|
block_graphite_detector = new BlockGraphiteNeutronDetector().setBlockName("block_graphite_detector");
|
||||||
block_boron = new BlockBeaconable(Material.iron).setBlockName("block_boron").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_boron");
|
block_boron = new BlockBeaconable(Material.iron).setBlockName("block_boron").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_boron");
|
||||||
block_lanthanium = new BlockBeaconable(Material.iron).setBlockName("block_lanthanium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lanthanium");
|
block_lanthanium = new BlockBeaconable(Material.iron).setBlockName("block_lanthanium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lanthanium");
|
||||||
block_ra226 = new BlockHazard().makeBeaconable().setBlockName("block_ra226").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_ra226");
|
block_ra226 = new BlockHazard().makeBeaconable().setBlockName("block_ra226").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_ra226");
|
||||||
@ -2509,6 +2515,9 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(block_graphite_rod, block_graphite_rod.getUnlocalizedName());
|
GameRegistry.registerBlock(block_graphite_rod, block_graphite_rod.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_graphite_plutonium, block_graphite_plutonium.getUnlocalizedName());
|
GameRegistry.registerBlock(block_graphite_plutonium, block_graphite_plutonium.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_graphite_source, block_graphite_source.getUnlocalizedName());
|
GameRegistry.registerBlock(block_graphite_source, block_graphite_source.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(block_graphite_lithium, block_graphite_lithium.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(block_graphite_tritium, block_graphite_tritium.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(block_graphite_detector, block_graphite_detector.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_boron, block_boron.getUnlocalizedName());
|
GameRegistry.registerBlock(block_boron, block_boron.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_insulator, block_insulator.getUnlocalizedName());
|
GameRegistry.registerBlock(block_insulator, block_insulator.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_fiberglass, block_fiberglass.getUnlocalizedName());
|
GameRegistry.registerBlock(block_fiberglass, block_fiberglass.getUnlocalizedName());
|
||||||
|
|||||||
@ -0,0 +1,71 @@
|
|||||||
|
package com.hbm.blocks.machine.pile;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.tileentity.machine.pile.TileEntityPileBreedingFuel;
|
||||||
|
import com.hbm.tileentity.machine.pile.TileEntityPileFuel;
|
||||||
|
|
||||||
|
import api.hbm.block.IToolable;
|
||||||
|
import api.hbm.block.IToolable.ToolType;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.ChatStyle;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockGraphiteBreedingFuel extends BlockGraphiteDrilledTE implements IToolable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int mets) {
|
||||||
|
return new TileEntityPileBreedingFuel();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
super.registerBlockIcons(iconRegister);
|
||||||
|
this.blockIconAluminum = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_lithium_aluminum");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
|
if(!world.isRemote) {
|
||||||
|
|
||||||
|
if(tool == ToolType.SCREWDRIVER) {
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int cfg = meta & 3;
|
||||||
|
|
||||||
|
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||||
|
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta, 3);
|
||||||
|
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(ModItems.pile_rod_lithium));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tool == ToolType.HAND_DRILL) {
|
||||||
|
TileEntityPileBreedingFuel pile = (TileEntityPileBreedingFuel) world.getTileEntity(x, y, z);
|
||||||
|
player.addChatComponentMessage(new ChatComponentText("CP1 FUEL ASSEMBLY " + x + " " + y + " " + z).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
|
||||||
|
player.addChatComponentMessage(new ChatComponentText("DEPLETION: " + pile.progress + "/" + pile.maxProgress).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||||
|
player.addChatComponentMessage(new ChatComponentText("FLUX: " + pile.lastNeutrons).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Item getInsertedItem() {
|
||||||
|
return ModItems.pile_rod_lithium;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.hbm.blocks.machine.pile;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
|
import api.hbm.block.IToolable;
|
||||||
|
import api.hbm.block.IToolable.ToolType;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockGraphiteBreedingProduct extends BlockGraphiteDrilledBase implements IToolable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
super.registerBlockIcons(iconRegister);
|
||||||
|
this.blockIconAluminum = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_tritium_aluminum");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Item getInsertedItem() {
|
||||||
|
return ModItems.cell_tritium;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -27,6 +27,9 @@ public class BlockGraphiteDrilled extends BlockGraphiteDrilledBase implements IT
|
|||||||
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_plutonium, ModBlocks.block_graphite_plutonium)) return true;
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_plutonium, ModBlocks.block_graphite_plutonium)) return true;
|
||||||
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_source, ModBlocks.block_graphite_source)) return true;
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_source, ModBlocks.block_graphite_source)) return true;
|
||||||
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_boron, ModBlocks.block_graphite_rod)) return true;
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_boron, ModBlocks.block_graphite_rod)) return true;
|
||||||
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_lithium, ModBlocks.block_graphite_lithium)) return true;
|
||||||
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.cell_tritium, ModBlocks.block_graphite_tritium)) return true; //if you want to i guess?
|
||||||
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_detector, ModBlocks.block_graphite_detector)) return true;
|
||||||
if(meta >> 2 != 1) {
|
if(meta >> 2 != 1) {
|
||||||
if(checkInteraction(world, x, y, z, meta | 4, player, ModItems.hull_small_aluminium, ModBlocks.block_graphite_drilled)) return true;
|
if(checkInteraction(world, x, y, z, meta | 4, player, ModItems.hull_small_aluminium, ModBlocks.block_graphite_drilled)) return true;
|
||||||
if(checkInteraction(world, x, y, z, 0, player, ModItems.ingot_graphite, ModBlocks.block_graphite)) return true;
|
if(checkInteraction(world, x, y, z, 0, player, ModItems.ingot_graphite, ModBlocks.block_graphite)) return true;
|
||||||
|
|||||||
@ -8,18 +8,21 @@ import com.hbm.blocks.generic.BlockFlammable;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
|
import api.hbm.block.IToolable;
|
||||||
|
import api.hbm.block.IToolable.ToolType;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public abstract class BlockGraphiteDrilledBase extends BlockFlammable {
|
public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements IToolable {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
protected IIcon sideIcon;
|
protected IIcon sideIcon;
|
||||||
@ -74,12 +77,38 @@ public abstract class BlockGraphiteDrilledBase extends BlockFlammable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
|
if(tool != ToolType.SCREWDRIVER)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(!world.isRemote) {
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int cfg = meta & 3;
|
||||||
|
|
||||||
|
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||||
|
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta & 7, 3);
|
||||||
|
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(getInsertedItem()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Item getInsertedItem() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
|
||||||
ArrayList<ItemStack> drops = new ArrayList();
|
ArrayList<ItemStack> drops = new ArrayList();
|
||||||
drops.add(new ItemStack(ModItems.ingot_graphite, 8));
|
drops.add(new ItemStack(ModItems.ingot_graphite, 8));
|
||||||
if(meta >> 2 == 1)
|
if((meta & 4) == 4)
|
||||||
drops.add(new ItemStack(ModItems.hull_small_aluminium, 1));
|
drops.add(new ItemStack(ModItems.hull_small_aluminium, 1));
|
||||||
|
if(getInsertedItem() != null)
|
||||||
|
drops.add(new ItemStack(getInsertedItem(), 1));
|
||||||
return drops;
|
return drops;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
@ -34,13 +35,6 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
|||||||
this.blockIconAluminum = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_fuel_aluminum");
|
this.blockIconAluminum = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_fuel_aluminum");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
|
||||||
ArrayList<ItemStack> drops = super.getDrops(world, x, y, z, metadata, fortune);
|
|
||||||
drops.add(new ItemStack(ModItems.pile_rod_uranium));
|
|
||||||
return drops;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
@ -68,4 +62,9 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Item getInsertedItem() {
|
||||||
|
return ModItems.pile_rod_uranium;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,135 @@
|
|||||||
|
package com.hbm.blocks.machine.pile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.tileentity.machine.pile.TileEntityPileFuel;
|
||||||
|
import com.hbm.tileentity.machine.pile.TileEntityPileNeutronDetector;
|
||||||
|
|
||||||
|
import api.hbm.block.IToolable.ToolType;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.ChatStyle;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class BlockGraphiteNeutronDetector extends BlockGraphiteDrilledTE {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||||
|
return new TileEntityPileNeutronDetector();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
protected IIcon outIcon;
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
protected IIcon outIconAluminum;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
super.registerBlockIcons(iconRegister);
|
||||||
|
this.blockIconAluminum = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_detector_aluminum");
|
||||||
|
this.outIconAluminum = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_detector_out_aluminum");
|
||||||
|
this.outIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_detector_out");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(int side, int metadata) {
|
||||||
|
|
||||||
|
int cfg = metadata & 3;
|
||||||
|
|
||||||
|
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||||
|
if((metadata & 4) == 4)
|
||||||
|
return ((metadata & 8) > 0) ? this.outIconAluminum : this.blockIconAluminum;
|
||||||
|
return ((metadata & 8) > 0) ? this.outIcon : this.blockIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.sideIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void triggerRods(World world, int x, int y, int z) {
|
||||||
|
int oldMeta = world.getBlockMetadata(x, y, z);
|
||||||
|
int newMeta = oldMeta ^ 8; //toggle bit #4
|
||||||
|
int pureMeta = oldMeta & 3;
|
||||||
|
|
||||||
|
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
||||||
|
|
||||||
|
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "hbm:item.techBleep", 0.02F, 1.0F);
|
||||||
|
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(pureMeta * 2);
|
||||||
|
|
||||||
|
if(dir == ForgeDirection.UNKNOWN)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for(int i = -1; i <= 1; i += 1) {
|
||||||
|
|
||||||
|
int ix = x + dir.offsetX * i;
|
||||||
|
int iy = y + dir.offsetY * i;
|
||||||
|
int iz = z + dir.offsetZ * i;
|
||||||
|
|
||||||
|
while(world.getBlock(ix, iy, iz) == ModBlocks.block_graphite_rod && world.getBlockMetadata(ix, iy, iz) == oldMeta) {
|
||||||
|
|
||||||
|
world.setBlockMetadataWithNotify(ix, iy, iz, newMeta, 3);
|
||||||
|
|
||||||
|
ix += dir.offsetX * i;
|
||||||
|
iy += dir.offsetY * i;
|
||||||
|
iz += dir.offsetZ * i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
|
if(!world.isRemote) {
|
||||||
|
|
||||||
|
if(tool == ToolType.SCREWDRIVER) {
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int cfg = meta & 3;
|
||||||
|
|
||||||
|
if(!player.isSneaking()) {
|
||||||
|
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||||
|
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta & 7, 3);
|
||||||
|
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(getInsertedItem()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
TileEntityPileNeutronDetector pile = (TileEntityPileNeutronDetector) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
player.addChatComponentMessage(new ChatComponentText("CP1 FUEL ASSEMBLY " + x + " " + y + " " + z).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
|
||||||
|
player.addChatComponentMessage(new ChatComponentText("FLUX: " + pile.lastNeutrons + "/" + pile.maxNeutrons).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tool == ToolType.DEFUSER) {
|
||||||
|
TileEntityPileNeutronDetector pile = (TileEntityPileNeutronDetector) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(player.isSneaking()) {
|
||||||
|
if(pile.maxNeutrons > 1)
|
||||||
|
pile.maxNeutrons--;
|
||||||
|
} else {
|
||||||
|
pile.maxNeutrons++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Item getInsertedItem() {
|
||||||
|
return ModItems.pile_rod_detector;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,8 +9,10 @@ import com.hbm.lib.RefStrings;
|
|||||||
import api.hbm.block.IToolable;
|
import api.hbm.block.IToolable;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -64,7 +66,7 @@ public class BlockGraphiteRod extends BlockGraphiteDrilledBase implements IToola
|
|||||||
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
||||||
|
|
||||||
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.click", 0.3F, pureMeta == oldMeta ? 0.75F : 0.65F);
|
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.click", 0.3F, pureMeta == (oldMeta & 11) ? 0.75F : 0.65F);
|
||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||||
|
|
||||||
@ -95,31 +97,9 @@ public class BlockGraphiteRod extends BlockGraphiteDrilledBase implements IToola
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
|
||||||
|
|
||||||
if(tool != ToolType.SCREWDRIVER)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!world.isRemote) {
|
|
||||||
|
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
|
||||||
int cfg = meta & 3;
|
|
||||||
|
|
||||||
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
|
||||||
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta & 7, 3);
|
|
||||||
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(ModItems.pile_rod_boron));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
|
protected Item getInsertedItem() {
|
||||||
ArrayList<ItemStack> drops = super.getDrops(world, x, y, z, meta, fortune);
|
return ModItems.pile_rod_boron;
|
||||||
drops.add(new ItemStack(ModItems.pile_rod_boron));
|
|
||||||
return drops;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,33 +36,7 @@ public class BlockGraphiteSource extends BlockGraphiteDrilledTE implements ITool
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
protected Item getInsertedItem() {
|
||||||
ArrayList<ItemStack> drops = super.getDrops(world, x, y, z, metadata, fortune);
|
|
||||||
drops.add(new ItemStack(whoAmIAgain()));
|
|
||||||
return drops;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
|
||||||
|
|
||||||
if(tool != ToolType.SCREWDRIVER)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!world.isRemote) {
|
|
||||||
|
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
|
||||||
int cfg = meta & 3;
|
|
||||||
|
|
||||||
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
|
||||||
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta, 3);
|
|
||||||
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(whoAmIAgain()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Item whoAmIAgain() {
|
|
||||||
return this == ModBlocks.block_graphite_plutonium ? ModItems.pile_rod_plutonium : ModItems.pile_rod_source;
|
return this == ModBlocks.block_graphite_plutonium ? ModItems.pile_rod_plutonium : ModItems.pile_rod_source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,7 +85,9 @@ public class RodRecipes {
|
|||||||
//Pile fuel
|
//Pile fuel
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_uranium, 1), new Object[] { " U ", "PUP", " U ", 'P', IRON.plate(), 'U', U.billet() });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_uranium, 1), new Object[] { " U ", "PUP", " U ", 'P', IRON.plate(), 'U', U.billet() });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_source, 1), new Object[] { " U ", "PUP", " U ", 'P', IRON.plate(), 'U', ModItems.billet_ra226be });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_source, 1), new Object[] { " U ", "PUP", " U ", 'P', IRON.plate(), 'U', ModItems.billet_ra226be });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_boron, 1), new Object[] { "B", "W", "B", 'B', B.ingot(), 'W', KEY_PLANKS });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_boron, 1), new Object[] { " B ", " W ", " B ", 'B', B.ingot(), 'W', KEY_PLANKS });
|
||||||
|
CraftingManager.addShapelessAuto(new ItemStack(ModItems.pile_rod_lithium, 1), new Object[] { ModItems.cell_empty, LI.ingot() });
|
||||||
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pile_rod_detector, 1), new Object[] { " B ", "CM ", " B ", 'B', B.ingot(), 'C', ModItems.circuit_aluminium, 'M', ModItems.motor });
|
||||||
|
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_fuel_empty, 1), new Object[] { "ZRZ", "Z Z", "ZRZ", 'Z', ZR.ingot(), 'R', ModItems.rod_quad_empty });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rbmk_fuel_empty, 1), new Object[] { "ZRZ", "Z Z", "ZRZ", 'Z', ZR.ingot(), 'R', ModItems.rod_quad_empty });
|
||||||
addRBMKRod(U, ModItems.rbmk_fuel_ueu);
|
addRBMKRod(U, ModItems.rbmk_fuel_ueu);
|
||||||
|
|||||||
@ -131,6 +131,9 @@ public class AnvilRecipes {
|
|||||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
new ComparableStack(ModItems.plate_steel, 2),
|
new ComparableStack(ModItems.plate_steel, 2),
|
||||||
new AnvilOutput(new ItemStack(ModItems.hull_small_steel))).setTier(1));
|
new AnvilOutput(new ItemStack(ModItems.hull_small_steel))).setTier(1));
|
||||||
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
new ComparableStack(ModItems.plate_aluminium, 2),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.hull_small_aluminium))).setTier(1));
|
||||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
new ComparableStack(ModItems.coil_copper, 2),
|
new ComparableStack(ModItems.coil_copper, 2),
|
||||||
new AnvilOutput(new ItemStack(ModItems.coil_copper_torus))).setTier(1).setOverlay(OverlayType.CONSTRUCTION));
|
new AnvilOutput(new ItemStack(ModItems.coil_copper_torus))).setTier(1).setOverlay(OverlayType.CONSTRUCTION));
|
||||||
@ -551,6 +554,17 @@ public class AnvilRecipes {
|
|||||||
new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)),
|
new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)),
|
||||||
new AnvilOutput(new ItemStack(Items.stick, 2))
|
new AnvilOutput(new ItemStack(Items.stick, 2))
|
||||||
}).setTier(2));
|
}).setTier(2));
|
||||||
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
new ComparableStack(ModItems.pile_rod_detector), new AnvilOutput[] {
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.ingot_boron, 2)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.motor, 1)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.circuit_aluminium, 1))
|
||||||
|
}).setTier(2));
|
||||||
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
new ComparableStack(ModItems.pile_rod_lithium), new AnvilOutput[] {
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.lithium, 1)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.cell_empty, 1))
|
||||||
|
}).setTier(2));
|
||||||
|
|
||||||
//RBMK
|
//RBMK
|
||||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
|||||||
@ -1057,6 +1057,8 @@ public class ModItems {
|
|||||||
public static Item pile_rod_plutonium;
|
public static Item pile_rod_plutonium;
|
||||||
public static Item pile_rod_source;
|
public static Item pile_rod_source;
|
||||||
public static Item pile_rod_boron;
|
public static Item pile_rod_boron;
|
||||||
|
public static Item pile_rod_lithium;
|
||||||
|
public static Item pile_rod_detector;
|
||||||
|
|
||||||
public static Item plate_fuel_u233;
|
public static Item plate_fuel_u233;
|
||||||
public static Item plate_fuel_u235;
|
public static Item plate_fuel_u235;
|
||||||
@ -3027,7 +3029,7 @@ public class ModItems {
|
|||||||
|
|
||||||
cap_aluminium = new Item().setUnlocalizedName("cap_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cap_aluminium");
|
cap_aluminium = new Item().setUnlocalizedName("cap_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":cap_aluminium");
|
||||||
hull_small_steel = new Item().setUnlocalizedName("hull_small_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_small_steel");
|
hull_small_steel = new Item().setUnlocalizedName("hull_small_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_small_steel");
|
||||||
hull_small_aluminium = new Item().setUnlocalizedName("hull_small_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_small_aluminium");
|
hull_small_aluminium = new ItemCustomLore().setUnlocalizedName("hull_small_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_small_aluminium");
|
||||||
hull_big_steel = new Item().setUnlocalizedName("hull_big_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_big_steel");
|
hull_big_steel = new Item().setUnlocalizedName("hull_big_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_big_steel");
|
||||||
hull_big_aluminium = new Item().setUnlocalizedName("hull_big_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_big_aluminium");
|
hull_big_aluminium = new Item().setUnlocalizedName("hull_big_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_big_aluminium");
|
||||||
hull_big_titanium = new Item().setUnlocalizedName("hull_big_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_big_titanium");
|
hull_big_titanium = new Item().setUnlocalizedName("hull_big_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hull_big_titanium");
|
||||||
@ -3601,6 +3603,8 @@ public class ModItems {
|
|||||||
pile_rod_plutonium = new ItemPileRod().setUnlocalizedName("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_plutonium");
|
pile_rod_plutonium = new ItemPileRod().setUnlocalizedName("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_plutonium");
|
||||||
pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source");
|
pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source");
|
||||||
pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron");
|
pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron");
|
||||||
|
pile_rod_lithium = new ItemPileRod().setUnlocalizedName("pile_rod_lithium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_lithium");
|
||||||
|
pile_rod_detector = new ItemPileRod().setUnlocalizedName("pile_rod_detector").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_detector");
|
||||||
|
|
||||||
plate_fuel_u233 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 50).setUnlocalizedName("plate_fuel_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u233");
|
plate_fuel_u233 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 50).setUnlocalizedName("plate_fuel_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u233");
|
||||||
plate_fuel_u235 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u235");
|
plate_fuel_u235 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u235");
|
||||||
@ -6749,6 +6753,8 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(pile_rod_plutonium, pile_rod_plutonium.getUnlocalizedName());
|
GameRegistry.registerItem(pile_rod_plutonium, pile_rod_plutonium.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(pile_rod_source, pile_rod_source.getUnlocalizedName());
|
GameRegistry.registerItem(pile_rod_source, pile_rod_source.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(pile_rod_boron, pile_rod_boron.getUnlocalizedName());
|
GameRegistry.registerItem(pile_rod_boron, pile_rod_boron.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(pile_rod_lithium, pile_rod_lithium.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(pile_rod_detector, pile_rod_detector.getUnlocalizedName());
|
||||||
|
|
||||||
//Plate Fuels
|
//Plate Fuels
|
||||||
GameRegistry.registerItem(plate_fuel_u233, plate_fuel_u233.getUnlocalizedName());
|
GameRegistry.registerItem(plate_fuel_u233, plate_fuel_u233.getUnlocalizedName());
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.items.machine;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.util.I18nUtil;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -13,23 +14,17 @@ public class ItemPileRod extends Item {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||||
|
|
||||||
list.add(EnumChatFormatting.YELLOW + "Use on drilled graphite to insert");
|
|
||||||
list.add(EnumChatFormatting.YELLOW + "Use screwdriver to extract");
|
|
||||||
list.add("");
|
|
||||||
|
|
||||||
if(this == ModItems.pile_rod_uranium) {
|
String[] defaultLocs = I18nUtil.resolveKey("desc.item.pileRod").split("\\$");
|
||||||
list.add(EnumChatFormatting.GREEN + "[Reactive Fuel]");
|
|
||||||
list.add(EnumChatFormatting.YELLOW + "Use hand drill to take core sample");
|
for(String loc : defaultLocs) {
|
||||||
|
list.add(loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this == ModItems.pile_rod_boron) {
|
String[] descLocs = I18nUtil.resolveKey(this.getUnlocalizedName() + ".desc").split("\\$");
|
||||||
list.add(EnumChatFormatting.BLUE + "[Neutron Absorber]");
|
|
||||||
list.add(EnumChatFormatting.YELLOW + "Click to toggle");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this == ModItems.pile_rod_source || this == ModItems.pile_rod_plutonium) {
|
for(String loc : descLocs) {
|
||||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "[Neutron Source]");
|
list.add(loc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -273,6 +273,8 @@ public class TileMappings {
|
|||||||
private static void putPile() {
|
private static void putPile() {
|
||||||
put(TileEntityPileFuel.class, "tileentity_pile_fuel");
|
put(TileEntityPileFuel.class, "tileentity_pile_fuel");
|
||||||
put(TileEntityPileSource.class, "tileentity_pile_source");
|
put(TileEntityPileSource.class, "tileentity_pile_source");
|
||||||
|
put(TileEntityPileBreedingFuel.class, "tileentity_pile_breedingfuel");
|
||||||
|
put(TileEntityPileNeutronDetector.class, "tileentity_pile_neutrondetector");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void putRBMK() {
|
private static void putRBMK() {
|
||||||
|
|||||||
@ -23,7 +23,9 @@ public abstract class TileEntityPileBase extends TileEntity {
|
|||||||
protected void castRay(int flux, int range) {
|
protected void castRay(int flux, int range) {
|
||||||
|
|
||||||
Random rand = worldObj.rand;
|
Random rand = worldObj.rand;
|
||||||
Vec3 vec = Vec3.createVectorHelper(1, 0, 0);
|
int[] vecVals = { 0, 0, 0,};
|
||||||
|
vecVals[rand.nextInt(3)] = 1;
|
||||||
|
Vec3 vec = Vec3.createVectorHelper(vecVals[0], vecVals[1], vecVals[2]);
|
||||||
vec.rotateAroundZ((float)(rand.nextDouble() * Math.PI * 2D));
|
vec.rotateAroundZ((float)(rand.nextDouble() * Math.PI * 2D));
|
||||||
vec.rotateAroundY((float)(rand.nextDouble() * Math.PI * 2D));
|
vec.rotateAroundY((float)(rand.nextDouble() * Math.PI * 2D));
|
||||||
vec.rotateAroundX((float)(rand.nextDouble() * Math.PI * 2D));
|
vec.rotateAroundX((float)(rand.nextDouble() * Math.PI * 2D));
|
||||||
@ -79,7 +81,9 @@ public abstract class TileEntityPileBase extends TileEntity {
|
|||||||
|
|
||||||
IPileNeutronReceiver rec = (IPileNeutronReceiver) te;
|
IPileNeutronReceiver rec = (IPileNeutronReceiver) te;
|
||||||
rec.receiveNeutrons(flux);
|
rec.receiveNeutrons(flux);
|
||||||
return;
|
|
||||||
|
if(b != ModBlocks.block_graphite_detector || (meta & 8) == 0)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5));
|
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5));
|
||||||
|
|||||||
@ -0,0 +1,59 @@
|
|||||||
|
package com.hbm.tileentity.machine.pile;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.config.GeneralConfig;
|
||||||
|
|
||||||
|
import api.hbm.block.IPileNeutronReceiver;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
|
public class TileEntityPileBreedingFuel extends TileEntityPileBase implements IPileNeutronReceiver {
|
||||||
|
|
||||||
|
public int neutrons;
|
||||||
|
public int lastNeutrons;
|
||||||
|
public int progress;
|
||||||
|
public static final int maxProgress = GeneralConfig.enable528 ? 37500 : 25000;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEntity() {
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
react();
|
||||||
|
|
||||||
|
if(this.progress >= this.maxProgress) {
|
||||||
|
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.block_graphite_tritium, this.getBlockMetadata(), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void react() {
|
||||||
|
|
||||||
|
this.lastNeutrons = this.neutrons;
|
||||||
|
this.progress += this.neutrons;
|
||||||
|
|
||||||
|
this.neutrons = 0;
|
||||||
|
|
||||||
|
if(lastNeutrons <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for(int i = 0; i < 2; i++)
|
||||||
|
this.castRay(1, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void receiveNeutrons(int n) {
|
||||||
|
this.neutrons += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
super.readFromNBT(nbt);
|
||||||
|
this.progress = nbt.getInteger("progress");
|
||||||
|
this.neutrons = nbt.getInteger("neutrons");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
super.writeToNBT(nbt);
|
||||||
|
nbt.setInteger("progress", this.progress);
|
||||||
|
nbt.setInteger("neutrons", this.neutrons);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.hbm.tileentity.machine.pile;
|
||||||
|
|
||||||
|
import api.hbm.block.IPileNeutronReceiver;
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.machine.pile.BlockGraphiteNeutronDetector;
|
||||||
|
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class TileEntityPileNeutronDetector extends TileEntity implements IPileNeutronReceiver {
|
||||||
|
|
||||||
|
public int lastNeutrons;
|
||||||
|
public int neutrons;
|
||||||
|
public int maxNeutrons = 10;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEntity() {
|
||||||
|
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
|
//lastNeutrons is used to reduce the responsiveness of control rods; should cut down on sound/updates whilst keeping them still useful for automatic control.
|
||||||
|
//Even with it, the auto rods are *very* subject to triggering on and off rapidly - this is necessary, as rays in smaller piles aren't guarenteed to consistently flood all surrounding areas
|
||||||
|
if(this.neutrons >= this.maxNeutrons && (this.getBlockMetadata() & 8) > 0)
|
||||||
|
((BlockGraphiteNeutronDetector)worldObj.getBlock(xCoord, yCoord, zCoord)).triggerRods(worldObj, xCoord, yCoord, zCoord);
|
||||||
|
if(this.neutrons < this.maxNeutrons && this.lastNeutrons < this.maxNeutrons && (this.getBlockMetadata() & 8) == 0)
|
||||||
|
((BlockGraphiteNeutronDetector)worldObj.getBlock(xCoord, yCoord, zCoord)).triggerRods(worldObj, xCoord, yCoord, zCoord);
|
||||||
|
|
||||||
|
this.lastNeutrons = this.neutrons;
|
||||||
|
this.neutrons = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void receiveNeutrons(int n) {
|
||||||
|
this.neutrons += n;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
super.writeToNBT(nbt);
|
||||||
|
nbt.setInteger("maxNeutrons", this.maxNeutrons);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
super.readFromNBT(nbt);
|
||||||
|
this.maxNeutrons = nbt.getInteger("maxNeutrons");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -988,7 +988,7 @@ public class ComponentNTMFeatures {
|
|||||||
this.fillWithBlocks(world, box, featureSizeX, 0, 5, featureSizeX, 1, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall Pt. 2
|
this.fillWithBlocks(world, box, featureSizeX, 0, 5, featureSizeX, 1, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall Pt. 2
|
||||||
this.fillWithRandomizedBlocks(world, box, 6, 0, 5, featureSizeX - 1, 0, 5, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, 6, 0, 5, featureSizeX - 1, 0, 5, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithRandomizedBlocks(world, box, 6, 1, 5, 6, 1, 5, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, 6, 1, 5, 6, 1, 5, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithRandomizedBlocks(world, box, featureSizeX + 1, 1, 5, featureSizeX + 1, 1, 5, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, featureSizeX - 1, 1, 5, featureSizeX + 1, 1, 5, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithBlocks(world, box, featureSizeX, 0, featureSizeZ, featureSizeX, 1, featureSizeZ, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 2
|
this.fillWithBlocks(world, box, featureSizeX, 0, featureSizeZ, featureSizeX, 1, featureSizeZ, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 2
|
||||||
this.fillWithRandomizedBlocks(world, box, featureSizeX, 0, 6, featureSizeX, 0, featureSizeZ - 1, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, featureSizeX, 0, 6, featureSizeX, 0, featureSizeZ - 1, false, rand, RandomConcreteBricks);
|
||||||
this.fillWithRandomizedBlocks(world, box, featureSizeX, 1, 6, featureSizeX, 1, featureSizeZ - 3, false, rand, RandomConcreteBricks);
|
this.fillWithRandomizedBlocks(world, box, featureSizeX, 1, 6, featureSizeX, 1, featureSizeZ - 3, false, rand, RandomConcreteBricks);
|
||||||
|
|||||||
@ -557,6 +557,7 @@ death.attack.tau=%1$s was riddeled by %2$s using negatively charged tauons.
|
|||||||
death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into pieces.
|
death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into pieces.
|
||||||
death.attack.teleporter=%1$s was teleported into nothingness.
|
death.attack.teleporter=%1$s was teleported into nothingness.
|
||||||
|
|
||||||
|
desc.item.pileRod=§eUse on drilled graphite to insert$§eUse screwdriver to extract$
|
||||||
desc.item.rtgDecay=Decays to: %s
|
desc.item.rtgDecay=Decays to: %s
|
||||||
desc.item.rtgHeat=Power Level: %s
|
desc.item.rtgHeat=Power Level: %s
|
||||||
desc.item.wasteCooling=Cool in a Spent Fuel Pool Drum
|
desc.item.wasteCooling=Cool in a Spent Fuel Pool Drum
|
||||||
@ -1842,6 +1843,7 @@ item.hull_big_aluminium.name=Big Aluminium Shell
|
|||||||
item.hull_big_steel.name=Big Steel Shell
|
item.hull_big_steel.name=Big Steel Shell
|
||||||
item.hull_big_titanium.name=Big Titanium Shell
|
item.hull_big_titanium.name=Big Titanium Shell
|
||||||
item.hull_small_aluminium.name=Small Aluminium Shell
|
item.hull_small_aluminium.name=Small Aluminium Shell
|
||||||
|
item.hull_small_aluminium.desc=Can be inserted into drilled graphite
|
||||||
item.hull_small_steel.name=Small Steel Shell
|
item.hull_small_steel.name=Small Steel Shell
|
||||||
item.igniter.name=Igniter
|
item.igniter.name=Igniter
|
||||||
item.igniter.desc=(Used by right-clicking the Prototype)$It's a green metal handle with a$bright red button and a small lid.$At the bottom, the initials N.E. are$engraved. Whoever N.E. was, he had$a great taste in shades of green.
|
item.igniter.desc=(Used by right-clicking the Prototype)$It's a green metal handle with a$bright red button and a small lid.$At the bottom, the initials N.E. are$engraved. Whoever N.E. was, he had$a great taste in shades of green.
|
||||||
@ -2441,9 +2443,17 @@ item.pellet_rtg_weak.desc=Cheaper and weaker pellet, now with more U238!
|
|||||||
item.pellet_schrabidium.name=Pure Schrabidium Watz Pellet
|
item.pellet_schrabidium.name=Pure Schrabidium Watz Pellet
|
||||||
item.photo_panel.name=Photovoltaic Panel
|
item.photo_panel.name=Photovoltaic Panel
|
||||||
item.pile_rod_boron.name=Chicago Pile Control Rod
|
item.pile_rod_boron.name=Chicago Pile Control Rod
|
||||||
|
item.pile_rod_boron.desc=§9[Neutron Absorber]$§eClick to toggle
|
||||||
|
item.pile_rod_detector.name=Chicago Pile Control & Detector Rod
|
||||||
|
item.pile_rod_detector.desc=§9[Neutron Detector/Absorber]$§eUse defuser to increase/decrease neutron limit$§eUse screwdriver w/o sneaking to inspect flux
|
||||||
|
item.pile_rod_lithium.name=Chicago Pile Lithium Cell
|
||||||
|
item.pile_rod_lithium.desc=§a[Breedable Fuel]$§eUse hand drill to inspect core
|
||||||
item.pile_rod_plutonium.name=Chicago Pile Plutonium Rod
|
item.pile_rod_plutonium.name=Chicago Pile Plutonium Rod
|
||||||
|
item.pile_rod_plutonium.desc=§d[Neutron Source]
|
||||||
item.pile_rod_source.name=Chicago Pile Ra226Be Neutron Source
|
item.pile_rod_source.name=Chicago Pile Ra226Be Neutron Source
|
||||||
|
item.pile_rod_source.desc=§d[Neutron Source]
|
||||||
item.pile_rod_uranium.name=Chicago Pile Uranium Rod
|
item.pile_rod_uranium.name=Chicago Pile Uranium Rod
|
||||||
|
item.pile_rod_uranium.desc=§a[Reactive Fuel]$§eUse hand drill to take core sample
|
||||||
item.pill_iodine.name=Iodine Pill
|
item.pill_iodine.name=Iodine Pill
|
||||||
item.pin.name=Bobby Pin
|
item.pin.name=Bobby Pin
|
||||||
item.pin.desc="*Unmodified* success rate of picking a standard lock is ~10%.
|
item.pin.desc="*Unmodified* success rate of picking a standard lock is ~10%.
|
||||||
@ -3332,11 +3342,14 @@ tile.block_fluorite.name=Block of Fluorite
|
|||||||
tile.block_foam.name=Foam
|
tile.block_foam.name=Foam
|
||||||
tile.block_insulator.name=Roll of Insulation
|
tile.block_insulator.name=Roll of Insulation
|
||||||
tile.block_graphite.name=Block of Graphite
|
tile.block_graphite.name=Block of Graphite
|
||||||
|
tile.block_graphite_detector.name=Pile Neutron Detector
|
||||||
tile.block_graphite_drilled.name=Drilled Graphite
|
tile.block_graphite_drilled.name=Drilled Graphite
|
||||||
tile.block_graphite_fuel.name=Pile Fuel
|
tile.block_graphite_fuel.name=Pile Fuel
|
||||||
|
tile.block_graphite_lithium.name=Pile Lithium Fuel
|
||||||
tile.block_graphite_plutonium.name=Pile Fuel (Bred)
|
tile.block_graphite_plutonium.name=Pile Fuel (Bred)
|
||||||
tile.block_graphite_rod.name=Pile Control Rod
|
tile.block_graphite_rod.name=Pile Control Rod
|
||||||
tile.block_graphite_source.name=Pile Neutron Source
|
tile.block_graphite_source.name=Pile Neutron Source
|
||||||
|
tile.block_graphite_tritium.name=Pile Lithium Fuel (Bred)
|
||||||
tile.block_lead.name=Block of Lead
|
tile.block_lead.name=Block of Lead
|
||||||
tile.block_lanthanium.name=Block of Lanthanium
|
tile.block_lanthanium.name=Block of Lanthanium
|
||||||
tile.block_lithium.name=Block of Lithium
|
tile.block_lithium.name=Block of Lithium
|
||||||
|
|||||||
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 480 B |
|
After Width: | Height: | Size: 436 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 437 B |
|
After Width: | Height: | Size: 459 B |
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 276 B |