mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Radgen texture, fixed machines not dropping contents, more info panels
This commit is contained in:
parent
5022998e18
commit
f28acadeb6
@ -315,7 +315,7 @@ tile.fluid_duct.name=Universelles Flüssigkeitsrohr
|
||||
tile.machine_fluidtank.name=Tank
|
||||
container.fluidtank=Tank
|
||||
tile.machine_turbofan.name=Turbofan
|
||||
container.turbofan=Turbofan
|
||||
container.machineTurbofan=Turbofan
|
||||
tile.crate_iron.name=Eisenkiste
|
||||
container.crateIron=Eisenkiste
|
||||
tile.crate_steel.name=Stahlkiste
|
||||
@ -324,8 +324,8 @@ tile.machine_press.name=Dampfpresse
|
||||
container.press=Dampfpresse
|
||||
tile.machine_siren.name=Sirene
|
||||
container.siren=Sirene
|
||||
tile.machine_radgen.name=Strahlenbetriebener Generator [WIP]
|
||||
container.radGen=Strahlenbetriebener Generator [WIP]
|
||||
tile.machine_radgen.name=Strahlenbetriebener Generator
|
||||
container.radGen=Strahlenbetriebener Generator
|
||||
tile.machine_selenium.name=Hochleistungs-Sternmotor
|
||||
container.machineSelenium=Hochleistungs-Sternmotor
|
||||
|
||||
|
||||
@ -315,7 +315,7 @@ tile.fluid_duct.name=Universal Fluid Duct
|
||||
tile.machine_fluidtank.name=Tank
|
||||
container.fluidtank=Tank
|
||||
tile.machine_turbofan.name=Turbofan
|
||||
container.turbofan=Turbofan
|
||||
container.machineTurbofan=Turbofan
|
||||
tile.crate_iron.name=Iron Crate
|
||||
container.crateIron=Iron Crate
|
||||
tile.crate_steel.name=Steel Crate
|
||||
@ -324,8 +324,8 @@ tile.machine_press.name=Steam Press
|
||||
container.press=Steam Press
|
||||
tile.machine_siren.name=Siren
|
||||
container.siren=Siren
|
||||
tile.machine_radgen.name=Radiation-Powered Engine [WIP]
|
||||
container.radGen=Radiation-Powered Engine [WIP]
|
||||
tile.machine_radgen.name=Radiation-Powered Engine
|
||||
container.radGen=Radiation-Powered Engine
|
||||
tile.machine_selenium.name=Radial Performance Engine
|
||||
container.machineSelenium=Radial Performance Engine
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -97,6 +97,54 @@ v -0.093969 -0.000000 1.434202
|
||||
v 0.093969 -0.000000 1.365798
|
||||
v -0.093969 1.000000 1.434202
|
||||
v 0.093969 1.000000 1.365798
|
||||
vt 0.999999 0.250000
|
||||
vt 0.999999 0.666666
|
||||
vt 0.916666 0.666666
|
||||
vt 0.000000 0.083334
|
||||
vt 0.416666 0.083333
|
||||
vt 0.416666 0.166667
|
||||
vt 0.000000 0.833334
|
||||
vt 0.416666 0.833334
|
||||
vt 0.416666 0.916667
|
||||
vt 0.416666 0.750000
|
||||
vt 0.833332 0.750000
|
||||
vt 0.416666 0.583334
|
||||
vt 0.416666 0.666667
|
||||
vt 0.000000 0.666667
|
||||
vt 0.416666 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.916666 0.500000
|
||||
vt 0.916666 0.583333
|
||||
vt 0.500000 0.583333
|
||||
vt 0.000000 0.750000
|
||||
vt 0.416666 0.250000
|
||||
vt 0.499999 0.250000
|
||||
vt 0.000000 0.250000
|
||||
vt 0.000000 0.166667
|
||||
vt 0.833333 0.166667
|
||||
vt 0.916666 0.333334
|
||||
vt 0.500000 0.333334
|
||||
vt 0.416666 0.416667
|
||||
vt 0.000000 0.416667
|
||||
vt 0.000000 0.333334
|
||||
vt 0.000000 0.583334
|
||||
vt 0.000000 0.500000
|
||||
vt 0.833333 0.083333
|
||||
vt 0.416666 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.916666 0.416667
|
||||
vt 0.500000 0.416667
|
||||
vt 0.416666 0.333333
|
||||
vt 0.833332 0.833334
|
||||
vt 0.833332 0.916667
|
||||
vt 0.833332 0.250000
|
||||
vt 0.833332 0.666667
|
||||
vt 0.416666 0.500000
|
||||
vt 0.916666 0.250000
|
||||
vt 0.000000 0.916667
|
||||
vt 0.500000 0.500000
|
||||
vt 0.500000 0.666667
|
||||
vt 0.833333 0.000000
|
||||
vn 0.171000 0.296200 0.939700
|
||||
vn 0.241800 0.241800 0.939700
|
||||
vn 0.330400 0.088500 0.939700
|
||||
@ -122,51 +170,51 @@ vn 0.241800 -0.241800 0.939700
|
||||
vn 0.330400 -0.088500 0.939700
|
||||
vn 0.342000 0.000000 0.939700
|
||||
s off
|
||||
f 2//1 4//1 3//1
|
||||
f 6//2 8//2 7//2
|
||||
f 10//3 12//3 11//3
|
||||
f 13//4 14//4 16//4
|
||||
f 17//5 18//5 20//5
|
||||
f 21//6 22//6 24//6
|
||||
f 25//7 26//7 28//7
|
||||
f 30//8 32//8 31//8
|
||||
f 34//9 36//9 35//9
|
||||
f 38//10 40//10 39//10
|
||||
f 42//11 44//11 43//11
|
||||
f 46//12 48//12 47//12
|
||||
f 50//13 52//13 51//13
|
||||
f 54//14 56//14 55//14
|
||||
f 58//15 60//15 59//15
|
||||
f 62//16 64//16 63//16
|
||||
f 66//17 68//17 67//17
|
||||
f 70//18 72//18 71//18
|
||||
f 74//19 76//19 75//19
|
||||
f 78//20 80//20 79//20
|
||||
f 82//21 84//21 83//21
|
||||
f 86//22 88//22 87//22
|
||||
f 90//23 92//23 91//23
|
||||
f 94//24 96//24 95//24
|
||||
f 1//1 2//1 3//1
|
||||
f 5//2 6//2 7//2
|
||||
f 9//3 10//3 11//3
|
||||
f 15//4 13//4 16//4
|
||||
f 19//5 17//5 20//5
|
||||
f 23//6 21//6 24//6
|
||||
f 27//7 25//7 28//7
|
||||
f 29//8 30//8 31//8
|
||||
f 33//9 34//9 35//9
|
||||
f 37//10 38//10 39//10
|
||||
f 41//11 42//11 43//11
|
||||
f 45//12 46//12 47//12
|
||||
f 49//13 50//13 51//13
|
||||
f 53//14 54//14 55//14
|
||||
f 57//15 58//15 59//15
|
||||
f 61//16 62//16 63//16
|
||||
f 65//17 66//17 67//17
|
||||
f 69//18 70//18 71//18
|
||||
f 73//19 74//19 75//19
|
||||
f 77//20 78//20 79//20
|
||||
f 81//21 82//21 83//21
|
||||
f 85//22 86//22 87//22
|
||||
f 89//23 90//23 91//23
|
||||
f 93//24 94//24 95//24
|
||||
f 2/1/1 4/2/1 3/3/1
|
||||
f 6/4/2 8/5/2 7/6/2
|
||||
f 10/7/3 12/8/3 11/9/3
|
||||
f 13/8/4 14/10/4 16/11/4
|
||||
f 17/12/5 18/13/5 20/14/5
|
||||
f 21/9/6 22/15/6 24/16/6
|
||||
f 25/17/7 26/18/7 28/19/7
|
||||
f 30/10/8 32/20/8 31/14/8
|
||||
f 34/13/9 36/21/9 35/22/9
|
||||
f 38/21/10 40/23/10 39/24/10
|
||||
f 42/25/11 44/6/11 43/5/11
|
||||
f 46/26/12 48/27/12 47/22/12
|
||||
f 50/28/13 52/29/13 51/30/13
|
||||
f 54/12/14 56/31/14 55/32/14
|
||||
f 58/33/15 60/5/15 59/34/15
|
||||
f 62/5/16 64/4/16 63/35/16
|
||||
f 66/27/17 68/26/17 67/36/17
|
||||
f 70/37/18 72/36/18 71/17/18
|
||||
f 74/20/19 76/10/19 75/8/19
|
||||
f 78/23/20 80/21/20 79/38/20
|
||||
f 82/8/21 84/39/21 83/40/21
|
||||
f 86/6/22 88/25/22 87/41/22
|
||||
f 90/13/23 92/42/23 91/11/23
|
||||
f 94/29/24 96/28/24 95/43/24
|
||||
f 1/44/1 2/1/1 3/3/1
|
||||
f 5/24/2 6/4/2 7/6/2
|
||||
f 9/45/3 10/7/3 11/9/3
|
||||
f 15/39/4 13/8/4 16/11/4
|
||||
f 19/31/5 17/12/5 20/14/5
|
||||
f 23/45/6 21/9/6 24/16/6
|
||||
f 27/46/7 25/17/7 28/19/7
|
||||
f 29/13/8 30/10/8 31/14/8
|
||||
f 33/47/9 34/13/9 35/22/9
|
||||
f 37/6/10 38/21/10 39/24/10
|
||||
f 41/33/11 42/25/11 43/5/11
|
||||
f 45/44/12 46/26/12 47/22/12
|
||||
f 49/38/13 50/28/13 51/30/13
|
||||
f 53/43/14 54/12/14 55/32/14
|
||||
f 57/48/15 58/33/15 59/34/15
|
||||
f 61/34/16 62/5/16 63/35/16
|
||||
f 65/37/17 66/27/17 67/36/17
|
||||
f 69/46/18 70/37/18 71/17/18
|
||||
f 73/7/19 74/20/19 75/8/19
|
||||
f 77/30/20 78/23/20 79/38/20
|
||||
f 81/9/21 82/8/21 83/40/21
|
||||
f 85/21/22 86/6/22 87/41/22
|
||||
f 89/10/23 90/13/23 91/11/23
|
||||
f 93/32/24 94/29/24 95/43/24
|
||||
|
||||
BIN
assets/hbm/textures/blocks/machine_radgen.png
Normal file
BIN
assets/hbm/textures/blocks/machine_radgen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 277 B |
BIN
assets/hbm/textures/models/rad_gen_body.png
Normal file
BIN
assets/hbm/textures/models/rad_gen_body.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |
@ -678,7 +678,7 @@ public class ModBlocks {
|
||||
machine_generator = new MachineGenerator(Material.iron).setBlockName("machine_generator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock);
|
||||
machine_industrial_generator = new MachineIGenerator(Material.iron).setBlockName("machine_industrial_generator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":industrial_generator");
|
||||
machine_cyclotron = new MachineCyclotron(Material.iron).setBlockName("machine_cyclotron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":cyclotron");
|
||||
machine_radgen = new MachineRadGen(Material.iron).setBlockName("machine_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":code");
|
||||
machine_radgen = new MachineRadGen(Material.iron).setBlockName("machine_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_radgen");
|
||||
|
||||
machine_electric_furnace_off = new MachineElectricFurnace(false).setBlockName("machine_electric_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock);
|
||||
machine_electric_furnace_on = new MachineElectricFurnace(true).setBlockName("machine_electric_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityTurretCIWS;
|
||||
import com.hbm.tileentity.bomb.TileEntityTurretCheapo;
|
||||
import com.hbm.tileentity.bomb.TileEntityTurretSpitfire;
|
||||
@ -55,7 +56,7 @@ public class TurretCIWS extends TurretBase {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
rayShot(world, vector, x + vector.xCoord * 2.5 + 0.5, y + vector.yCoord * 2.5 + 0.5, z + vector.zCoord * 2.5 + 0.5, 100, 10.0F, 50);
|
||||
rayShot(world, vector, x + vector.xCoord * 2.5 + 0.5, y + vector.yCoord * 2.5 + 0.5, z + vector.zCoord * 2.5 + 0.5, 100, 10.0F, MainRegistry.ciwsHitrate);
|
||||
|
||||
EntityGasFlameFX smoke = new EntityGasFlameFX(world);
|
||||
smoke.posX = x + vector.xCoord * 2.5 + 0.5;
|
||||
|
||||
@ -8,11 +8,15 @@ import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -234,4 +238,59 @@ public class MachineAssembler extends BlockContainer implements IMultiblock {
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@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)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,13 +6,18 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandler;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCentrifuge;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -234,4 +239,59 @@ public class MachineChemplant extends BlockContainer implements IMultiblock {
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@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)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,9 +14,12 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -192,4 +195,59 @@ public class MachineIGenerator extends BlockContainer implements IMultiblock {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@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)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,11 +8,15 @@ import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -171,9 +175,58 @@ public class MachineMiningDrill extends BlockContainer implements IMultiblock {
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z)
|
||||
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_)
|
||||
{
|
||||
return true;
|
||||
if (!keepInventory)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,12 +11,16 @@ import com.hbm.tileentity.machine.TileEntityMachineIGenerator;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadGen;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -160,4 +164,59 @@ public class MachineRadGen extends BlockContainer implements IMultiblock {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@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)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -9,10 +11,15 @@ import com.hbm.tileentity.machine.TileEntityMachineSiren;
|
||||
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.inventory.ISidedInventory;
|
||||
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;
|
||||
@ -63,4 +70,59 @@ public class MachineSiren extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@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)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -17,9 +17,12 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@ -260,4 +263,59 @@ public class MachineTurbofan extends BlockContainer implements IMultiblock {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@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)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)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_);
|
||||
}
|
||||
}
|
||||
@ -1673,6 +1673,63 @@ public class MachineRecipes {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
switch(ItemAssemblyTemplate.EnumAssemblyTemplate.getEnum(stack.getItemDamage())) {
|
||||
case IRON_PLATE:
|
||||
list.add(new ItemStack(Items.iron_ingot, 1));
|
||||
break;
|
||||
case GOLD_PLATE:
|
||||
list.add(new ItemStack(Items.gold_ingot, 1));
|
||||
break;
|
||||
case TITANIUM_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_titanium, 1));
|
||||
break;
|
||||
case ALUMINIUM_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_aluminium, 1));
|
||||
break;
|
||||
case STEEL_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_steel, 1));
|
||||
break;
|
||||
case LEAD_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_lead, 1));
|
||||
break;
|
||||
case COPPER_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_copper, 1));
|
||||
break;
|
||||
case ADVANCED_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_advanced_alloy, 1));
|
||||
break;
|
||||
case SCHRABIDIUM_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_schrabidium, 1));
|
||||
break;
|
||||
case CMB_PLATE:
|
||||
list.add(new ItemStack(ModItems.ingot_combine_steel, 1));
|
||||
break;
|
||||
case ALUMINIUM_WIRE:
|
||||
list.add(new ItemStack(ModItems.ingot_aluminium, 1));
|
||||
break;
|
||||
case COPPER_WIRE:
|
||||
list.add(new ItemStack(ModItems.ingot_copper, 1));
|
||||
break;
|
||||
case TUNGSTEN_WIRE:
|
||||
list.add(new ItemStack(ModItems.ingot_tungsten, 1));
|
||||
break;
|
||||
case REDCOPPER_WIRE:
|
||||
list.add(new ItemStack(ModItems.ingot_red_copper, 1));
|
||||
break;
|
||||
case ADVANCED_WIRE:
|
||||
list.add(new ItemStack(ModItems.ingot_advanced_alloy, 1));
|
||||
break;
|
||||
case GOLD_WIRE:
|
||||
list.add(new ItemStack(Items.gold_ingot, 1));
|
||||
break;
|
||||
case SCHRABIDIUM_WIRE:
|
||||
list.add(new ItemStack(ModItems.ingot_schrabidium, 1));
|
||||
break;
|
||||
case MAGNETIZED_WIRE:
|
||||
list.add(new ItemStack(ModItems.ingot_magnetized_tungsten, 1));
|
||||
break;
|
||||
case CIRCUIT_1:
|
||||
list.add(new ItemStack(ModItems.circuit_raw, 1));
|
||||
break;
|
||||
case SCHRABIDIUM_HAMMER:
|
||||
list.add(new ItemStack(ModBlocks.block_schrabidium, 15));
|
||||
list.add(new ItemStack(ModItems.ingot_polymer, 64*2));
|
||||
@ -2236,6 +2293,16 @@ public class MachineRecipes {
|
||||
list.add(new ItemStack(ModItems.neutron_reflector, 4));
|
||||
list.add(new ItemStack(ModItems.plate_copper, 2));
|
||||
break;
|
||||
case RAD_GEN:
|
||||
list.add(new ItemStack(ModItems.ingot_steel, 8));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 32));
|
||||
list.add(new ItemStack(ModItems.coil_magnetized_tungsten, 6));
|
||||
list.add(new ItemStack(ModItems.wire_magnetized_tungsten, 24));
|
||||
list.add(new ItemStack(ModItems.circuit_gold, 4));
|
||||
list.add(new ItemStack(ModItems.reactor_core, 3));
|
||||
list.add(new ItemStack(ModItems.ingot_starmetal, 1));
|
||||
list.add(new ItemStack(Items.dye, 1, 1));
|
||||
break;
|
||||
case DIESEL_GENERATOR:
|
||||
list.add(new ItemStack(ModItems.hull_small_steel, 4));
|
||||
list.add(new ItemStack(Blocks.piston, 4));
|
||||
@ -3174,6 +3241,63 @@ public class MachineRecipes {
|
||||
ItemStack output = null;
|
||||
|
||||
switch(ItemAssemblyTemplate.EnumAssemblyTemplate.getEnum(stack.getItemDamage())) {
|
||||
case IRON_PLATE:
|
||||
output = new ItemStack(ModItems.plate_iron, 2);
|
||||
break;
|
||||
case GOLD_PLATE:
|
||||
output = new ItemStack(ModItems.plate_gold, 2);
|
||||
break;
|
||||
case TITANIUM_PLATE:
|
||||
output = new ItemStack(ModItems.plate_titanium, 2);
|
||||
break;
|
||||
case ALUMINIUM_PLATE:
|
||||
output = new ItemStack(ModItems.plate_aluminium, 2);
|
||||
break;
|
||||
case STEEL_PLATE:
|
||||
output = new ItemStack(ModItems.plate_steel, 2);
|
||||
break;
|
||||
case LEAD_PLATE:
|
||||
output = new ItemStack(ModItems.plate_lead, 2);
|
||||
break;
|
||||
case COPPER_PLATE:
|
||||
output = new ItemStack(ModItems.plate_copper, 2);
|
||||
break;
|
||||
case ADVANCED_PLATE:
|
||||
output = new ItemStack(ModItems.plate_advanced_alloy, 2);
|
||||
break;
|
||||
case SCHRABIDIUM_PLATE:
|
||||
output = new ItemStack(ModItems.plate_schrabidium, 2);
|
||||
break;
|
||||
case CMB_PLATE:
|
||||
output = new ItemStack(ModItems.plate_combine_steel, 2);
|
||||
break;
|
||||
case ALUMINIUM_WIRE:
|
||||
output = new ItemStack(ModItems.wire_aluminium, 6);
|
||||
break;
|
||||
case COPPER_WIRE:
|
||||
output = new ItemStack(ModItems.wire_copper, 6);
|
||||
break;
|
||||
case TUNGSTEN_WIRE:
|
||||
output = new ItemStack(ModItems.wire_tungsten, 6);
|
||||
break;
|
||||
case REDCOPPER_WIRE:
|
||||
output = new ItemStack(ModItems.wire_red_copper, 6);
|
||||
break;
|
||||
case ADVANCED_WIRE:
|
||||
output = new ItemStack(ModItems.wire_advanced_alloy, 6);
|
||||
break;
|
||||
case GOLD_WIRE:
|
||||
output = new ItemStack(ModItems.wire_gold, 6);
|
||||
break;
|
||||
case SCHRABIDIUM_WIRE:
|
||||
output = new ItemStack(ModItems.wire_schrabidium, 6);
|
||||
break;
|
||||
case MAGNETIZED_WIRE:
|
||||
output = new ItemStack(ModItems.wire_magnetized_tungsten, 6);
|
||||
break;
|
||||
case CIRCUIT_1:
|
||||
output = new ItemStack(ModItems.circuit_aluminium, 1);
|
||||
break;
|
||||
case SCHRABIDIUM_HAMMER:
|
||||
output = new ItemStack(ModItems.schrabidium_hammer, 1);
|
||||
break;
|
||||
@ -3477,6 +3601,9 @@ public class MachineRecipes {
|
||||
case RTG_FURNACE:
|
||||
output = new ItemStack(ModBlocks.machine_rtg_furnace_off, 1);
|
||||
break;
|
||||
case RAD_GEN:
|
||||
output = new ItemStack(ModBlocks.machine_radgen, 1);
|
||||
break;
|
||||
case DIESEL_GENERATOR:
|
||||
output = new ItemStack(ModBlocks.machine_diesel, 1);
|
||||
break;
|
||||
|
||||
@ -32,6 +32,27 @@ public class GUIMachineCoal extends GuiInfoContainer {
|
||||
|
||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 69 - 52, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.maxPower);
|
||||
|
||||
String[] text = new String[] { "Power generation rate:",
|
||||
" 25 HE/t",
|
||||
" 500 HE/s",
|
||||
"Accepts all furnace fuels.",
|
||||
"(All fuels burn half as long in this generator",
|
||||
"as in a regular furnace)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
|
||||
String[] text1 = new String[] { "Water consumption rate:",
|
||||
" 1 mB/t",
|
||||
" 20 mB/s",
|
||||
"(Consumption rate is constant)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
|
||||
if(diFurnace.tank.getFill() <= 0) {
|
||||
|
||||
String[] text2 = new String[] { "Error: Water is required for",
|
||||
"the generator to function properly!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 32, 16, 16, guiLeft - 8, guiTop + 36 + 16 + 32, text2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +79,12 @@ public class GUIMachineCoal extends GuiInfoContainer {
|
||||
drawTexturedModalRect(guiLeft + 79, guiTop + 34, 208, 0, 18, 18);
|
||||
}
|
||||
|
||||
if(diFurnace.tank.getFill() <= 0)
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 32, 16, 16, 6);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(diFurnace.tank.getSheet());
|
||||
diFurnace.tank.renderTank(this, guiLeft + 8, guiTop + 69, diFurnace.tank.getTankType().textureX() * FluidTank.x, diFurnace.tank.getTankType().textureY() * FluidTank.y, 16, 52);
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ public class GUIMachineDiesel extends GuiInfoContainer {
|
||||
" NITAN Superfuel (5000 HE/t)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
|
||||
String[] text1 = new String[] { "Fuel consumption:",
|
||||
String[] text1 = new String[] { "Fuel consumption rate:",
|
||||
" 10 mB/t",
|
||||
" 200 mB/s",
|
||||
"(Consumption rate is constant)" };
|
||||
|
||||
@ -34,6 +34,17 @@ public class GUIMachineRadGen extends GuiInfoContainer {
|
||||
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 35, guiTop + 69 - 52, 16, 52, new String[] { "Fuel: " + radgen.getFuelScaled(100) + "%" });
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 143, guiTop + 69 - 52, 16, 52, radgen.power, radgen.maxPower);
|
||||
|
||||
String[] text = new String[] { "Accepted Fuels:",
|
||||
" About anything radioactive other than reactor fuel,",
|
||||
" even waste like dead grass!" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
|
||||
String[] text1 = new String[] { "Power generation rate:",
|
||||
" 1 kHE/t",
|
||||
" 20 kHE/s",
|
||||
"(Generation rate at maximum performance)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,5 +84,8 @@ public class GUIMachineRadGen extends GuiInfoContainer {
|
||||
sy = (l - 7) * 36;
|
||||
}
|
||||
drawTexturedModalRect(guiLeft + 70, guiTop + 25, sx, sy, 36, 36);
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public class GUIMachineSelenium extends GuiInfoContainer {
|
||||
"on piston count)" };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
|
||||
String[] text1 = new String[] { "Fuel consumption:",
|
||||
String[] text1 = new String[] { "Fuel consumption rate:",
|
||||
" 5 mB/t",
|
||||
" 100 mB/s",
|
||||
"(Consumption rate per piston)" };
|
||||
|
||||
@ -16,7 +16,25 @@ public class ItemAssemblyTemplate extends Item {
|
||||
|
||||
public enum EnumAssemblyTemplate {
|
||||
|
||||
IRON_PLATE,
|
||||
GOLD_PLATE,
|
||||
TITANIUM_PLATE,
|
||||
ALUMINIUM_PLATE,
|
||||
STEEL_PLATE,
|
||||
LEAD_PLATE,
|
||||
COPPER_PLATE,
|
||||
ADVANCED_PLATE,
|
||||
SCHRABIDIUM_PLATE,
|
||||
CMB_PLATE,
|
||||
MIXED_PLATE,
|
||||
ALUMINIUM_WIRE,
|
||||
COPPER_WIRE,
|
||||
TUNGSTEN_WIRE,
|
||||
REDCOPPER_WIRE,
|
||||
ADVANCED_WIRE,
|
||||
GOLD_WIRE,
|
||||
SCHRABIDIUM_WIRE,
|
||||
MAGNETIZED_WIRE,
|
||||
HAZMAT_CLOTH,
|
||||
ASBESTOS_CLOTH,
|
||||
COAL_FILTER,
|
||||
@ -63,6 +81,7 @@ public class ItemAssemblyTemplate extends Item {
|
||||
CHOPPER_TAIL,
|
||||
CHOPPER_WING,
|
||||
CHOPPER_BLADES,
|
||||
CIRCUIT_1,
|
||||
CIRCUIT_2,
|
||||
CIRCUIT_3,
|
||||
RTG_PELLET,
|
||||
@ -115,6 +134,7 @@ public class ItemAssemblyTemplate extends Item {
|
||||
CENTRIFUGE,
|
||||
BREEDING_REACTOR,
|
||||
RTG_FURNACE,
|
||||
RAD_GEN,
|
||||
DIESEL_GENERATOR,
|
||||
SELENIUM_GENERATOR,
|
||||
NUCLEAR_GENERATOR,
|
||||
@ -303,8 +323,44 @@ public class ItemAssemblyTemplate extends Item {
|
||||
EnumAssemblyTemplate enum1 = EnumAssemblyTemplate.getEnum(i);
|
||||
|
||||
switch (enum1) {
|
||||
case IRON_PLATE:
|
||||
return 30;
|
||||
case GOLD_PLATE:
|
||||
return 30;
|
||||
case TITANIUM_PLATE:
|
||||
return 30;
|
||||
case ALUMINIUM_PLATE:
|
||||
return 30;
|
||||
case STEEL_PLATE:
|
||||
return 30;
|
||||
case LEAD_PLATE:
|
||||
return 30;
|
||||
case COPPER_PLATE:
|
||||
return 30;
|
||||
case ADVANCED_PLATE:
|
||||
return 30;
|
||||
case SCHRABIDIUM_PLATE:
|
||||
return 30;
|
||||
case CMB_PLATE:
|
||||
return 30;
|
||||
case MIXED_PLATE:
|
||||
return 50;
|
||||
case ALUMINIUM_WIRE:
|
||||
return 20;
|
||||
case COPPER_WIRE:
|
||||
return 20;
|
||||
case TUNGSTEN_WIRE:
|
||||
return 20;
|
||||
case REDCOPPER_WIRE:
|
||||
return 20;
|
||||
case ADVANCED_WIRE:
|
||||
return 20;
|
||||
case GOLD_WIRE:
|
||||
return 20;
|
||||
case SCHRABIDIUM_WIRE:
|
||||
return 20;
|
||||
case MAGNETIZED_WIRE:
|
||||
return 20;
|
||||
case HAZMAT_CLOTH:
|
||||
return 50;
|
||||
case ASBESTOS_CLOTH:
|
||||
@ -399,6 +455,8 @@ public class ItemAssemblyTemplate extends Item {
|
||||
return 150;
|
||||
case CHOPPER_BLADES:
|
||||
return 200;
|
||||
case CIRCUIT_1:
|
||||
return 50;
|
||||
case CIRCUIT_2:
|
||||
return 100;
|
||||
case CIRCUIT_3:
|
||||
@ -503,6 +561,8 @@ public class ItemAssemblyTemplate extends Item {
|
||||
return 150;
|
||||
case RTG_FURNACE:
|
||||
return 150;
|
||||
case RAD_GEN:
|
||||
return 400;
|
||||
case DIESEL_GENERATOR:
|
||||
return 200;
|
||||
case SELENIUM_GENERATOR:
|
||||
|
||||
@ -11,6 +11,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@ -268,7 +269,7 @@ public class CraftingManager {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_neptunium, 1), new Object[] { ModItems.rod_dual_empty, ModItems.ingot_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_lead, 1), new Object[] { ModItems.rod_dual_empty, ModItems.ingot_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_schrabidium, 1), new Object[] { ModItems.rod_dual_empty, ModItems.ingot_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_solinium, 1), new Object[] { ModItems.rod_dual_empty, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_solinium, 1), new Object[] { ModItems.rod_dual_empty, ModItems.ingot_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_uranium_fuel, 1), new Object[] { ModItems.rod_dual_empty, ModItems.ingot_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_plutonium_fuel, 1), new Object[] { ModItems.rod_dual_empty, ModItems.ingot_plutonium_fuel, ModItems.nugget_plutonium_fuel, ModItems.nugget_plutonium_fuel, ModItems.nugget_plutonium_fuel });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_mox_fuel, 1), new Object[] { ModItems.rod_dual_empty, ModItems.ingot_mox_fuel, ModItems.nugget_mox_fuel, ModItems.nugget_mox_fuel, ModItems.nugget_mox_fuel });
|
||||
@ -294,7 +295,7 @@ public class CraftingManager {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_neptunium, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_neptunium, ModItems.ingot_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_lead, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_lead, ModItems.ingot_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_schrabidium, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_schrabidium, ModItems.ingot_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, ModItems.nugget_schrabidium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_solinium, 1), new Object[] { ModItems.rod_quad_empty, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_solinium, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_solinium, ModItems.ingot_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium, ModItems.nugget_solinium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_uranium_fuel, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_uranium_fuel, ModItems.ingot_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel, ModItems.nugget_uranium_fuel });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_plutonium_fuel, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_plutonium_fuel, ModItems.ingot_plutonium_fuel, ModItems.nugget_plutonium_fuel, ModItems.nugget_plutonium_fuel, ModItems.nugget_plutonium_fuel, ModItems.nugget_plutonium_fuel, ModItems.nugget_plutonium_fuel, ModItems.nugget_plutonium_fuel });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_mox_fuel, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_mox_fuel, ModItems.ingot_mox_fuel, ModItems.nugget_mox_fuel, ModItems.nugget_mox_fuel, ModItems.nugget_mox_fuel, ModItems.nugget_mox_fuel, ModItems.nugget_mox_fuel, ModItems.nugget_mox_fuel });
|
||||
@ -1147,6 +1148,9 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.catalyst_clay), new Object[] { "dustIron", Items.clay_ball }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.catalyst_clay, 4), new Object[] { "dustAluminum", "dustRedstone", Items.clay_ball }));
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.assembly_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.chemistry_template, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
|
||||
}
|
||||
|
||||
public static void AddSmeltingRec()
|
||||
|
||||
@ -448,6 +448,7 @@ public class MainRegistry
|
||||
public static int radarRange = 1000;
|
||||
public static int radarBuffer = 30;
|
||||
public static int radarAltitude = 55;
|
||||
public static int ciwsHitrate = 50;
|
||||
|
||||
public static int generalOverride = 0;
|
||||
public static int polaroidID = 1;
|
||||
@ -1395,12 +1396,15 @@ public class MainRegistry
|
||||
Property propRadarRange = config.get(Configuration.CATEGORY_GENERAL, "7.00_radarRange", 1000);
|
||||
propRadarRange.comment = "Range of the radar, 50 will result in 100x100 block area covered";
|
||||
radarRange = propRadarRange.getInt();
|
||||
Property propRadarBuffer = config.get(Configuration.CATEGORY_GENERAL, "7.00_radarBuffer", 30);
|
||||
Property propRadarBuffer = config.get(Configuration.CATEGORY_GENERAL, "7.01_radarBuffer", 30);
|
||||
propRadarBuffer.comment = "How high entities have to be above the radar to be detected";
|
||||
radarBuffer = propRadarBuffer.getInt();
|
||||
Property propRadarAltitude = config.get(Configuration.CATEGORY_GENERAL, "7.00_radarAltitude", 55);
|
||||
Property propRadarAltitude = config.get(Configuration.CATEGORY_GENERAL, "7.02_radarAltitude", 55);
|
||||
propRadarAltitude.comment = "Y height required for the radar to work";
|
||||
radarAltitude = propRadarAltitude.getInt();
|
||||
Property propCiwsHitrate = config.get(Configuration.CATEGORY_GENERAL, "7.03_ciwsAccuracy", 50);
|
||||
propCiwsHitrate.comment = "Additional modifier for CIWS accuracy";
|
||||
ciwsHitrate = propRadarAltitude.getInt();
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
@ -126,6 +126,9 @@ public class ResourceManager {
|
||||
public static final ResourceLocation ams_limiter_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_limiter.png");
|
||||
public static final ResourceLocation ams_destroyed_tex = new ResourceLocation(RefStrings.MODID, "textures/models/ams_destroyed.png");
|
||||
|
||||
//Radgen
|
||||
public static final ResourceLocation radgen_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/rad_gen_body.png");
|
||||
|
||||
//Radar
|
||||
public static final ResourceLocation radar_body_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radar_base.png");
|
||||
public static final ResourceLocation radar_head_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radar_head.png");
|
||||
|
||||
@ -37,7 +37,7 @@ public class RenderRadGen extends TileEntitySpecialRenderer {
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.universal);
|
||||
bindTexture(ResourceManager.radgen_body_tex);
|
||||
|
||||
ResourceManager.radgen_body.renderAll();
|
||||
|
||||
@ -65,9 +65,9 @@ public class RenderRadGen extends TileEntitySpecialRenderer {
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glRotatef(((TileEntityMachineRadGen)tileEntity).rotation, 1F, 0F, 0F);
|
||||
GL11.glRotatef((System.currentTimeMillis() / 10) % 360, 0F, 0F, 1F);
|
||||
|
||||
bindTexture(ResourceManager.universal);
|
||||
bindTexture(ResourceManager.turbofan_blades_tex);
|
||||
ResourceManager.radgen_rotor.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -20,6 +20,7 @@ import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
@ -118,13 +119,13 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
if(i == 0)
|
||||
if(stack.getItem() == ModItems.rod_water || stack.getItem() == ModItems.rod_dual_water || stack.getItem() == ModItems.rod_quad_water || stack.getItem() == Items.water_bucket)
|
||||
if(FluidContainerRegistry.getFluidContent(stack, FluidType.WATER) > 0)
|
||||
return true;
|
||||
if(i == 2)
|
||||
if(stack.getItem() instanceof ItemBattery)
|
||||
return true;
|
||||
if(i == 1)
|
||||
if(stack.getItem() == Items.coal || stack.getItem() == ModItems.powder_coal || stack.getItem() == Item.getItemFromBlock(Blocks.coal_block))
|
||||
if(TileEntityFurnace.getItemBurnTime(stack) > 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -257,10 +258,10 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
||||
MachineCoal.updateBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
}
|
||||
|
||||
generate();
|
||||
}
|
||||
}
|
||||
|
||||
public void generate() {
|
||||
|
||||
@ -294,15 +295,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
||||
|
||||
public boolean isItemValid() {
|
||||
|
||||
if(slots[1] != null && slots[1].getItem() == Items.coal)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(slots[1] != null && slots[1].getItem() == ModItems.powder_coal)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(slots[1] != null && slots[1].getItem() == Item.getItemFromBlock(Blocks.coal_block))
|
||||
if(slots[1] != null && TileEntityFurnace.getItemBurnTime(slots[1]) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
@ -118,8 +119,7 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
if (i == 0)
|
||||
if (stack.getItem() == ModItems.canister_fuel || stack.getItem() == ModItems.canister_petroil || stack.getItem() == ModItems.canister_NITAN
|
||||
|| stack.getItem() == Item.getItemFromBlock(ModBlocks.red_barrel))
|
||||
if (FluidContainerRegistry.getFluidContent(stack, tank.getTankType()) > 0)
|
||||
return true;
|
||||
if (i == 2)
|
||||
if (stack.getItem() instanceof ItemBattery)
|
||||
|
||||
@ -32,7 +32,7 @@ public class TileEntityMachineRefinery extends TileEntity implements ISidedInven
|
||||
|
||||
public long power = 0;
|
||||
public int sulfur = 0;
|
||||
public static final int maxSulfur = 1000;
|
||||
public static final int maxSulfur = 100;
|
||||
public static final long maxPower = 100000;
|
||||
public int age = 0;
|
||||
public FluidTank[] tanks;
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
@ -117,6 +118,13 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||
if (i == 9)
|
||||
if (FluidContainerRegistry.getFluidContent(stack, tank.getTankType()) > 0)
|
||||
return true;
|
||||
if (i == 13)
|
||||
if (stack.getItem() instanceof ItemBattery)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user