mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
1.0.20 II
This commit is contained in:
parent
f082076960
commit
ce50cdf444
@ -105,6 +105,8 @@ 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.machine_diesel.name=Dieselgenerator
|
||||
container.machineDiesel=Dieselgenerator
|
||||
|
||||
tile.factory_titanium_hull.name=Einfache Fabrikshülle
|
||||
tile.factory_titanium_furnace.name=Einfache Fabrikzugriffsluke
|
||||
@ -262,6 +264,7 @@ item.reactor_core.name=Brutreaktorkern
|
||||
item.pellet_rtg.name=Plutonium 238 Pellet
|
||||
item.rtg_unit.name=RTG Einheit
|
||||
item.hazmat_cloth.name=Strahlenschutzanzugsstoff
|
||||
item.tritium_deuterium_cake.name=Tritium-Deuterium-Kuchen
|
||||
|
||||
item.cell_empty.name=Leere Zelle
|
||||
item.cell_uf6.name=Uranhexafluorit-Zelle
|
||||
@ -277,6 +280,7 @@ item.inf_deuterium.name=Unendlicher Deuteriumtank
|
||||
item.inf_tritium.name=Unendlicher Tritiumtank
|
||||
item.inf_coolant.name=Unendlicher Kühlflüssigkeitstank
|
||||
item.inf_sulfur.name=Unendlicher Schwefeltank
|
||||
item.inf_diesel.name=Unendlicher Dieseltank
|
||||
|
||||
item.canister_empty.name=Leerer Kanister
|
||||
item.canister_fuel.name=Treibstoffkanister
|
||||
|
||||
@ -105,6 +105,8 @@ 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.machine_diesel.name=Diesel Generator
|
||||
container.machineDiesel=Diesel Generator
|
||||
|
||||
tile.factory_titanium_hull.name=Basic Factory Casing
|
||||
tile.factory_titanium_furnace.name=Basic Factory Access Hatch
|
||||
@ -262,6 +264,7 @@ item.reactor_core.name=Breeding Reactor Core
|
||||
item.pellet_rtg.name=Plutonium 238 Fuel Pellet
|
||||
item.rtg_unit.name=RTG Unit
|
||||
item.hazmat_cloth.name=Hazmat Cloth
|
||||
item.tritium_deuterium_cake.name=Tritium-Deuterium-Cake
|
||||
|
||||
item.cell_empty.name=Empty Cell
|
||||
item.cell_uf6.name=Uranium Hexafluorite Cell
|
||||
@ -277,6 +280,7 @@ item.inf_deuterium.name=Infinite Deuterium Tank
|
||||
item.inf_tritium.name=Infinite Tritium Tank
|
||||
item.inf_coolant.name=Infinite Coolant Tank
|
||||
item.inf_sulfur.name=Infinite Sulfur Tank
|
||||
item.inf_diesel.name=Unendlicher Dieseltank
|
||||
|
||||
item.canister_empty.name=Empty Canister
|
||||
item.canister_fuel.name=Fuel Canister
|
||||
|
||||
BIN
assets/hbm/textures/blocks/machine_diesel_bottom.png
Normal file
BIN
assets/hbm/textures/blocks/machine_diesel_bottom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 463 B |
BIN
assets/hbm/textures/blocks/machine_diesel_front.png
Normal file
BIN
assets/hbm/textures/blocks/machine_diesel_front.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 390 B |
BIN
assets/hbm/textures/blocks/machine_diesel_side.png
Normal file
BIN
assets/hbm/textures/blocks/machine_diesel_side.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 356 B |
BIN
assets/hbm/textures/blocks/machine_diesel_top.png
Normal file
BIN
assets/hbm/textures/blocks/machine_diesel_top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 313 B |
BIN
assets/hbm/textures/gui/GUIDiesel.png
Normal file
BIN
assets/hbm/textures/gui/GUIDiesel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/hbm/textures/items/inf_diesel.png
Normal file
BIN
assets/hbm/textures/items/inf_diesel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 276 B |
@ -50,8 +50,6 @@ public class MachineCoal extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
//Reactivate in case of emergency
|
||||
//return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.iconTop);
|
||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
|
||||
}
|
||||
|
||||
|
||||
144
com/hbm/blocks/MachineDiesel.java
Normal file
144
com/hbm/blocks/MachineDiesel.java
Normal file
@ -0,0 +1,144 @@
|
||||
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 MachineDiesel extends BlockContainer {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private Random rand;
|
||||
private static boolean keepInventory;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
private IIcon iconTop;
|
||||
private IIcon iconSide;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":machine_diesel_bottom");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_diesel_top");
|
||||
this.iconSide = iconRegister.registerIcon(RefStrings.MODID + ":machine_diesel_side");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_diesel_front");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if(side == 0)
|
||||
return iconBottom;
|
||||
if(side == 1)
|
||||
return iconTop;
|
||||
if(side == 2 || side == 3)
|
||||
return blockIcon;
|
||||
if(side == 4 || side == 5)
|
||||
return iconSide;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_diesel);
|
||||
}
|
||||
|
||||
protected MachineDiesel(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityMachineDiesel();
|
||||
}
|
||||
|
||||
@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())
|
||||
{
|
||||
TileEntityMachineDiesel entity = (TileEntityMachineDiesel) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_machine_diesel, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@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)
|
||||
{
|
||||
TileEntityMachineDiesel tileentityfurnace = (TileEntityMachineDiesel)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_);
|
||||
}
|
||||
|
||||
}
|
||||
@ -215,6 +215,9 @@ public class ModBlocks {
|
||||
public static Block machine_schrabidium_transmutator;
|
||||
public static final int guiID_schrabidium_transmutator = 30;
|
||||
|
||||
public static Block machine_diesel;
|
||||
public static final int guiID_machine_diesel = 31;
|
||||
|
||||
public static Block launch_pad;
|
||||
public static Block launch_pad_generic;
|
||||
public static Block launch_pad_incendiary;
|
||||
@ -375,6 +378,8 @@ public class ModBlocks {
|
||||
machine_coal_off = new MachineCoal(false).setBlockName("machine_coal_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock);
|
||||
machine_coal_on = new MachineCoal(true).setBlockName("machine_coal_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
|
||||
machine_diesel = new MachineDiesel(Material.iron).setBlockName("machine_diesel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock);
|
||||
|
||||
red_wire_coated = new WireCoated(Material.iron).setBlockName("red_wire_coated").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_wire_coated");
|
||||
red_cable = new BlockCable(Material.iron).setBlockName("red_cable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_cable_icon");
|
||||
|
||||
@ -554,6 +559,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_rtg_furnace_on, machine_rtg_furnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_coal_off, machine_coal_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_coal_on, machine_coal_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_diesel, machine_diesel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_generator, machine_generator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_cable, red_cable.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
|
||||
|
||||
@ -21,7 +21,6 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory {
|
||||
public int dualPower;
|
||||
public static final int maxPower = 100000;
|
||||
public static final int processingSpeed = 100;
|
||||
public boolean runsOnRtg = false;
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {3};
|
||||
@ -162,7 +161,6 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory {
|
||||
|
||||
this.dualPower = nbt.getShort("powerTime");
|
||||
this.dualCookTime = nbt.getShort("cookTime");
|
||||
this.runsOnRtg = nbt.getBoolean("runsOnRtg");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
@ -181,7 +179,6 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setShort("powerTime", (short) dualPower);
|
||||
nbt.setShort("cookTime", (short) dualCookTime);
|
||||
nbt.setBoolean("runsOnRtg", runsOnRtg);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
@ -288,70 +285,52 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory {
|
||||
boolean flag = this.hasPower();
|
||||
boolean flag1 = false;
|
||||
|
||||
if(this.runsOnRtg && this.dualPower != maxPower)
|
||||
{
|
||||
this.dualPower = maxPower;
|
||||
}
|
||||
|
||||
if(hasPower() && isProcessing())
|
||||
{
|
||||
if(!this.runsOnRtg)
|
||||
{
|
||||
this.dualPower = this.dualPower - 50;
|
||||
}
|
||||
this.dualPower = this.dualPower - 50;
|
||||
|
||||
if(this.dualPower < 0)
|
||||
{
|
||||
this.dualPower = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//if(!worldObj.isRemote)
|
||||
{
|
||||
if(this.hasItemPower(this.slots[2]) && this.dualPower <= (TileEntityDiFurnace.maxPower - TileEntityDiFurnace.getItemPower(this.slots[2])))
|
||||
{
|
||||
this.dualPower += getItemPower(this.slots[2]);
|
||||
if(this.slots[2] != null)
|
||||
{
|
||||
flag1 = true;
|
||||
this.slots[2].stackSize--;
|
||||
if(this.slots[2].stackSize == 0)
|
||||
{
|
||||
this.slots[2] = this.slots[2].getItem().getContainerItem(this.slots[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.slots[2] != null && this.slots[2].getItem() == ModItems.pellet_rtg && this.dualPower == 0)
|
||||
{
|
||||
if (this.hasItemPower(this.slots[2])
|
||||
&& this.dualPower <= (TileEntityDiFurnace.maxPower - TileEntityDiFurnace.getItemPower(this.slots[2]))) {
|
||||
this.dualPower += getItemPower(this.slots[2]);
|
||||
if (this.slots[2] != null) {
|
||||
flag1 = true;
|
||||
this.slots[2].stackSize--;
|
||||
if(this.slots[2].stackSize == 0)
|
||||
{
|
||||
if (this.slots[2].stackSize == 0) {
|
||||
this.slots[2] = this.slots[2].getItem().getContainerItem(this.slots[2]);
|
||||
}
|
||||
|
||||
this.runsOnRtg = true;
|
||||
}
|
||||
|
||||
if(hasPower() && canProcess())
|
||||
{
|
||||
dualCookTime++;
|
||||
|
||||
if(this.dualCookTime == TileEntityDiFurnace.processingSpeed)
|
||||
{
|
||||
this.dualCookTime = 0;
|
||||
this.processItem();
|
||||
flag1 = true;
|
||||
}
|
||||
}else{
|
||||
dualCookTime = 0;
|
||||
}
|
||||
|
||||
if (hasPower() && canProcess()) {
|
||||
dualCookTime++;
|
||||
|
||||
if (this.dualCookTime == TileEntityDiFurnace.processingSpeed) {
|
||||
this.dualCookTime = 0;
|
||||
this.processItem();
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
dualCookTime = 0;
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
boolean trigger = true;
|
||||
|
||||
if(hasPower() && canProcess() && this.dualCookTime == 0)
|
||||
{
|
||||
trigger = false;
|
||||
}
|
||||
|
||||
if (this.slots[2] != null && this.slots[2].getItem() == ModItems.pellet_rtg) {
|
||||
|
||||
this.dualPower = maxPower;
|
||||
}
|
||||
|
||||
if(trigger)
|
||||
{
|
||||
|
||||
@ -1033,6 +1033,28 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
||||
}
|
||||
}
|
||||
|
||||
if(slots[2] != null && slots[2].getItem() == ModItems.tritium_deuterium_cake && trit + 7500000 <= tritMax && deut + 7500000 <= deutMax)
|
||||
{
|
||||
this.slots[2].stackSize--;
|
||||
this.deut += 7500000;
|
||||
this.trit += 7500000;
|
||||
if(this.slots[2].stackSize == 0)
|
||||
{
|
||||
this.slots[2] = null;
|
||||
}
|
||||
}
|
||||
|
||||
if(slots[3] != null && slots[3].getItem() == ModItems.tritium_deuterium_cake && trit + 7500000 <= tritMax && deut + 7500000 <= deutMax)
|
||||
{
|
||||
this.slots[3].stackSize--;
|
||||
this.deut += 7500000;
|
||||
this.trit += 7500000;
|
||||
if(this.slots[3].stackSize == 0)
|
||||
{
|
||||
this.slots[3] = null;
|
||||
}
|
||||
}
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.inf_water)
|
||||
{
|
||||
this.water = waterMax;
|
||||
|
||||
@ -87,7 +87,7 @@ public class TileEntityMachineBattery extends TileEntity implements ISidedInvent
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 1;
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -23,7 +23,6 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
|
||||
public int soundCycle = 0;
|
||||
public static final int maxPower = 100000;
|
||||
public static final int processingSpeed = 500;
|
||||
public boolean runsOnRtg = false;
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {2, 3, 4, 5};
|
||||
@ -169,7 +168,6 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
|
||||
|
||||
dualPower = nbt.getShort("powerTime");
|
||||
dualCookTime = nbt.getShort("CookTime");
|
||||
runsOnRtg = nbt.getBoolean("runsOnRtg");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
@ -188,7 +186,6 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setShort("powerTime", (short) dualPower);
|
||||
nbt.setShort("cookTime", (short) dualCookTime);
|
||||
nbt.setBoolean("runsOnRtg", runsOnRtg);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
@ -322,17 +319,10 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
|
||||
boolean flag = this.hasPower();
|
||||
boolean flag1 = false;
|
||||
|
||||
if(this.runsOnRtg && this.dualPower != maxPower)
|
||||
{
|
||||
this.dualPower = maxPower;
|
||||
}
|
||||
|
||||
if(hasPower() && isProcessing())
|
||||
{
|
||||
if(!this.runsOnRtg)
|
||||
{
|
||||
this.dualPower = this.dualPower - 50;
|
||||
}
|
||||
this.dualPower = this.dualPower - 50;
|
||||
|
||||
if(this.dualPower < 0)
|
||||
{
|
||||
this.dualPower = 0;
|
||||
@ -355,15 +345,9 @@ public class TileEntityMachineCentrifuge extends TileEntity implements ISidedInv
|
||||
}
|
||||
}
|
||||
|
||||
if(this.slots[1] != null && this.slots[1].getItem() == ModItems.pellet_rtg && this.dualPower == 0)
|
||||
if(this.slots[1] != null && this.slots[1].getItem() == ModItems.pellet_rtg)
|
||||
{
|
||||
this.slots[1].stackSize--;
|
||||
if(this.slots[1].stackSize == 0)
|
||||
{
|
||||
this.slots[1] = this.slots[1].getItem().getContainerItem(this.slots[1]);
|
||||
}
|
||||
|
||||
this.runsOnRtg = true;
|
||||
this.dualPower = maxPower;
|
||||
}
|
||||
|
||||
boolean trigger = true;
|
||||
|
||||
460
com/hbm/blocks/TileEntityMachineDiesel.java
Normal file
460
com/hbm/blocks/TileEntityMachineDiesel.java
Normal file
@ -0,0 +1,460 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
|
||||
import com.hbm.interfaces.IConductor;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.items.ItemBattery;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityMachineDiesel extends TileEntity implements ISidedInventory, ISource {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
public int power;
|
||||
public int diesel;
|
||||
public int soundCycle = 0;
|
||||
public static final int maxPower = 10000;
|
||||
public static final int maxDiesel = 10000;
|
||||
public int age = 0;
|
||||
public List<IConsumer> list = new ArrayList();
|
||||
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {1, 2};
|
||||
private static final int[] slots_side = new int[] {2};
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineDiesel() {
|
||||
slots = new ItemStack[3];
|
||||
}
|
||||
|
||||
@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.machineDiesel";
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
//You scrubs aren't needed for anything (right now)
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
if(i == 0)
|
||||
if(stack.getItem() == ModItems.canister_fuel || stack.getItem() == Item.getItemFromBlock(ModBlocks.red_barrel))
|
||||
return true;
|
||||
if(i == 2)
|
||||
if(stack.getItem() instanceof ItemBattery)
|
||||
return true;
|
||||
|
||||
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);
|
||||
|
||||
this.power = nbt.getShort("powerTime");
|
||||
this.diesel = nbt.getShort("diesel");
|
||||
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("powerTime", (short) power);
|
||||
nbt.setShort("diesel", (short) diesel);
|
||||
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) {
|
||||
if(i == 1)
|
||||
if(itemStack.getItem() == ModItems.canister_empty || itemStack.getItem() == ModItems.tank_steel)
|
||||
return true;
|
||||
if(i == 2)
|
||||
if(itemStack.getItemDamage() == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getDieselScaled(int i) {
|
||||
return (diesel * i) / maxDiesel;
|
||||
}
|
||||
|
||||
public int getPowerScaled(int i) {
|
||||
return (power * i) / maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (!worldObj.isRemote) {
|
||||
age++;
|
||||
if(age >= 20)
|
||||
{
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if(age == 9 || age == 19)
|
||||
ffgeuaInit();
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.inf_diesel)
|
||||
{
|
||||
diesel = maxDiesel;
|
||||
}
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.canister_fuel && diesel + 625 <= maxDiesel)
|
||||
{
|
||||
if(slots[1] == null || slots[1] != null && slots[1].getItem() == slots[0].getItem().getContainerItem() && slots[1].stackSize < slots[1].getMaxStackSize())
|
||||
{
|
||||
if(slots[1] == null)
|
||||
slots[1] = new ItemStack(slots[0].getItem().getContainerItem());
|
||||
else
|
||||
slots[1].stackSize++;
|
||||
|
||||
slots[0].stackSize--;
|
||||
if(slots[0].stackSize <= 0)
|
||||
slots[0] = null;
|
||||
|
||||
diesel += 625;
|
||||
}
|
||||
}
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == Item.getItemFromBlock(ModBlocks.red_barrel) && diesel + 5000 <= maxDiesel)
|
||||
{
|
||||
if(slots[1] == null || slots[1] != null && slots[1].getItem() == ModItems.tank_steel && slots[1].stackSize < slots[1].getMaxStackSize())
|
||||
{
|
||||
if(slots[1] == null)
|
||||
slots[1] = new ItemStack(ModItems.tank_steel);
|
||||
else
|
||||
slots[1].stackSize++;
|
||||
|
||||
slots[0].stackSize--;
|
||||
if(slots[0].stackSize <= 0)
|
||||
slots[0] = null;
|
||||
|
||||
diesel += 5000;
|
||||
}
|
||||
}
|
||||
|
||||
//Battery Item
|
||||
if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_generic && slots[2].getItemDamage() > 0)
|
||||
{
|
||||
power -= 100;
|
||||
slots[2].setItemDamage(slots[2].getItemDamage() - 1);
|
||||
}
|
||||
if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_advanced && slots[2].getItemDamage() > 0)
|
||||
{
|
||||
power -= 100;
|
||||
slots[2].setItemDamage(slots[2].getItemDamage() - 1);
|
||||
}
|
||||
if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_schrabidium && slots[2].getItemDamage() > 0)
|
||||
{
|
||||
power -= 100;
|
||||
slots[2].setItemDamage(slots[2].getItemDamage() - 1);
|
||||
}
|
||||
if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.factory_core_titanium && slots[2].getItemDamage() > 0)
|
||||
{
|
||||
power -= 100;
|
||||
slots[2].setItemDamage(slots[2].getItemDamage() - 1);
|
||||
}
|
||||
if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.factory_core_advanced && slots[2].getItemDamage() > 0)
|
||||
{
|
||||
power -= 100;
|
||||
slots[2].setItemDamage(slots[2].getItemDamage() - 1);
|
||||
}
|
||||
|
||||
generate();
|
||||
}
|
||||
}
|
||||
|
||||
public void generate() {
|
||||
if(diesel > 0)
|
||||
{
|
||||
if(soundCycle == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "fireworks.blast", 1.0F, 0.5F);
|
||||
soundCycle++;
|
||||
|
||||
if(soundCycle >= 3)
|
||||
soundCycle = 0;
|
||||
|
||||
diesel -= 10;
|
||||
if(diesel < 0)
|
||||
diesel = 0;
|
||||
|
||||
|
||||
if(power + 25 <= maxPower)
|
||||
{
|
||||
power += 25;
|
||||
} else {
|
||||
power = maxPower;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isItemValid() {
|
||||
|
||||
if(slots[1] != null && slots[1].getItem() == Items.coal)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(slots[1] != null && slots[1].getItem() == Item.getItemFromBlock(Blocks.coal_block))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ffgeua(int x, int y, int z, boolean newTact) {
|
||||
Block block = this.worldObj.getBlock(x, y, z);
|
||||
TileEntity tileentity = this.worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(block == ModBlocks.factory_titanium_conductor && this.worldObj.getBlock(x, y + 1, z) == ModBlocks.factory_titanium_core)
|
||||
{
|
||||
tileentity = this.worldObj.getTileEntity(x, y + 1, z);
|
||||
}
|
||||
if(block == ModBlocks.factory_titanium_conductor && this.worldObj.getBlock(x, y - 1, z) == ModBlocks.factory_titanium_core)
|
||||
{
|
||||
tileentity = this.worldObj.getTileEntity(x, y - 1, z);
|
||||
}
|
||||
if(block == ModBlocks.factory_advanced_conductor && this.worldObj.getBlock(x, y + 1, z) == ModBlocks.factory_advanced_core)
|
||||
{
|
||||
tileentity = this.worldObj.getTileEntity(x, y + 1, z);
|
||||
}
|
||||
if(block == ModBlocks.factory_advanced_conductor && this.worldObj.getBlock(x, y - 1, z) == ModBlocks.factory_advanced_core)
|
||||
{
|
||||
tileentity = this.worldObj.getTileEntity(x, y - 1, z);
|
||||
}
|
||||
|
||||
if(tileentity instanceof IConductor)
|
||||
{
|
||||
if(tileentity instanceof TileEntityCable)
|
||||
{
|
||||
if(Library.checkUnionList(((TileEntityCable)tileentity).uoteab, this))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityCable)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityCable)tileentity).uoteab.get(i).source == this)
|
||||
{
|
||||
if(((TileEntityCable)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityCable)tileentity).uoteab.get(i).ticked = newTact;
|
||||
ffgeua(x, y + 1, z, getTact());
|
||||
ffgeua(x, y - 1, z, getTact());
|
||||
ffgeua(x - 1, y, z, getTact());
|
||||
ffgeua(x + 1, y, z, getTact());
|
||||
ffgeua(x, y, z - 1, getTact());
|
||||
ffgeua(x, y, z + 1, getTact());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityCable)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityWireCoated)
|
||||
{
|
||||
if(Library.checkUnionList(((TileEntityWireCoated)tileentity).uoteab, this))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityWireCoated)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityWireCoated)tileentity).uoteab.get(i).source == this)
|
||||
{
|
||||
if(((TileEntityWireCoated)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityWireCoated)tileentity).uoteab.get(i).ticked = newTact;
|
||||
ffgeua(x, y + 1, z, getTact());
|
||||
ffgeua(x, y - 1, z, getTact());
|
||||
ffgeua(x - 1, y, z, getTact());
|
||||
ffgeua(x + 1, y, z, getTact());
|
||||
ffgeua(x, y, z - 1, getTact());
|
||||
ffgeua(x, y, z + 1, getTact());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityWireCoated)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(tileentity instanceof IConsumer && newTact && !(tileentity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)tileentity).conducts))
|
||||
{
|
||||
list.add((IConsumer)tileentity);
|
||||
}
|
||||
|
||||
if(!newTact)
|
||||
{
|
||||
int size = list.size();
|
||||
if(size > 0)
|
||||
{
|
||||
int part = this.power / size;
|
||||
for(IConsumer consume : list)
|
||||
{
|
||||
if(consume.getPower() < consume.getMaxPower())
|
||||
{
|
||||
if(consume.getMaxPower() - consume.getPower() >= part)
|
||||
{
|
||||
this.power -= part;
|
||||
consume.setPower(consume.getPower() + part);
|
||||
} else {
|
||||
this.power -= consume.getMaxPower() - consume.getPower();
|
||||
consume.setPower(consume.getMaxPower());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
list.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ffgeuaInit() {
|
||||
ffgeua(this.xCoord, this.yCoord + 1, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord - 1, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord - 1, this.yCoord, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord + 1, this.yCoord, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord, this.zCoord - 1, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord, this.zCoord + 1, getTact());
|
||||
}
|
||||
|
||||
public boolean getTact() {
|
||||
if(age >= 0 && age < 10)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -37,7 +37,7 @@ public class YellowBarrel extends BlockContainer {
|
||||
|
||||
public void explode(World p_149695_1_, int x, int y, int z) {
|
||||
p_149695_1_.createExplosion(null, x, y, z, 18.0F, true);
|
||||
ExplosionNukeGeneric.wasteNoSchrab(p_149695_1_, x, y, z, 35);
|
||||
ExplosionNukeGeneric.waste(p_149695_1_, x, y, z, 35);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -47,7 +47,7 @@ public class EntityGrenadeGas extends EntityThrowable
|
||||
{
|
||||
this.setDead();
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true);
|
||||
ExplosionChaos.poison(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10);
|
||||
ExplosionChaos.poison(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity;
|
||||
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -49,7 +50,7 @@ public class EntityGrenadeNuclear extends EntityThrowable
|
||||
entity0.posX = this.posX;
|
||||
entity0.posY = this.posY;
|
||||
entity0.posZ = this.posZ;
|
||||
entity0.destructionRange = 25;
|
||||
entity0.destructionRange = MainRegistry.nukaRadius;
|
||||
entity0.speed = 25;
|
||||
entity0.coefficient = 10.0F;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
import com.hbm.explosion.ExplosionParticleB;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -241,7 +242,7 @@ public class EntityMiniNuke extends Entity implements IProjectile
|
||||
entity0.posX = this.posX;
|
||||
entity0.posY = this.posY;
|
||||
entity0.posZ = this.posZ;
|
||||
entity0.destructionRange = 35;
|
||||
entity0.destructionRange = MainRegistry.fatmanRadius;
|
||||
entity0.speed = 25;
|
||||
entity0.coefficient = 10.0F;
|
||||
|
||||
@ -385,7 +386,7 @@ public class EntityMiniNuke extends Entity implements IProjectile
|
||||
entity0.posX = this.posX;
|
||||
entity0.posY = this.posY;
|
||||
entity0.posZ = this.posZ;
|
||||
entity0.destructionRange = 35;
|
||||
entity0.destructionRange = MainRegistry.fatmanRadius;
|
||||
entity0.speed = 25;
|
||||
entity0.coefficient = 10.0F;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particles.EntitySmokeFX;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -39,7 +40,7 @@ public class EntityMirv extends EntityThrowable {
|
||||
entity.posX = this.posX;
|
||||
entity.posY = this.posY;
|
||||
entity.posZ = this.posZ;
|
||||
entity.destructionRange = 100;
|
||||
entity.destructionRange = MainRegistry.mirvRadius;
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 10.0F;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particles.EntitySmokeFX;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -148,7 +149,7 @@ public class EntityMissileNuclear extends EntityMissileBase {
|
||||
entity.posX = this.posX;
|
||||
entity.posY = this.posY;
|
||||
entity.posZ = this.posZ;
|
||||
entity.destructionRange = 100;
|
||||
entity.destructionRange = MainRegistry.missileRadius;
|
||||
entity.speed = 25;
|
||||
entity.coefficient = 10.0F;
|
||||
|
||||
|
||||
@ -309,7 +309,7 @@ public class EntityNuclearCreeper extends EntityMob {
|
||||
|
||||
if (p_70645_1_.getEntity() instanceof EntitySkeleton || (p_70645_1_.isProjectile() && p_70645_1_.getEntity() instanceof EntityArrow && ((EntityArrow)(p_70645_1_.getEntity())).shootingEntity == null))
|
||||
{
|
||||
int i = rand.nextInt(10);
|
||||
int i = rand.nextInt(11);
|
||||
int j = rand.nextInt(3);
|
||||
if(i == 0)
|
||||
this.dropItem(ModItems.nugget_u235, j);
|
||||
@ -343,6 +343,8 @@ public class EntityNuclearCreeper extends EntityMob {
|
||||
}
|
||||
this.dropItem(ModItems.fusion_core, 1);
|
||||
}
|
||||
if(i == 10)
|
||||
this.dropItem(ModItems.gun_fatman_ammo, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -86,11 +86,12 @@ public class EntityNukeCloudBig extends Entity {
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
|
||||
age = p_70037_1_.getShort("age");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
p_70014_1_.setShort("age", (short)age);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,11 +88,12 @@ public class EntityNukeCloudSmall extends Entity {
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
|
||||
age = p_70037_1_.getShort("age");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
p_70014_1_.setShort("age", (short)age);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -452,12 +452,12 @@ public class ExplosionNukeGeneric {
|
||||
|
||||
else if(world.getBlock(x, y, z) == Blocks.coal_ore)
|
||||
{
|
||||
rand = field_149933_a.nextInt(10);
|
||||
rand = field_149933_a.nextInt(30);
|
||||
if(rand == 1 || rand == 2 || rand == 3)
|
||||
{
|
||||
world.setBlock(x, y, z, Blocks.diamond_ore);
|
||||
}
|
||||
if(rand == 9)
|
||||
if(rand == 29)
|
||||
{
|
||||
world.setBlock(x, y, z, Blocks.emerald_ore);
|
||||
}
|
||||
|
||||
@ -38,9 +38,36 @@ private TileEntityBombMulti bombMulti;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 5) {
|
||||
if (!this.mergeItemStack(var5, 6, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -41,9 +41,38 @@ public class ContainerCentrifuge extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 5) {
|
||||
if (!this.mergeItemStack(var5, 6, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 2, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -77,9 +77,41 @@ public class ContainerCoreAdvanced extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 26) {
|
||||
if (!this.mergeItemStack(var5, 27, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 22, 23, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 9, 11, false))
|
||||
if (!this.mergeItemStack(var5, 23, 25, false))
|
||||
if (!this.mergeItemStack(var5, 0, 9, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -71,9 +71,40 @@ public class ContainerCoreTitanium extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 22) {
|
||||
if (!this.mergeItemStack(var5, 23, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 22, 23, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 9, 11, false))
|
||||
if (!this.mergeItemStack(var5, 0, 9, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -54,78 +54,38 @@ public class ContainerDiFurnace extends Container {
|
||||
|
||||
//What is this!?
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
/*ItemStack itemstack = null;
|
||||
Slot slot = (Slot)this.inventorySlots.get(p_82846_2_);
|
||||
|
||||
if (slot != null && slot.getHasStack())
|
||||
{
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if (p_82846_2_ == 2)
|
||||
{
|
||||
if (!this.mergeItemStack(itemstack1, 3, 39, true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onSlotChange(itemstack1, itemstack);
|
||||
}
|
||||
else if (p_82846_2_ != 1 && p_82846_2_ != 0)
|
||||
{
|
||||
if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null)
|
||||
{
|
||||
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (TileEntityFurnace.isItemFuel(itemstack1))
|
||||
{
|
||||
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (p_82846_2_ >= 3 && p_82846_2_ < 30)
|
||||
{
|
||||
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (itemstack1.stackSize == 0)
|
||||
{
|
||||
slot.putStack((ItemStack)null);
|
||||
}
|
||||
else
|
||||
{
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
|
||||
if (itemstack1.stackSize == itemstack.stackSize)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;*/
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
return null;
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 3, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -49,9 +49,39 @@ public class ContainerElectricFurnace extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 1, 2, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -59,9 +59,36 @@ public class ContainerFusionMultiblock extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 8) {
|
||||
if (!this.mergeItemStack(var5, 9, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -59,9 +59,38 @@ public class ContainerGenerator extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 11) {
|
||||
if (!this.mergeItemStack(var5, 12, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 12, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -44,9 +44,36 @@ public class ContainerLaunchPadTier1 extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -43,9 +43,38 @@ public class ContainerMachineBattery extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 1) {
|
||||
if (!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 2, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -50,9 +50,40 @@ public class ContainerMachineCoal extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 1, 2, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
if (!this.mergeItemStack(var5, 2, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -43,9 +43,39 @@ private TileEntityMachineDeuterium nukeBoy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 4) {
|
||||
if (!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 3, 4, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 0, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
127
com/hbm/gui/ContainerMachineDiesel.java
Normal file
127
com/hbm/gui/ContainerMachineDiesel.java
Normal file
@ -0,0 +1,127 @@
|
||||
package com.hbm.gui;
|
||||
|
||||
import com.hbm.blocks.TileEntityMachineCoal;
|
||||
import com.hbm.blocks.TileEntityMachineDiesel;
|
||||
|
||||
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 ContainerMachineDiesel extends Container {
|
||||
|
||||
private TileEntityMachineDiesel diFurnace;
|
||||
private int power;
|
||||
private int diesel;
|
||||
private int burnTime;
|
||||
|
||||
public ContainerMachineDiesel(InventoryPlayer invPlayer, TileEntityMachineDiesel tedf) {
|
||||
power = 0;
|
||||
diesel = 0;
|
||||
burnTime = 0;
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 53));
|
||||
this.addSlotToContainer(new SlotDiFurnace(invPlayer.player, tedf, 1, 80, 53));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 53));
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 0, this.diFurnace.diesel);
|
||||
crafting.sendProgressBarUpdate(this, 1, this.diFurnace.power);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 2, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return diFurnace.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.diesel != this.diFurnace.diesel)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 0, this.diFurnace.diesel);
|
||||
}
|
||||
|
||||
if(this.power != this.diFurnace.power)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 1, this.diFurnace.power);
|
||||
}
|
||||
}
|
||||
|
||||
this.diesel = this.diFurnace.diesel;
|
||||
this.power = this.diFurnace.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if(i == 0)
|
||||
{
|
||||
diFurnace.diesel = j;
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
diFurnace.power = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -43,9 +43,40 @@ private TileEntityMachineSchrabidiumTransmutator nukeBoy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 3, 4, false))
|
||||
if (!this.mergeItemStack(var5, 2, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -36,9 +36,36 @@ private TileEntityNukeBoy nukeBoy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 4) {
|
||||
if (!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -43,9 +43,36 @@ private TileEntityNukeFleija nukeTsar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 10) {
|
||||
if (!this.mergeItemStack(var5, 11, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -49,9 +49,39 @@ public class ContainerNukeFurnace extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 1, 2, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -37,9 +37,36 @@ private TileEntityNukeGadget nukeGadget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 5) {
|
||||
if (!this.mergeItemStack(var5, 6, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -37,9 +37,36 @@ private TileEntityNukeMan nukeMan;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 5) {
|
||||
if (!this.mergeItemStack(var5, 6, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -40,9 +40,36 @@ private TileEntityNukeMike nukeMike;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 7) {
|
||||
if (!this.mergeItemStack(var5, 8, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -46,9 +46,36 @@ private TileEntityNukePrototype nukeTsar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 13) {
|
||||
if (!this.mergeItemStack(var5, 14, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -38,9 +38,36 @@ private TileEntityNukeTsar nukeTsar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 5) {
|
||||
if (!this.mergeItemStack(var5, 6, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -45,9 +45,39 @@ public class ContainerPuF6Tank extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 2, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -49,9 +49,41 @@ public class ContainerReactor extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//Changing priorities without swapping the actual slots
|
||||
else if (!this.mergeItemStack(var5, 1, 2, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -86,9 +86,36 @@ public class ContainerReactorMultiblock extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 33) {
|
||||
if (!this.mergeItemStack(var5, 34, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -48,9 +48,38 @@ public class ContainerRtgFurnace extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 4) {
|
||||
if (!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 4, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -45,9 +45,39 @@ public class ContainerUF6Tank extends Container {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
return null;
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 3) {
|
||||
if (!this.mergeItemStack(var5, 4, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 1, false))
|
||||
{
|
||||
if (!this.mergeItemStack(var5, 2, 3, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
54
com/hbm/gui/GUIMachineDiesel.java
Normal file
54
com/hbm/gui/GUIMachineDiesel.java
Normal file
@ -0,0 +1,54 @@
|
||||
package com.hbm.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.TileEntityMachineCoal;
|
||||
import com.hbm.blocks.TileEntityMachineDiesel;
|
||||
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 GUIMachineDiesel extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/GUIDiesel.png");
|
||||
private TileEntityMachineDiesel diFurnace;
|
||||
|
||||
public GUIMachineDiesel(InventoryPlayer invPlayer, TileEntityMachineDiesel tedf) {
|
||||
super(new ContainerMachineDiesel(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@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("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.power > 0) {
|
||||
int i = diFurnace.getPowerScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 152, guiTop + 69 - i, 176, 52 - i, 16, i);
|
||||
}
|
||||
|
||||
if(diFurnace.diesel > 0)
|
||||
{
|
||||
int j = diFurnace.getDieselScaled(52);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 69 - j, 192, 52 - j, 16, j);
|
||||
drawTexturedModalRect(guiLeft + 43, guiTop + 34, 208, 0, 18, 18);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -314,6 +314,12 @@ public class ItemCustomLore extends Item {
|
||||
{
|
||||
list.add("Turns into Quad Tritium Rod");
|
||||
}
|
||||
|
||||
if(this == ModItems.tritium_deuterium_cake)
|
||||
{
|
||||
list.add("Not actual cake, but great");
|
||||
list.add("universal fusion fuel!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -153,8 +153,9 @@ public class ModItems {
|
||||
public static Item thruster_small;
|
||||
public static Item thruster_medium;
|
||||
public static Item thruster_large;
|
||||
|
||||
|
||||
public static Item pellet_rtg;
|
||||
public static Item tritium_deuterium_cake;
|
||||
|
||||
public static Item cell_empty;
|
||||
public static Item cell_uf6;
|
||||
@ -169,6 +170,7 @@ public class ModItems {
|
||||
public static Item inf_deuterium;
|
||||
public static Item inf_tritium;
|
||||
public static Item inf_sulfur;
|
||||
public static Item inf_diesel;
|
||||
|
||||
public static Item canister_empty;
|
||||
public static Item canister_fuel;
|
||||
@ -646,8 +648,9 @@ public class ModItems {
|
||||
circuit_red_copper = new Item().setUnlocalizedName("circuit_red_copper").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":circuit_red_copper");
|
||||
circuit_gold = new Item().setUnlocalizedName("circuit_gold").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":circuit_gold");
|
||||
circuit_schrabidium = new ItemCustomLore().setUnlocalizedName("circuit_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":circuit_schrabidium");
|
||||
|
||||
|
||||
pellet_rtg = new ItemCustomLore().setUnlocalizedName("pellet_rtg").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg");
|
||||
tritium_deuterium_cake = new ItemCustomLore().setUnlocalizedName("tritium_deuterium_cake").setCreativeTab(MainRegistry.tabParts).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":tritium_deuterium_cake");
|
||||
|
||||
cell_empty = new ItemCell().setUnlocalizedName("cell_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":cell_empty");
|
||||
cell_uf6 = new Item().setUnlocalizedName("cell_uf6").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.cell_empty).setTextureName(RefStrings.MODID + ":cell_uf6");
|
||||
@ -662,6 +665,7 @@ public class ModItems {
|
||||
inf_deuterium = new Item().setUnlocalizedName("inf_deuterium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_deuterium");
|
||||
inf_tritium = new Item().setUnlocalizedName("inf_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_tritium");
|
||||
inf_sulfur = new Item().setUnlocalizedName("inf_sulfur").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_sulfur");
|
||||
inf_diesel = new Item().setUnlocalizedName("inf_diesel").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":inf_diesel");
|
||||
|
||||
canister_empty = new ItemCustomLore().setUnlocalizedName("canister_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":canister_empty");
|
||||
canister_fuel = new ItemCustomLore().setUnlocalizedName("canister_fuel").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fuel");
|
||||
@ -1151,6 +1155,7 @@ public class ModItems {
|
||||
|
||||
//Pellets
|
||||
GameRegistry.registerItem(pellet_rtg, pellet_rtg.getUnlocalizedName());
|
||||
GameRegistry.registerItem(tritium_deuterium_cake, tritium_deuterium_cake.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_cluster, pellet_cluster.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pellet_gas, pellet_gas.getUnlocalizedName());
|
||||
|
||||
@ -1170,6 +1175,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(inf_deuterium, inf_deuterium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(inf_tritium, inf_tritium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(inf_sulfur, inf_sulfur.getUnlocalizedName());
|
||||
GameRegistry.registerItem(inf_diesel, inf_diesel.getUnlocalizedName());
|
||||
|
||||
//Canisters
|
||||
GameRegistry.registerItem(canister_empty, canister_empty.getUnlocalizedName());
|
||||
|
||||
@ -51,8 +51,8 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 32, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 8, 2),
|
||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 8, 2),
|
||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 8, 2),
|
||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.battery_schrabidium, 1000, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.syringe_awesome, 0, 1, 1, 1),
|
||||
|
||||
@ -40,7 +40,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
private void generateSurface(World world, Random rand, int i, int j) {
|
||||
//Ore stains per chunk
|
||||
for (int k = 0; k < 7; k++)
|
||||
for (int k = 0; k < MainRegistry.uraniumSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
//Max height of generation
|
||||
@ -51,7 +51,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_uranium, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 8; k++)
|
||||
for (int k = 0; k < MainRegistry.titaniumSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
@ -60,7 +60,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_titanium, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 5; k++)
|
||||
for (int k = 0; k < MainRegistry.sulfurSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
@ -69,7 +69,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_sulfur, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 7; k++)
|
||||
for (int k = 0; k < MainRegistry.aluminiumSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(45);
|
||||
@ -78,7 +78,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_aluminium, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 12; k++)
|
||||
for (int k = 0; k < MainRegistry.copperSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(50);
|
||||
@ -87,7 +87,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_copper, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 6; k++)
|
||||
for (int k = 0; k < MainRegistry.fluoriteSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(40);
|
||||
@ -96,7 +96,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_fluorite, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 4; k++)
|
||||
for (int k = 0; k < MainRegistry.niterSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
@ -105,7 +105,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_niter, 4)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 10; k++)
|
||||
for (int k = 0; k < MainRegistry.tungstenSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
@ -114,7 +114,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_tungsten, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 6; k++)
|
||||
for (int k = 0; k < MainRegistry.leadSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
@ -123,7 +123,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
(new WorldGenMinable(ModBlocks.ore_lead, 9)).generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int k = 0; k < 6; k++)
|
||||
for (int k = 0; k < MainRegistry.berylliumSpawn; k++)
|
||||
{
|
||||
int randPosX = i + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(35);
|
||||
@ -150,7 +150,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if(biome == BiomeGenBase.plains || biome == BiomeGenBase.desert)
|
||||
{
|
||||
if(rand.nextInt(500) == 0)
|
||||
if(rand.nextInt(MainRegistry.radioStructure) == 0)
|
||||
{
|
||||
for(int a = 0; a < 1; a++)
|
||||
{
|
||||
@ -165,7 +165,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if(biome == BiomeGenBase.plains || biome == BiomeGenBase.forest || biome == BiomeGenBase.desert || biome == BiomeGenBase.swampland || biome == BiomeGenBase.extremeHills)
|
||||
{
|
||||
if(rand.nextInt(250) == 0)
|
||||
if(rand.nextInt(MainRegistry.antennaStructure) == 0)
|
||||
{
|
||||
for(int a = 0; a < 1; a++)
|
||||
{
|
||||
@ -180,7 +180,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if(biome == BiomeGenBase.desert || biome == BiomeGenBase.beach || biome == BiomeGenBase.mesa || biome == BiomeGenBase.mesaPlateau)
|
||||
{
|
||||
if(rand.nextInt(500) == 0)
|
||||
if(rand.nextInt(MainRegistry.atomStructure) == 0)
|
||||
{
|
||||
for(int a = 0; a < 1; a++)
|
||||
{
|
||||
@ -195,7 +195,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if(biome == BiomeGenBase.desert)
|
||||
{
|
||||
if(rand.nextInt(500) == 0)
|
||||
if(rand.nextInt(MainRegistry.vertibirdStructure) == 0)
|
||||
{
|
||||
for(int a = 0; a < 1; a++)
|
||||
{
|
||||
@ -214,7 +214,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.nextInt(64) == 0)
|
||||
if(rand.nextInt(MainRegistry.dungeonStructure) == 0)
|
||||
{
|
||||
int x = i + rand.nextInt(16);
|
||||
int y = rand.nextInt(256);
|
||||
@ -224,7 +224,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if(biome == BiomeGenBase.plains || biome == BiomeGenBase.desert)
|
||||
{
|
||||
if(rand.nextInt(500) == 0)
|
||||
if(rand.nextInt(MainRegistry.relayStructure) == 0)
|
||||
{
|
||||
for(int a = 0; a < 1; a++)
|
||||
{
|
||||
@ -238,7 +238,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
if(biome == BiomeGenBase.plains || biome == BiomeGenBase.desert)
|
||||
{
|
||||
if(rand.nextInt(500) == 0)
|
||||
if(rand.nextInt(MainRegistry.satelliteStructure) == 0)
|
||||
{
|
||||
for(int a = 0; a < 1; a++)
|
||||
{
|
||||
@ -251,7 +251,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.nextInt(1000) == 0)
|
||||
if(rand.nextInt(MainRegistry.bunkerStructure) == 0)
|
||||
{
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -260,7 +260,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Bunker().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if(rand.nextInt(1000) == 0)
|
||||
if(rand.nextInt(MainRegistry.siloStructure) == 0)
|
||||
{
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -269,7 +269,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Silo().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if(rand.nextInt(1000) == 0)
|
||||
if(rand.nextInt(MainRegistry.factoryStructure) == 0)
|
||||
{
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -278,7 +278,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Factory().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if(rand.nextInt(500) == 0)
|
||||
if(rand.nextInt(MainRegistry.dudStructure) == 0)
|
||||
{
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
@ -287,7 +287,7 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
new Dud().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
if(rand.nextInt(1000) == 0)
|
||||
if(rand.nextInt(MainRegistry.spaceshipStructure) == 0)
|
||||
{
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
|
||||
@ -28,8 +28,8 @@ public class Library {
|
||||
public static String book14 = "Steel\nSteel is a commonly used material for building bombs, machines and decorative elements. It can be obtained by combining a lump of coal and an iron ingot in the alloy furnace.";
|
||||
public static String book15 = "Sulfur\nSulfur is a powder which will directly drop from it's ore. Sulfur is used for extracting deuterium with the deuterium extractor, crafting gunpowder or Schrabidiumtrisulfite.";
|
||||
public static String book16 = "Niter\nNiter also drops directly from the ore, it's only uses are for crafting det cords and gunpowder.";
|
||||
public static String book17 = "Industrial Grade Copper\nIndustrial Grade Copper (mainly just referred to as §oCopper§r) is an importand ingot used for crafting electronic components and creating Minecraft Grade Copper. It can be obtained by simply smelting copper ore.";
|
||||
public static String book18 = "Minecraft Grade Copper\nMinecraft Grade Copper (aka §oRed Copper§r) can be created by combining copper ingots and redstone in the alloy furnace. It is used for crafting advanced electronics and batteries.";
|
||||
public static String book17 = "Industrial Grade Copper\nIndustrial Grade Copper (mainly just referred to as Copper) is an importand ingot used for crafting electronic components and creating Minecraft Grade Copper. It can be obtained by simply smelting copper ore.";
|
||||
public static String book18 = "Minecraft Grade Copper\nMinecraft Grade Copper (aka Red Copper) can be created by combining copper ingots and redstone in the alloy furnace. It is used for crafting advanced electronics and batteries.";
|
||||
public static String book19 = "Tungsten\nTungsten can be used to make neutron reflectors by combining it in the alloy furnace with coal. It is also needed for heating coils, which are importand for storing uranium and plutonium hexafluorite.";
|
||||
public static String book110 = "Aluminium\nAluminium is a commonly found metal that is used for crafting hulls and machines. Basic circuits are also made out of aluminium wires.";
|
||||
public static String book111 = "Fuorite\nFluorite is a powder which can be found in form of ores. It is used to make uranium and plutonium hexafluorite, gasses which can be enriched in a gas centrifuge.";
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.19";
|
||||
public static final String VERSION = "1.0.20";
|
||||
public static final String CLIENTSIDE = "com.hbm.main.ClientProxy";
|
||||
public static final String SERVERSIDE = "com.hbm.main.ServerProxy";
|
||||
}
|
||||
|
||||
@ -272,7 +272,8 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ingot_euphemium, 1), new Object[] { "###", "###", "###", '#', ModItems.nugget_euphemium });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nugget_euphemium, 9), new Object[] { "#", '#', ModItems.ingot_euphemium });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pellet_rtg, 1), new Object[] { "IPI", "PPP", "IPI", 'I', "plateIron", 'P', ModItems.nugget_pu238 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pellet_rtg, 1), new Object[] { "IPI", "PPP", "IPI", 'I', "plateIron", 'P', "tinyPu238" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.tritium_deuterium_cake, 1), new Object[] { "DLD", "LTL", "DLD", 'L', "ingotLithium", 'D', ModItems.cell_deuterium, 'T', ModItems.cell_tritium }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_copper, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_red_copper, 'I', "ingotIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_advanced_alloy, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_advanced_alloy, 'I', "ingotIron" }));
|
||||
@ -362,6 +363,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_converter_he_rf), 1), new Object[] { "SSS", "CRC", "SSS", 'S', "ingotSteel", 'C', ModItems.coil_copper, 'R', ModItems.coil_copper_torus }));
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_converter_rf_he), 1), new Object[] { "SSS", "CRC", "SSS", 'S', ModItems.ingot_beryllium, 'C', ModItems.coil_copper, 'R', ModItems.coil_copper_torus });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_schrabidium_transmutator), 1), new Object[] { "TST", "ARA", "BBB", 'S', ModItems.nugget_schrabidium , 'T', "ingotTitanium", 'A', Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 'R', Item.getItemFromBlock(ModBlocks.machine_reactor), 'B', Item.getItemFromBlock(ModBlocks.machine_battery) }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_diesel), 1), new Object[] { "HTH", "PRP", "SFS", 'S', "ingotSteel", 'T', ModItems.tank_steel, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'R', ModItems.ingot_red_copper, 'F', Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off) }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 1), new Object[] { "PIP", "I I", "PIP", 'P', "plateTitanium", 'I', "ingotTitanium" }));
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_furnace), 1), new Object[] { "HMH", "MFM", "HMH", 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 'M', ModItems.motor, 'F', Item.getItemFromBlock(Blocks.furnace) });
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.blocks.TileEntityLaunchPad;
|
||||
import com.hbm.blocks.TileEntityMachineBattery;
|
||||
import com.hbm.blocks.TileEntityMachineCoal;
|
||||
import com.hbm.blocks.TileEntityMachineDeuterium;
|
||||
import com.hbm.blocks.TileEntityMachineDiesel;
|
||||
import com.hbm.blocks.TileEntityMachineElectricFurnace;
|
||||
import com.hbm.blocks.TileEntityMachineGenerator;
|
||||
import com.hbm.blocks.TileEntityMachineCentrifuge;
|
||||
@ -44,6 +45,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.ContainerMachineDiesel;
|
||||
import com.hbm.gui.ContainerMachineSchrabidiumTransmutator;
|
||||
import com.hbm.gui.ContainerNukeBoy;
|
||||
import com.hbm.gui.ContainerNukeFleija;
|
||||
@ -70,6 +72,7 @@ import com.hbm.gui.GUIMachineBattery;
|
||||
import com.hbm.gui.GUIMachineCentrifuge;
|
||||
import com.hbm.gui.GUIMachineCoal;
|
||||
import com.hbm.gui.GUIMachineDeuterium;
|
||||
import com.hbm.gui.GUIMachineDiesel;
|
||||
import com.hbm.gui.GUIMachineElectricFurnace;
|
||||
import com.hbm.gui.GUIMachineGenerator;
|
||||
import com.hbm.gui.GUIMachinePuF6Tank;
|
||||
@ -334,6 +337,14 @@ public class GUIHandler implements IGuiHandler {
|
||||
return new ContainerMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity);
|
||||
}
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_diesel:
|
||||
{
|
||||
if(entity instanceof TileEntityMachineDiesel)
|
||||
{
|
||||
return new ContainerMachineDiesel(player.inventory, (TileEntityMachineDiesel) entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -578,6 +589,14 @@ public class GUIHandler implements IGuiHandler {
|
||||
return new GUIMachineSchrabidiumTransmutator(player.inventory, (TileEntityMachineSchrabidiumTransmutator) entity);
|
||||
}
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_diesel:
|
||||
{
|
||||
if(entity instanceof TileEntityMachineDiesel)
|
||||
{
|
||||
return new GUIMachineDiesel(player.inventory, (TileEntityMachineDiesel) entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -36,6 +36,7 @@ import com.hbm.blocks.TileEntityLaunchPad;
|
||||
import com.hbm.blocks.TileEntityMachineBattery;
|
||||
import com.hbm.blocks.TileEntityMachineCoal;
|
||||
import com.hbm.blocks.TileEntityMachineDeuterium;
|
||||
import com.hbm.blocks.TileEntityMachineDiesel;
|
||||
import com.hbm.blocks.TileEntityMachineElectricFurnace;
|
||||
import com.hbm.blocks.TileEntityMachineGenerator;
|
||||
import com.hbm.blocks.TileEntityMachineCentrifuge;
|
||||
@ -162,6 +163,16 @@ public class MainRegistry
|
||||
public static boolean enableDungeons = true;
|
||||
public static boolean enableMDOres = true;
|
||||
public static boolean enableBarrels = false;
|
||||
public static int uraniumSpawn = 7;
|
||||
public static int titaniumSpawn = 8;
|
||||
public static int sulfurSpawn = 5;
|
||||
public static int aluminiumSpawn = 7;
|
||||
public static int copperSpawn = 12;
|
||||
public static int fluoriteSpawn = 6;
|
||||
public static int niterSpawn = 4;
|
||||
public static int tungstenSpawn = 10;
|
||||
public static int leadSpawn = 6;
|
||||
public static int berylliumSpawn = 6;
|
||||
public static int gadgetRadius = 150;
|
||||
public static int boyRadius = 120;
|
||||
public static int manRadius = 175;
|
||||
@ -169,6 +180,22 @@ public class MainRegistry
|
||||
public static int tsarRadius = 500;
|
||||
public static int prototypeRadius = 150;
|
||||
public static int fleijaRadius = 50;
|
||||
public static int missileRadius = 100;
|
||||
public static int mirvRadius = 100;
|
||||
public static int fatmanRadius = 35;
|
||||
public static int nukaRadius = 25;
|
||||
public static int radioStructure = 500;
|
||||
public static int antennaStructure = 250;
|
||||
public static int atomStructure = 500;
|
||||
public static int vertibirdStructure = 500;
|
||||
public static int dungeonStructure = 64;
|
||||
public static int relayStructure = 500;
|
||||
public static int satelliteStructure = 500;
|
||||
public static int bunkerStructure = 1000;
|
||||
public static int siloStructure = 1000;
|
||||
public static int factoryStructure = 1000;
|
||||
public static int dudStructure = 500;
|
||||
public static int spaceshipStructure = 1000;
|
||||
|
||||
@EventHandler
|
||||
public void PreLoad(FMLPreInitializationEvent PreEvent)
|
||||
@ -237,6 +264,7 @@ public class MainRegistry
|
||||
GameRegistry.registerTileEntity(TileEntityConverterHeRf.class, "tileentity_converter_herf");
|
||||
GameRegistry.registerTileEntity(TileEntityConverterRfHe.class, "tileentity_converter_rfhe");
|
||||
GameRegistry.registerTileEntity(TileEntityMachineSchrabidiumTransmutator.class, "tileentity_schrabidium_transmutator");
|
||||
GameRegistry.registerTileEntity(TileEntityMachineDiesel.class, "tileentity_diesel_generator");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
|
||||
@ -396,34 +424,108 @@ public class MainRegistry
|
||||
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 PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.0_uraniumSpawnrate", 7);
|
||||
PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk";
|
||||
uraniumSpawn = PuraniumSpawn.getInt();
|
||||
Property PtitaniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.1_titaniumSpawnrate", 8);
|
||||
PtitaniumSpawn.comment = "Ammount of titanium ore veins per chunk";
|
||||
titaniumSpawn = PtitaniumSpawn.getInt();
|
||||
Property PsulfurSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.2_sulfurSpawnrate", 5);
|
||||
PsulfurSpawn.comment = "Ammount of sulfur ore veins per chunk";
|
||||
sulfurSpawn = PsulfurSpawn.getInt();
|
||||
Property PaluminiumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.3_aluminiumSpawnrate", 7);
|
||||
PaluminiumSpawn.comment = "Ammount of aluminium ore veins per chunk";
|
||||
aluminiumSpawn = PaluminiumSpawn.getInt();
|
||||
Property PcopperSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.4_copperSpawnrate", 12);
|
||||
PcopperSpawn.comment = "Ammount of copper ore veins per chunk";
|
||||
copperSpawn = PcopperSpawn.getInt();
|
||||
Property PFluoriteSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.5_fluoriteSpawnrate", 6);
|
||||
PFluoriteSpawn.comment = "Ammount of fluorite ore veins per chunk";
|
||||
fluoriteSpawn = PFluoriteSpawn.getInt();
|
||||
Property PNiterSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.6_niterSpawnrate", 4);
|
||||
PNiterSpawn.comment = "Ammount of niter ore veins per chunk";
|
||||
niterSpawn = PNiterSpawn.getInt();
|
||||
Property PtungstenSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.7_tungstenSpawnrate", 10);
|
||||
PtungstenSpawn.comment = "Ammount of tungsten ore veins per chunk";
|
||||
tungstenSpawn = PtungstenSpawn.getInt();
|
||||
Property PleadSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.8_leadSpawnrate", 6);
|
||||
PleadSpawn.comment = "Ammount of lead ore veins per chunk";
|
||||
leadSpawn = PleadSpawn.getInt();
|
||||
Property PberylliumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.9_berylliumSpawnrate", 6);
|
||||
PberylliumSpawn.comment = "Ammount of beryllium ore veins per chunk";
|
||||
berylliumSpawn = PberylliumSpawn.getInt();
|
||||
|
||||
Property propGadget = config.get(Configuration.CATEGORY_GENERAL, "2.0_gadgetRadius", 150);
|
||||
Property propGadget = config.get(Configuration.CATEGORY_GENERAL, "3.0_gadgetRadius", 150);
|
||||
propGadget.comment = "Radius of the Gadget";
|
||||
gadgetRadius = propGadget.getInt();
|
||||
|
||||
Property propBoy = config.get(Configuration.CATEGORY_GENERAL, "2.1_boyRadius", 120);
|
||||
Property propBoy = config.get(Configuration.CATEGORY_GENERAL, "3.1_boyRadius", 120);
|
||||
propBoy.comment = "Radius of Little Boy";
|
||||
boyRadius = propBoy.getInt();
|
||||
|
||||
Property propMan = config.get(Configuration.CATEGORY_GENERAL, "2.2_manRadius", 175);
|
||||
Property propMan = config.get(Configuration.CATEGORY_GENERAL, "3.2_manRadius", 175);
|
||||
propMan.comment = "Radius of Fat Man";
|
||||
manRadius = propMan.getInt();
|
||||
|
||||
Property propMike = config.get(Configuration.CATEGORY_GENERAL, "2.3_mikeRadius", 250);
|
||||
Property propMike = config.get(Configuration.CATEGORY_GENERAL, "3.3_mikeRadius", 250);
|
||||
propMike.comment = "Radius of Ivy Mike";
|
||||
mikeRadius = propMike.getInt();
|
||||
|
||||
Property propTsar = config.get(Configuration.CATEGORY_GENERAL, "2.4_tsarRadius", 500);
|
||||
Property propTsar = config.get(Configuration.CATEGORY_GENERAL, "3.4_tsarRadius", 500);
|
||||
propTsar.comment = "Radius of the Tsar Bomba";
|
||||
tsarRadius = propTsar.getInt();
|
||||
|
||||
Property propPrototype = config.get(Configuration.CATEGORY_GENERAL, "2.5_prototypeRadius", 150);
|
||||
Property propPrototype = config.get(Configuration.CATEGORY_GENERAL, "3.5_prototypeRadius", 150);
|
||||
propPrototype.comment = "Radius of the Prototype";
|
||||
prototypeRadius = propPrototype.getInt();
|
||||
|
||||
Property propFleija = config.get(Configuration.CATEGORY_GENERAL, "2.6_fleijaRadius", 50);
|
||||
Property propFleija = config.get(Configuration.CATEGORY_GENERAL, "3.6_fleijaRadius", 50);
|
||||
propFleija.comment = "Radius of F.L.E.I.J.A.";
|
||||
fleijaRadius = propFleija.getInt();
|
||||
Property propMissile = config.get(Configuration.CATEGORY_GENERAL, "3.7_missileRadius", 100);
|
||||
propMissile.comment = "Radius of the nuclear missile";
|
||||
missileRadius = propMissile.getInt();
|
||||
Property propMirv = config.get(Configuration.CATEGORY_GENERAL, "3.8_mirvRadius", 100);
|
||||
propMirv.comment = "Radius of a MIRV";
|
||||
mirvRadius = propMirv.getInt();
|
||||
Property propFatman = config.get(Configuration.CATEGORY_GENERAL, "3.9_fatmanRadius", 35);
|
||||
propFatman.comment = "Radius of the Fatman Launcher";
|
||||
fatmanRadius = propFatman.getInt();
|
||||
Property propNuka = config.get(Configuration.CATEGORY_GENERAL, "3.91_nukaRadius", 25);
|
||||
propNuka.comment = "Radius of the nuka grenade";
|
||||
nukaRadius = propNuka.getInt();
|
||||
|
||||
Property propRadio = config.get(Configuration.CATEGORY_GENERAL, "4.0_radioSpawn", 500);
|
||||
propRadio.comment = "Spawn radio station on every nTH chunk";
|
||||
radioStructure = propRadio.getInt();
|
||||
Property propAntenna = config.get(Configuration.CATEGORY_GENERAL, "4.1_antennaSpawn", 250);
|
||||
propAntenna.comment = "Spawn antenna on every nTH chunk";
|
||||
antennaStructure = propAntenna.getInt();
|
||||
Property propAtom = config.get(Configuration.CATEGORY_GENERAL, "4.2_atomSpawn", 500);
|
||||
propAtom.comment = "Spawn power plant on every nTH chunk";
|
||||
atomStructure = propAtom.getInt();
|
||||
Property propVertibird = config.get(Configuration.CATEGORY_GENERAL, "4.3_vertibirdSpawn", 500);
|
||||
propVertibird.comment = "Spawn vertibird on every nTH chunk";
|
||||
vertibirdStructure = propVertibird.getInt();
|
||||
Property propDungeon = config.get(Configuration.CATEGORY_GENERAL, "4.4_dungeonSpawn", 64);
|
||||
propDungeon.comment = "Spawn library dungeon on every nTH chunk";
|
||||
dungeonStructure = propDungeon.getInt();
|
||||
Property propRelay = config.get(Configuration.CATEGORY_GENERAL, "4.5_relaySpawn", 500);
|
||||
propRelay.comment = "Spawn relay on every nTH chunk";
|
||||
relayStructure = propRelay.getInt();
|
||||
Property propSatellite = config.get(Configuration.CATEGORY_GENERAL, "4.6_satelliteSpawn", 500);
|
||||
propSatellite.comment = "Spawn satellite dish on every nTH chunk";
|
||||
satelliteStructure = propSatellite.getInt();
|
||||
Property propBunker = config.get(Configuration.CATEGORY_GENERAL, "4.7_bunkerSpawn", 1000);
|
||||
propBunker.comment = "Spawn bunker on every nTH chunk";
|
||||
bunkerStructure = propBunker.getInt();
|
||||
Property propSilo = config.get(Configuration.CATEGORY_GENERAL, "4.8_siloSpawn", 1000);
|
||||
propSilo.comment = "Spawn missile silo on every nTH chunk";
|
||||
siloStructure = propSilo.getInt();
|
||||
Property propFactory = config.get(Configuration.CATEGORY_GENERAL, "4.9_factorySpawn", 1000);
|
||||
propFactory.comment = "Spawn factory on every nTH chunk";
|
||||
factoryStructure = propFactory.getInt();
|
||||
Property propDud = config.get(Configuration.CATEGORY_GENERAL, "4.91_dudSpawn", 500);
|
||||
propDud.comment = "Spawn dud on every nTH chunk";
|
||||
dudStructure = propDud.getInt();
|
||||
Property propSpaceship = config.get(Configuration.CATEGORY_GENERAL, "4.92_spaceshipSpawn", 1000);
|
||||
propSpaceship.comment = "Spawn spaceship on every nTH chunk";
|
||||
spaceshipStructure = propSpaceship.getInt();
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
BIN
hbm1.0.18.jar
BIN
hbm1.0.18.jar
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user