1.0.19 V
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -103,6 +103,8 @@ container.machineCoal=Kohlegenerator
|
||||
tile.launch_pad.name=Raketenabschussrampe
|
||||
container.launchPad=Raketenabschussrampe
|
||||
tile.book_guide.name=Hbm's Nuclear Tech Mod Handbuch
|
||||
tile.machine_schrabidium_transmutator.name=Schrabidium-Transmutationsgerät
|
||||
container.machine_schrabidium_transmutator=Schrabidium-Transmutationsgerät
|
||||
|
||||
tile.factory_titanium_hull.name=Einfache Fabrikshülle
|
||||
tile.factory_titanium_furnace.name=Einfache Fabrikzugriffsluke
|
||||
@ -635,4 +637,7 @@ tile.machine_converter_he_rf.name=HE zu RF Konverter
|
||||
tile.machine_converter_rf_he.name=RF zu HE Konverter
|
||||
|
||||
item.schrabidium_hammer.name=Schrabidiumhammer
|
||||
item.euphemium_stopper.name=Stopper
|
||||
item.euphemium_stopper.name=Stopper
|
||||
item.matchstick.name=Streichholz
|
||||
|
||||
item.redcoil_capacitor.name=Rotspulenkondensator
|
||||
@ -103,6 +103,8 @@ container.machineCoal=Coal Generator
|
||||
tile.launch_pad.name=Missile Launch Pad
|
||||
container.launchPad=Missile Launch Pad
|
||||
tile.book_guide.name=Hbm's Nuclear Tech Mod Manual
|
||||
tile.machine_schrabidium_transmutator.name=Schrabidium Transmutation Device
|
||||
container.machine_schrabidium_transmutator=Schrabidium Transmutation Device
|
||||
|
||||
tile.factory_titanium_hull.name=Basic Factory Casing
|
||||
tile.factory_titanium_furnace.name=Basic Factory Access Hatch
|
||||
@ -426,7 +428,7 @@ item.rod_tritium.name=Tritium Cell
|
||||
item.rod_dual_tritium.name=Dual Tritium Cell
|
||||
item.rod_quad_tritium.name=Quad Tritium Cell
|
||||
|
||||
item.levitation_unit.name=Gravitymanipulator
|
||||
item.levitation_unit.name=Gravity Manipulator
|
||||
item.thermo_unit_empty.name=Thermic Distribution Unit
|
||||
item.thermo_unit_endo.name=Coldness Distribution Unit
|
||||
item.thermo_unit_exo.name=Heat Distribution Unit
|
||||
@ -636,4 +638,7 @@ tile.machine_converter_he_rf.name=HE to RF Converter
|
||||
tile.machine_converter_rf_he.name=RF to HE Converter
|
||||
|
||||
item.schrabidium_hammer.name=Schrabidium Hammer
|
||||
item.euphemium_stopper.name=Stopper
|
||||
item.euphemium_stopper.name=Stopper
|
||||
item.matchstick.name=Matchstick
|
||||
|
||||
item.redcoil_capacitor.name=Redcoil Capacitor
|
||||
BIN
assets/hbm/textures/gui/gui_transmutator.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/hbm/textures/items/matchstick.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
assets/hbm/textures/items/redcoil_capacitor.png
Normal file
|
After Width: | Height: | Size: 299 B |
115
com/hbm/blocks/MachineSchrabidiumTransmutator.java
Normal file
@ -0,0 +1,115 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineSchrabidiumTransmutator extends BlockContainer {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private Random rand;
|
||||
private static boolean keepInventory;
|
||||
|
||||
protected MachineSchrabidiumTransmutator(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
rand = new Random();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_schrabidium_transmutator);
|
||||
}
|
||||
|
||||
@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())
|
||||
{
|
||||
TileEntityMachineSchrabidiumTransmutator entity = (TileEntityMachineSchrabidiumTransmutator) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_schrabidium_transmutator, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityMachineSchrabidiumTransmutator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
||||
{
|
||||
if (!keepInventory)
|
||||
{
|
||||
TileEntityMachineSchrabidiumTransmutator tileentityfurnace = (TileEntityMachineSchrabidiumTransmutator)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
if (tileentityfurnace != null)
|
||||
{
|
||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
||||
{
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while (itemstack.stackSize > 0)
|
||||
{
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if (j1 > itemstack.stackSize)
|
||||
{
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
{
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
}
|
||||
@ -208,10 +208,13 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_converter_he_rf;
|
||||
public static final int guiID_converter_he_rf = 28;
|
||||
|
||||
|
||||
public static Block machine_converter_rf_he;
|
||||
public static final int guiID_converter_rf_he = 29;
|
||||
|
||||
public static Block machine_schrabidium_transmutator;
|
||||
public static final int guiID_schrabidium_transmutator = 30;
|
||||
|
||||
public static Block launch_pad;
|
||||
public static Block launch_pad_generic;
|
||||
public static Block launch_pad_incendiary;
|
||||
@ -421,6 +424,8 @@ public class ModBlocks {
|
||||
|
||||
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke);
|
||||
|
||||
machine_schrabidium_transmutator = new MachineSchrabidiumTransmutator(Material.iron).setBlockName("machine_schrabidium_transmutator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock);
|
||||
|
||||
statue_elb = new DecoBlockAlt(Material.iron).setBlockName("#null").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_g = new DecoBlockAlt(Material.iron).setBlockName("#void").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_w = new DecoBlockAlt(Material.iron).setBlockName("#ngtv").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
@ -558,6 +563,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_electric_furnace_off, machine_electric_furnace_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_electric_furnace_on, machine_electric_furnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_deuterium, machine_deuterium.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName());
|
||||
|
||||
//Industrial Factories
|
||||
GameRegistry.registerBlock(factory_titanium_hull, factory_titanium_hull.getUnlocalizedName());
|
||||
|
||||
300
com/hbm/blocks/TileEntityMachineSchrabidiumTransmutator.java
Normal file
@ -0,0 +1,300 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityMachineSchrabidiumTransmutator extends TileEntity implements ISidedInventory, IConsumer {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
public int power = 0;
|
||||
public int process = 0;
|
||||
public static final int maxPower = 500000000;
|
||||
public static final int processSpeed = 60;
|
||||
Random rand = new Random();
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {1};
|
||||
private static final int[] slots_side = new int[] {3};
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineSchrabidiumTransmutator() {
|
||||
slots = new ItemStack[4];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return slots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.customName : "container.machine_schrabidium_transmutator";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
power = nbt.getShort("power") * 50000;
|
||||
process = nbt.getShort("process");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setShort("power", (short) (power/50000));
|
||||
nbt.setShort("process", (short) process);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return j != 0 || i != 1 || itemStack.getItem() == Items.bucket;
|
||||
}
|
||||
|
||||
public int getPowerScaled(int i) {
|
||||
int p = (int)(power / 50000);
|
||||
int m = (int)(maxPower / 50000);
|
||||
int r = (p * i) / m;
|
||||
return r;
|
||||
}
|
||||
|
||||
public int getProgressScaled(int i) {
|
||||
return (process * i) / processSpeed;
|
||||
}
|
||||
|
||||
public boolean canProcess() {
|
||||
if(power >= 499000000 && slots[0] != null && slots[0].getItem() == ModItems.ingot_uranium &&
|
||||
slots[2] != null && slots[2].getItem() == ModItems.redcoil_capacitor &&
|
||||
slots[2].getItemDamage() < slots[2].getMaxDamage() &&
|
||||
(slots[1] == null || (slots[1] != null && slots[1].getItem() == ModItems.ingot_schrabidium && slots[1].stackSize < slots[1].getMaxStackSize())))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isProcessing() {
|
||||
return process > 0;
|
||||
}
|
||||
|
||||
public void process() {
|
||||
process++;
|
||||
|
||||
if(process >= processSpeed) {
|
||||
|
||||
power = 0;
|
||||
process = 0;
|
||||
|
||||
slots[0].stackSize--;
|
||||
if(slots[0].stackSize <= 0)
|
||||
{
|
||||
slots[0] = null;
|
||||
}
|
||||
|
||||
if(slots[1] == null)
|
||||
{
|
||||
slots[1] = new ItemStack(ModItems.ingot_schrabidium);
|
||||
} else {
|
||||
slots[1].stackSize++;
|
||||
}
|
||||
if(slots[2] != null) {
|
||||
slots[2].setItemDamage(slots[2].getItemDamage() + 1);
|
||||
}
|
||||
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(slots[3] != null && slots[3].getItem() == ModItems.battery_creative)
|
||||
{
|
||||
power = maxPower;
|
||||
}
|
||||
|
||||
if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_generic && slots[3].getItemDamage() < 50)
|
||||
{
|
||||
power += 100;
|
||||
slots[3].setItemDamage(slots[3].getItemDamage() + 1);
|
||||
}
|
||||
|
||||
if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_advanced && slots[3].getItemDamage() < 200)
|
||||
{
|
||||
power += 100;
|
||||
slots[3].setItemDamage(slots[3].getItemDamage() + 1);
|
||||
}
|
||||
|
||||
if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.battery_schrabidium && slots[3].getItemDamage() < 1000)
|
||||
{
|
||||
power += 100;
|
||||
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
|
||||
}
|
||||
|
||||
if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.fusion_core && slots[3].getItemDamage() < 5000)
|
||||
{
|
||||
power += 100;
|
||||
slots[3].setItemDamage(slots[3].getItemDamage() + 1);
|
||||
}
|
||||
|
||||
if(power + 100 <= maxPower && slots[3] != null && slots[3].getItem() == ModItems.energy_core && slots[3].getItemDamage() < 5000)
|
||||
{
|
||||
power += 100;
|
||||
slots[3].setItemDamage(slots[3].getItemDamage() + 1);
|
||||
}
|
||||
|
||||
if(canProcess())
|
||||
{
|
||||
process();
|
||||
} else {
|
||||
process = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(int i) {
|
||||
power = i;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPower() {
|
||||
return power;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
}
|
||||
@ -170,6 +170,12 @@ public class EntityNuclearCreeper extends EntityMob {
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
if(this.isDead)
|
||||
{
|
||||
this.isDead = false;
|
||||
this.heal(10.0F);
|
||||
}
|
||||
|
||||
if (this.isEntityAlive())
|
||||
{
|
||||
this.lastActiveTime = this.timeSinceIgnited;
|
||||
|
||||
@ -26,7 +26,7 @@ private TileEntityMachineDeuterium nukeBoy;
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 26, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 44, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 80, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 140, 54));
|
||||
this.addSlotToContainer(new SlotDiFurnace(invPlayer.player, tedf, 4, 140, 54));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
|
||||
90
com/hbm/gui/ContainerMachineSchrabidiumTransmutator.java
Normal file
@ -0,0 +1,90 @@
|
||||
package com.hbm.gui;
|
||||
|
||||
import com.hbm.blocks.TileEntityMachineDeuterium;
|
||||
import com.hbm.blocks.TileEntityMachineSchrabidiumTransmutator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerMachineSchrabidiumTransmutator extends Container {
|
||||
|
||||
private TileEntityMachineSchrabidiumTransmutator nukeBoy;
|
||||
|
||||
private int power;
|
||||
private int water;
|
||||
private int sulfur;
|
||||
private int progress;
|
||||
|
||||
public ContainerMachineSchrabidiumTransmutator(InventoryPlayer invPlayer, TileEntityMachineSchrabidiumTransmutator tedf) {
|
||||
|
||||
nukeBoy = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 63));
|
||||
this.addSlotToContainer(new SlotDiFurnace(invPlayer.player, tedf, 1, 134, 63));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 26, 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 8, 108));
|
||||
|
||||
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 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return nukeBoy.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for(int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||
|
||||
if(this.power != this.nukeBoy.process)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 0, this.nukeBoy.process);
|
||||
}
|
||||
|
||||
if(this.power != this.nukeBoy.power)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.power);
|
||||
}
|
||||
}
|
||||
|
||||
this.power = this.nukeBoy.power;
|
||||
this.progress = this.nukeBoy.process;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if(i == 0)
|
||||
{
|
||||
nukeBoy.process = j;
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
nukeBoy.power = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
54
com/hbm/gui/GUIMachineSchrabidiumTransmutator.java
Normal file
@ -0,0 +1,54 @@
|
||||
package com.hbm.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.TileEntityMachineGenerator;
|
||||
import com.hbm.blocks.TileEntityMachineSchrabidiumTransmutator;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineSchrabidiumTransmutator extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_transmutator.png");
|
||||
private TileEntityMachineSchrabidiumTransmutator diFurnace;
|
||||
|
||||
public GUIMachineSchrabidiumTransmutator(InventoryPlayer invPlayer, TileEntityMachineSchrabidiumTransmutator tedf) {
|
||||
super(new ContainerMachineSchrabidiumTransmutator(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 222;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format(String.valueOf(diFurnace.getPower()) + " HE"), this.xSize / 2 - this.fontRendererObj.getStringWidth(String.valueOf(diFurnace.getPower()) + " HE") / 2, 16, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 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);
|
||||
|
||||
if(diFurnace.getPower() > 0) {
|
||||
int i = diFurnace.getPowerScaled(88);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 106 - i, 176, 88 - i, 16, i);
|
||||
}
|
||||
|
||||
if(diFurnace.isProcessing())
|
||||
{
|
||||
int j1 = diFurnace.getProgressScaled(66);
|
||||
drawTexturedModalRect(guiLeft + 64, guiTop + 55, 176, 88, j1, 66);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ public class ItemBattery extends Item {
|
||||
|
||||
public ItemBattery(int dura) {
|
||||
this.setMaxDamage(dura);
|
||||
this.setNoRepair();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
36
com/hbm/items/ItemCapacitor.java
Normal file
@ -0,0 +1,36 @@
|
||||
package com.hbm.items;
|
||||
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemCapacitor extends Item {
|
||||
|
||||
public ItemCapacitor(int dura) {
|
||||
this.setMaxDamage(dura);
|
||||
this.setNoRepair();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_)
|
||||
{
|
||||
if(!player.isSneaking())
|
||||
{
|
||||
if(stack.getItemDamage() > 0)
|
||||
{
|
||||
stack.setItemDamage((stack.getItemDamage() - 1));
|
||||
if(!world.isRemote)
|
||||
{
|
||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 2.5F, true);
|
||||
}
|
||||
world.spawnEntityInWorld(new EntityLightningBolt(world, x, y, z));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
72
com/hbm/items/ItemMatch.java
Normal file
@ -0,0 +1,72 @@
|
||||
package com.hbm.items;
|
||||
|
||||
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.world.World;
|
||||
|
||||
public class ItemMatch extends Item {
|
||||
|
||||
public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_)
|
||||
{
|
||||
if (p_77648_3_.isRemote)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_77648_7_ == 0)
|
||||
{
|
||||
--p_77648_5_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 1)
|
||||
{
|
||||
++p_77648_5_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 2)
|
||||
{
|
||||
--p_77648_6_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 3)
|
||||
{
|
||||
++p_77648_6_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 4)
|
||||
{
|
||||
--p_77648_4_;
|
||||
}
|
||||
|
||||
if (p_77648_7_ == 5)
|
||||
{
|
||||
++p_77648_4_;
|
||||
}
|
||||
|
||||
if (!p_77648_2_.canPlayerEdit(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_).getMaterial() == Material.air)
|
||||
{
|
||||
p_77648_3_.playSoundEffect((double)p_77648_4_ + 0.5D, (double)p_77648_5_ + 0.5D, (double)p_77648_6_ + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
|
||||
p_77648_3_.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.fire);
|
||||
}
|
||||
|
||||
if (!p_77648_2_.capabilities.isCreativeMode)
|
||||
{
|
||||
--p_77648_1_.stackSize;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -376,6 +376,7 @@ public class ModItems {
|
||||
public static Item fusion_core;
|
||||
public static Item energy_core;
|
||||
public static Item fuse;
|
||||
public static Item redcoil_capacitor;
|
||||
|
||||
public static Item factory_core_titanium;
|
||||
public static Item factory_core_advanced;
|
||||
@ -438,6 +439,8 @@ public class ModItems {
|
||||
public static Item alloy_axe;
|
||||
public static Item alloy_shovel;
|
||||
public static Item alloy_hoe;
|
||||
|
||||
public static Item matchstick;
|
||||
|
||||
public static Item mask_of_infamy;
|
||||
|
||||
@ -855,6 +858,7 @@ public class ModItems {
|
||||
fusion_core = new ItemBattery(5000).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fusion_core");
|
||||
energy_core = new ItemBattery(5000).setUnlocalizedName("energy_core").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":energy_core");
|
||||
fuse = new ItemCustomLore().setUnlocalizedName("fuse").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fuse");
|
||||
redcoil_capacitor = new ItemCapacitor(10).setUnlocalizedName("redcoil_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":redcoil_capacitor");
|
||||
|
||||
factory_core_titanium = new ItemBattery(70400).setUnlocalizedName("factory_core_titanium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":factory_core_titanium");
|
||||
factory_core_advanced = new ItemBattery(41600).setUnlocalizedName("factory_core_advanced").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":factory_core_advanced");
|
||||
@ -956,6 +960,7 @@ public class ModItems {
|
||||
|
||||
schrabidium_hammer = new WeaponSpecial(MainRegistry.enumToolMaterialHammer).setUnlocalizedName("schrabidium_hammer").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_hammer");
|
||||
euphemium_stopper = new ItemSyringe().setUnlocalizedName("euphemium_stopper").setMaxStackSize(1).setFull3D().setTextureName(RefStrings.MODID + ":euphemium_stopper");
|
||||
matchstick = new ItemMatch().setUnlocalizedName("matchstick").setCreativeTab(CreativeTabs.tabTools).setFull3D().setTextureName(RefStrings.MODID + ":matchstick");
|
||||
|
||||
smoke1 = new Item().setUnlocalizedName("smoke1").setTextureName(RefStrings.MODID + ":smoke1");
|
||||
smoke2 = new Item().setUnlocalizedName("smoke2").setTextureName(RefStrings.MODID + ":smoke2");
|
||||
@ -1178,6 +1183,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(factory_core_titanium, factory_core_titanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(factory_core_advanced, factory_core_advanced.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fuse, fuse.getUnlocalizedName());
|
||||
GameRegistry.registerItem(redcoil_capacitor, redcoil_capacitor.getUnlocalizedName());
|
||||
|
||||
//Fuelrods
|
||||
GameRegistry.registerItem(rod_empty, rod_empty.getUnlocalizedName());
|
||||
@ -1361,6 +1367,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(alloy_axe, alloy_axe.getUnlocalizedName());
|
||||
GameRegistry.registerItem(alloy_shovel, alloy_shovel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(alloy_hoe, alloy_hoe.getUnlocalizedName());
|
||||
GameRegistry.registerItem(matchstick, matchstick.getUnlocalizedName());
|
||||
|
||||
//Syringes
|
||||
GameRegistry.registerItem(syringe_empty, syringe_empty.getUnlocalizedName());
|
||||
|
||||
@ -132,6 +132,18 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_beryllium, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
if(MainRegistry.enableBarrels)
|
||||
{
|
||||
for (int k = 0; k < 1; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
int randPosZ = j + rand.nextInt(16);
|
||||
|
||||
(new WorldGenMinable(ModBlocks.yellow_barrel, 20)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
}
|
||||
|
||||
if(MainRegistry.enableDungeons) {
|
||||
|
||||
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(i, j);
|
||||
|
||||
@ -81,9 +81,12 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_schrabidium), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_schrabidium });
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_advanced_alloy), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_advanced_alloy });
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 1), new Object[] { ModItems.nugget_u235, ModItems.nugget_u235, ModItems.nugget_u235, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238 });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_plutonium_fuel, 1), new Object[] { ModItems.nugget_pu238, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu240, ModItems.nugget_pu240 });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_mox_fuel, 1), new Object[] { ModItems.nugget_u235, ModItems.nugget_u235, ModItems.nugget_u235, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_pu238, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239 });
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 1), new Object[] { "nuggetUranium235", "nuggetUranium235", "nuggetUranium235", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_plutonium_fuel, 1), new Object[] { "nuggetPlutonium238", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium240", "nuggetPlutonium240", "nuggetPlutonium240" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_mox_fuel, 1), new Object[] { "nuggetUranium235", "nuggetUranium235", "nuggetUranium235", "nuggetUranium238", "nuggetUranium238", "nuggetPlutonium238", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium239" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 1), new Object[] { "tinyU235", "tinyU235", "tinyU235", "tinyU238", "tinyU238", "tinyU238", "tinyU238", "tinyU238", "tinyU238" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_plutonium_fuel, 1), new Object[] { "tinyPu238", "tinyPu239", "tinyPu239", "tinyPu239", "tinyPu239", "tinyPu239", "tinyPu240", "tinyPu240", "tinyPu240" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_mox_fuel, 1), new Object[] { "tinyU235", "tinyU235", "tinyU235", "tinyU238", "tinyU238", "tinyPu238", "tinyPu239", "tinyPu239", "tinyPu239" }));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_schrabidium_fuel, 1), new Object[] { ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium });
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ingot_aluminium, 9), new Object[] { "#", '#', Item.getItemFromBlock(ModBlocks.block_aluminium) });
|
||||
@ -372,6 +375,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.factory_core_advanced, 1, ModItems.factory_core_advanced.getMaxDamage()), new Object[] { "BSB", "LHL", "BSB", 'B', new ItemStack(ModItems.battery_advanced, 1, ModItems.battery_advanced.getMaxDamage()), 'S', "blockSulfur", 'L', "blockLead", 'H', Item.getItemFromBlock(ModBlocks.factory_advanced_hull) }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuse, 1), new Object[] { " S ", "GAG", " S ", 'S', "plateSteel", 'G', Item.getItemFromBlock(Blocks.glass_pane), 'A', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.redcoil_capacitor, 1), new Object[] { "PFP", "CBC", "CBC", 'P', "plateGold", 'B', Item.getItemFromBlock(Blocks.redstone_block), 'C', ModItems.coil_advanced_alloy, 'F', ModItems.fuse }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reactor_element), 1), new Object[] { "SCS", "CSC", "SCS", 'S', "ingotSteel", 'C', ModItems.rod_quad_empty }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reactor_control), 1), new Object[] { "SLS", "SLS", "SLS", 'S', "ingotSteel", 'L', "ingotLead" }));
|
||||
@ -593,6 +597,8 @@ public class CraftingManager {
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_hammer, 1), new Object[] { "BBB", "BBB", " S ", 'B', Item.getItemFromBlock(ModBlocks.block_schrabidium), 'S', Items.stick });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', ModItems.ingot_euphemium, 'S', Items.stick });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "sulfur", 'S', Items.stick }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "dustSulfur", 'S', Items.stick }));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.blocks.TileEntityMachineGenerator;
|
||||
import com.hbm.blocks.TileEntityMachineCentrifuge;
|
||||
import com.hbm.blocks.TileEntityMachinePuF6Tank;
|
||||
import com.hbm.blocks.TileEntityMachineReactor;
|
||||
import com.hbm.blocks.TileEntityMachineSchrabidiumTransmutator;
|
||||
import com.hbm.blocks.TileEntityMachineUF6Tank;
|
||||
import com.hbm.blocks.TileEntityNukeBoy;
|
||||
import com.hbm.blocks.TileEntityNukeFleija;
|
||||
@ -43,6 +44,7 @@ import com.hbm.gui.ContainerLaunchPadTier1;
|
||||
import com.hbm.gui.ContainerMachineBattery;
|
||||
import com.hbm.gui.ContainerMachineCoal;
|
||||
import com.hbm.gui.ContainerMachineDeuterium;
|
||||
import com.hbm.gui.ContainerMachineSchrabidiumTransmutator;
|
||||
import com.hbm.gui.ContainerNukeBoy;
|
||||
import com.hbm.gui.ContainerNukeFleija;
|
||||
import com.hbm.gui.ContainerNukeFurnace;
|
||||
@ -72,6 +74,7 @@ import com.hbm.gui.GUIMachineElectricFurnace;
|
||||
import com.hbm.gui.GUIMachineGenerator;
|
||||
import com.hbm.gui.GUIMachinePuF6Tank;
|
||||
import com.hbm.gui.GUIMachineReactor;
|
||||
import com.hbm.gui.GUIMachineSchrabidiumTransmutator;
|
||||
import com.hbm.gui.GUIMachineUF6Tank;
|
||||
import com.hbm.gui.GUINukeBoy;
|
||||
import com.hbm.gui.GUINukeFleija;
|
||||
@ -323,6 +326,14 @@ public class GUIHandler implements IGuiHandler {
|
||||
return new ContainerConverterRfHe(player.inventory, (TileEntityConverterRfHe) entity);
|
||||
}
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_schrabidium_transmutator:
|
||||
{
|
||||
if(entity instanceof TileEntityMachineSchrabidiumTransmutator)
|
||||
{
|
||||
return new ContainerMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -559,6 +570,14 @@ public class GUIHandler implements IGuiHandler {
|
||||
return new GUIConverterRfHe(player.inventory, (TileEntityConverterRfHe) entity);
|
||||
}
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_schrabidium_transmutator:
|
||||
{
|
||||
if(entity instanceof TileEntityMachineSchrabidiumTransmutator)
|
||||
{
|
||||
return new GUIMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -41,6 +41,7 @@ import com.hbm.blocks.TileEntityMachineGenerator;
|
||||
import com.hbm.blocks.TileEntityMachineCentrifuge;
|
||||
import com.hbm.blocks.TileEntityMachinePuF6Tank;
|
||||
import com.hbm.blocks.TileEntityMachineReactor;
|
||||
import com.hbm.blocks.TileEntityMachineSchrabidiumTransmutator;
|
||||
import com.hbm.blocks.TileEntityMachineUF6Tank;
|
||||
import com.hbm.blocks.TileEntityNukeBoy;
|
||||
import com.hbm.blocks.TileEntityNukeFleija;
|
||||
@ -160,6 +161,7 @@ public class MainRegistry
|
||||
public static boolean enableMycelium = false;
|
||||
public static boolean enableDungeons = true;
|
||||
public static boolean enableMDOres = true;
|
||||
public static boolean enableBarrels = false;
|
||||
public static int gadgetRadius = 150;
|
||||
public static int boyRadius = 120;
|
||||
public static int manRadius = 175;
|
||||
@ -234,6 +236,7 @@ public class MainRegistry
|
||||
GameRegistry.registerTileEntity(TileEntityCable.class, "tileentity_cable");
|
||||
GameRegistry.registerTileEntity(TileEntityConverterHeRf.class, "tileentity_converter_herf");
|
||||
GameRegistry.registerTileEntity(TileEntityConverterRfHe.class, "tileentity_converter_rfhe");
|
||||
GameRegistry.registerTileEntity(TileEntityMachineSchrabidiumTransmutator.class, "tileentity_schrabidium_transmutator");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
|
||||
@ -285,7 +288,17 @@ public class MainRegistry
|
||||
public static void load(FMLInitializationEvent event)
|
||||
{
|
||||
OreDictionary.registerOre("ingotUranium", ModItems.ingot_uranium);
|
||||
OreDictionary.registerOre("ingotPlutonium", ModItems.ingot_pu239);
|
||||
OreDictionary.registerOre("ingotUranium235", ModItems.ingot_u235);
|
||||
OreDictionary.registerOre("ingotUranium238", ModItems.ingot_u238);
|
||||
OreDictionary.registerOre("ingotPlutonium", ModItems.ingot_plutonium);
|
||||
OreDictionary.registerOre("ingotPlutonium238", ModItems.ingot_pu238);
|
||||
OreDictionary.registerOre("ingotPlutonium239", ModItems.ingot_pu239);
|
||||
OreDictionary.registerOre("ingotPlutonium240", ModItems.ingot_pu240);
|
||||
OreDictionary.registerOre("U235", ModItems.ingot_u235);
|
||||
OreDictionary.registerOre("U238", ModItems.ingot_u238);
|
||||
OreDictionary.registerOre("Pu238", ModItems.ingot_pu238);
|
||||
OreDictionary.registerOre("Pu39", ModItems.ingot_pu239);
|
||||
OreDictionary.registerOre("Pu240", ModItems.ingot_pu240);
|
||||
OreDictionary.registerOre("ingotTitanium", ModItems.ingot_titanium);
|
||||
OreDictionary.registerOre("ingotSchrabidium", ModItems.ingot_schrabidium);
|
||||
OreDictionary.registerOre("dustSchrabidium", ModItems.powder_schrabidium);
|
||||
@ -303,6 +316,7 @@ public class MainRegistry
|
||||
OreDictionary.registerOre("ingotAluminum", ModItems.ingot_aluminium);
|
||||
OreDictionary.registerOre("ingotNeptunium", ModItems.ingot_neptunium);
|
||||
OreDictionary.registerOre("ingotLead", ModItems.ingot_lead);
|
||||
OreDictionary.registerOre("ingotLithium", ModItems.lithium);
|
||||
OreDictionary.registerOre("dustFluorite", ModItems.fluorite);
|
||||
OreDictionary.registerOre("nuggetLead", ModItems.nugget_lead);
|
||||
OreDictionary.registerOre("nuggetUranium", ModItems.nugget_uranium);
|
||||
@ -312,6 +326,11 @@ public class MainRegistry
|
||||
OreDictionary.registerOre("nuggetPlutonium238", ModItems.nugget_pu238);
|
||||
OreDictionary.registerOre("nuggetPlutonium239", ModItems.nugget_pu239);
|
||||
OreDictionary.registerOre("nuggetPlutonium240", ModItems.nugget_pu240);
|
||||
OreDictionary.registerOre("tinyU235", ModItems.nugget_u235);
|
||||
OreDictionary.registerOre("tinyU238", ModItems.nugget_u238);
|
||||
OreDictionary.registerOre("tinyPu238", ModItems.nugget_pu238);
|
||||
OreDictionary.registerOre("tinyPu239", ModItems.nugget_pu239);
|
||||
OreDictionary.registerOre("tinyPu240", ModItems.nugget_pu240);
|
||||
OreDictionary.registerOre("nuggetNeptunium", ModItems.nugget_neptunium);
|
||||
OreDictionary.registerOre("nuggetSchrabidium", ModItems.nugget_schrabidium);
|
||||
OreDictionary.registerOre("plateTitanium", ModItems.plate_titanium);
|
||||
@ -323,6 +342,7 @@ public class MainRegistry
|
||||
OreDictionary.registerOre("plateCopper", ModItems.plate_copper);
|
||||
OreDictionary.registerOre("plateIron", ModItems.plate_iron);
|
||||
OreDictionary.registerOre("plateGold", ModItems.plate_gold);
|
||||
OreDictionary.registerOre("plateAdvanced", ModItems.plate_advanced_alloy);
|
||||
|
||||
OreDictionary.registerOre("oreUranium", ModBlocks.ore_uranium);
|
||||
OreDictionary.registerOre("oreTitanium", ModBlocks.ore_titanium);
|
||||
@ -371,36 +391,37 @@ public class MainRegistry
|
||||
|
||||
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
config.load();
|
||||
enableDebugMode = config.get(Configuration.CATEGORY_GENERAL, "_enableDebugMode", false).getBoolean(true);
|
||||
enableMycelium = config.get(Configuration.CATEGORY_GENERAL, "_enableMyceliumSpread", false).getBoolean(false);
|
||||
enableDungeons = config.get(Configuration.CATEGORY_GENERAL, "_enableDungeonSpawn", true).getBoolean(true);
|
||||
enableMDOres = config.get(Configuration.CATEGORY_GENERAL, "_enableOresInModdedDimensions", true).getBoolean(true);
|
||||
enableDebugMode = config.get(Configuration.CATEGORY_GENERAL, "1.0_enableDebugMode", false).getBoolean(false);
|
||||
enableMycelium = config.get(Configuration.CATEGORY_GENERAL, "1.1_enableMyceliumSpread", false).getBoolean(false);
|
||||
enableDungeons = config.get(Configuration.CATEGORY_GENERAL, "1.2_enableDungeonSpawn", true).getBoolean(true);
|
||||
enableMDOres = config.get(Configuration.CATEGORY_GENERAL, "1.3_enableOresInModdedDimensions", true).getBoolean(true);
|
||||
enableBarrels = config.get(Configuration.CATEGORY_GENERAL, "1.4_enableNuclearBarrelSpawn", false).getBoolean(false);
|
||||
|
||||
Property propGadget = config.get(Configuration.CATEGORY_GENERAL, "gadgetRadius", 150);
|
||||
Property propGadget = config.get(Configuration.CATEGORY_GENERAL, "2.0_gadgetRadius", 150);
|
||||
propGadget.comment = "Radius of the Gadget";
|
||||
gadgetRadius = propGadget.getInt();
|
||||
|
||||
Property propBoy = config.get(Configuration.CATEGORY_GENERAL, "boyRadius", 120);
|
||||
Property propBoy = config.get(Configuration.CATEGORY_GENERAL, "2.1_boyRadius", 120);
|
||||
propBoy.comment = "Radius of Little Boy";
|
||||
boyRadius = propBoy.getInt();
|
||||
|
||||
Property propMan = config.get(Configuration.CATEGORY_GENERAL, "manRadius", 175);
|
||||
Property propMan = config.get(Configuration.CATEGORY_GENERAL, "2.2_manRadius", 175);
|
||||
propMan.comment = "Radius of Fat Man";
|
||||
manRadius = propMan.getInt();
|
||||
|
||||
Property propMike = config.get(Configuration.CATEGORY_GENERAL, "mikeRadius", 250);
|
||||
Property propMike = config.get(Configuration.CATEGORY_GENERAL, "2.3_mikeRadius", 250);
|
||||
propMike.comment = "Radius of Ivy Mike";
|
||||
mikeRadius = propMike.getInt();
|
||||
|
||||
Property propTsar = config.get(Configuration.CATEGORY_GENERAL, "tsarRadius", 500);
|
||||
Property propTsar = config.get(Configuration.CATEGORY_GENERAL, "2.4_tsarRadius", 500);
|
||||
propTsar.comment = "Radius of the Tsar Bomba";
|
||||
tsarRadius = propTsar.getInt();
|
||||
|
||||
Property propPrototype = config.get(Configuration.CATEGORY_GENERAL, "prototypeRadius", 150);
|
||||
Property propPrototype = config.get(Configuration.CATEGORY_GENERAL, "2.5_prototypeRadius", 150);
|
||||
propPrototype.comment = "Radius of the Prototype";
|
||||
prototypeRadius = propPrototype.getInt();
|
||||
|
||||
Property propFleija = config.get(Configuration.CATEGORY_GENERAL, "fleijaRadius", 50);
|
||||
Property propFleija = config.get(Configuration.CATEGORY_GENERAL, "2.6_fleijaRadius", 50);
|
||||
propFleija.comment = "Radius of F.L.E.I.J.A.";
|
||||
fleijaRadius = propFleija.getInt();
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.registerUsageHandler(new CentrifugeRecipeHandler());
|
||||
API.registerRecipeHandler(new ReactorRecipeHandler());
|
||||
API.registerUsageHandler(new ReactorRecipeHandler());
|
||||
System.out.println("Loaded NEI Config");
|
||||
|
||||
}
|
||||
|
||||
|
||||