more BW textures, radioactive machine retexture, concrete, N45 GUI tex
@ -1394,7 +1394,7 @@ item.euphemium_legs.name=Euphemium Leggings
|
||||
item.euphemium_boots.name=Euphemiums Boots
|
||||
|
||||
item.schrabidium_helmet.name=Schrabidium Helmet
|
||||
item.schrabidium_plate.name=Schrabidium Chestpate
|
||||
item.schrabidium_plate.name=Schrabidium Chestplate
|
||||
item.schrabidium_legs.name=Schrabidium Leggings
|
||||
item.schrabidium_boots.name=Schrabidium Boots
|
||||
item.schrabidium_sword.name=Schrabidium Sword
|
||||
|
||||
BIN
assets/hbm/textures/blocks/barbed_wire_acid.png
Normal file
|
After Width: | Height: | Size: 223 B |
BIN
assets/hbm/textures/blocks/barbed_wire_fire.png
Normal file
|
After Width: | Height: | Size: 220 B |
BIN
assets/hbm/textures/blocks/barbed_wire_poison.png
Normal file
|
After Width: | Height: | Size: 224 B |
BIN
assets/hbm/textures/blocks/barbed_wire_ultradeath.png
Normal file
|
After Width: | Height: | Size: 215 B |
BIN
assets/hbm/textures/blocks/barbed_wire_wither.png
Normal file
|
After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 421 B |
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 537 B |
BIN
assets/hbm/textures/blocks/fusion_hatch_alt.png
Normal file
|
After Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 502 B |
BIN
assets/hbm/textures/blocks/fusion_heater_side_alt.png
Normal file
|
After Width: | Height: | Size: 514 B |
BIN
assets/hbm/textures/blocks/fusion_heater_side_alt2.png
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
assets/hbm/textures/blocks/fusion_heater_side_base.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
assets/hbm/textures/blocks/fusion_heater_top.png
Normal file
|
After Width: | Height: | Size: 288 B |
BIN
assets/hbm/textures/blocks/machine_nuke_furnace_base.png
Normal file
|
After Width: | Height: | Size: 377 B |
BIN
assets/hbm/textures/blocks/machine_nuke_furnace_base_alt.png
Normal file
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 410 B |
BIN
assets/hbm/textures/blocks/machine_nuke_furnace_front_on_alt.png
Normal file
|
After Width: | Height: | Size: 455 B |
BIN
assets/hbm/textures/blocks/machine_nuke_furnace_side_alt.png
Normal file
|
After Width: | Height: | Size: 386 B |
BIN
assets/hbm/textures/blocks/machine_panel_base.png
Normal file
|
After Width: | Height: | Size: 415 B |
BIN
assets/hbm/textures/blocks/machine_reactor_decal.png
Normal file
|
After Width: | Height: | Size: 512 B |
BIN
assets/hbm/textures/blocks/machine_reactor_front_off.png
Normal file
|
After Width: | Height: | Size: 424 B |
BIN
assets/hbm/textures/blocks/machine_reactor_front_on.png
Normal file
|
After Width: | Height: | Size: 478 B |
BIN
assets/hbm/textures/blocks/machine_reactor_top.png
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
assets/hbm/textures/blocks/machine_rtg_furnace_base.png
Normal file
|
After Width: | Height: | Size: 392 B |
BIN
assets/hbm/textures/blocks/machine_rtg_furnace_base_alt.png
Normal file
|
After Width: | Height: | Size: 459 B |
BIN
assets/hbm/textures/blocks/machine_rtg_furnace_off_alt.png
Normal file
|
After Width: | Height: | Size: 434 B |
BIN
assets/hbm/textures/blocks/machine_rtg_furnace_on_alt.png
Normal file
|
After Width: | Height: | Size: 448 B |
BIN
assets/hbm/textures/blocks/machine_rtg_furnace_side_alt.png
Normal file
|
After Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |
BIN
assets/hbm/textures/gui/gui_n45.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
@ -130,6 +130,7 @@ public class ModBlocks {
|
||||
public static Block reinforced_lamp_off;
|
||||
public static Block reinforced_lamp_on;
|
||||
|
||||
public static Block concrete;
|
||||
public static Block brick_concrete;
|
||||
public static Block brick_obsidian;
|
||||
public static Block brick_light;
|
||||
@ -263,6 +264,7 @@ public class ModBlocks {
|
||||
public static final int guiID_nuke_n2 = 61;
|
||||
|
||||
public static Block nuke_n45;
|
||||
public static final int guiID_nuke_n45 = 77;
|
||||
|
||||
public static Block bomb_multi;
|
||||
public static final int guiID_bomb_multi = 10;
|
||||
@ -289,8 +291,9 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_puf6_tank;
|
||||
public static final int guiID_puf6_tank = 8;
|
||||
|
||||
|
||||
public static Block machine_reactor;
|
||||
public static Block machine_reactor_on;
|
||||
public static final int guiID_reactor = 9;
|
||||
|
||||
public static Block machine_nuke_furnace_off;
|
||||
@ -703,6 +706,7 @@ public class ModBlocks {
|
||||
reinforced_lamp_off = new ReinforcedLamp(Material.rock, false).setBlockName("reinforced_lamp_off").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_lamp_off");
|
||||
reinforced_lamp_on = new ReinforcedLamp(Material.rock, true).setBlockName("reinforced_lamp_on").setHardness(15.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_lamp_on");
|
||||
|
||||
concrete = new BlockGeneric(Material.rock).setBlockName("concrete").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||
brick_concrete = new BlockGeneric(Material.rock).setBlockName("brick_concrete").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
|
||||
brick_obsidian = new BlockGeneric(Material.rock).setBlockName("brick_obsidian").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_obsidian");
|
||||
brick_light = new BlockGeneric(Material.rock).setBlockName("brick_light").setCreativeTab(MainRegistry.blockTab).setLightOpacity(15).setHardness(15.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_light");
|
||||
@ -799,7 +803,8 @@ public class ModBlocks {
|
||||
|
||||
machine_puf6_tank = new MachinePuF6Tank(Material.iron).setBlockName("machine_puf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
|
||||
machine_reactor = new MachineReactor(Material.iron).setBlockName("machine_reactor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_reactor = new MachineReactor(false).setBlockName("machine_reactor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_reactor_on = new MachineReactor(true).setBlockName("machine_reactor_on").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||
|
||||
machine_nuke_furnace_off = new MachineNukeFurnace(false).setBlockName("machine_nuke_furnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_nuke_furnace_on = new MachineNukeFurnace(true).setBlockName("machine_nuke_furnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
@ -1168,6 +1173,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(reinforced_lamp_on, reinforced_lamp_on.getUnlocalizedName());
|
||||
|
||||
//Bricks
|
||||
GameRegistry.registerBlock(concrete, concrete.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_concrete, brick_concrete.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_obsidian, brick_obsidian.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_light, brick_light.getUnlocalizedName());
|
||||
@ -1309,6 +1315,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_uf6_tank, machine_uf6_tank.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_puf6_tank, machine_puf6_tank.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_reactor, machine_reactor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_reactor_on, machine_reactor_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_nuke_furnace_off, machine_nuke_furnace_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_nuke_furnace_on, machine_nuke_furnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_rtg_furnace_off, machine_rtg_furnace_off.getUnlocalizedName());
|
||||
|
||||
@ -31,7 +31,6 @@ public class NukeN2 extends BlockContainer implements IBomb {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory = false;
|
||||
private Map field_77288_k = new HashMap();
|
||||
|
||||
public NukeN2(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
|
||||
@ -28,6 +28,9 @@ import net.minecraft.world.World;
|
||||
|
||||
public class NukeN45 extends BlockContainer implements IBomb {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory = false;
|
||||
|
||||
public NukeN45(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
@ -37,6 +40,76 @@ public class NukeN45 extends BlockContainer implements IBomb {
|
||||
return new TileEntityNukeN45();
|
||||
}
|
||||
|
||||
@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)
|
||||
{
|
||||
TileEntityNukeN2 tileentityfurnace = (TileEntityNukeN2)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_);
|
||||
}
|
||||
|
||||
@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())
|
||||
{
|
||||
TileEntityNukeN45 entity = (TileEntityNukeN45) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_nuke_n45, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
|
||||
@ -44,7 +44,7 @@ public class DecoBlock extends BlockContainer {
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return -1;
|
||||
return 334078;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -54,7 +54,7 @@ public class BlockReactor extends Block {
|
||||
}
|
||||
if(this == ModBlocks.fusion_heater)
|
||||
{
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":block_tungsten");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":fusion_heater_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":fusion_heater_side");
|
||||
}
|
||||
if(this == ModBlocks.factory_titanium_conductor)
|
||||
|
||||
@ -34,6 +34,7 @@ public class MachineDiFurnace extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public MachineDiFurnace(boolean blockState) {
|
||||
|
||||
@ -32,6 +32,8 @@ public class MachineNukeFurnace extends BlockContainer {
|
||||
private final boolean isActive;
|
||||
private static boolean keepInventory;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@ -44,14 +46,15 @@ public class MachineNukeFurnace extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_nuke_furnace_front_on" : ":machine_nuke_furnace_front_off"));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_steel");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_nuke_furnace_base_alt");
|
||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_nuke_furnace_front_on_alt" : ":machine_nuke_furnace_front_off_alt"));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_nuke_furnace_side_alt");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
|
||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : (side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -228,7 +231,7 @@ public class MachineNukeFurnace extends BlockContainer {
|
||||
{
|
||||
int l = p_149734_1_.getBlockMetadata(x, y, z);
|
||||
float f = x + 0.5F;
|
||||
float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
|
||||
float f1 = y + 0.25F + rand.nextFloat() * 6.0F / 16.0F;
|
||||
float f2 = z + 0.5F;
|
||||
float f3 = 0.52F;
|
||||
float f4 = rand.nextFloat() * 0.6F - 0.3F;
|
||||
|
||||
@ -28,30 +28,32 @@ import net.minecraft.world.World;
|
||||
public class MachineReactor extends BlockContainer {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private Random rand;
|
||||
private final boolean isActive;
|
||||
private static boolean keepInventory;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
//private IIcon iconFront;
|
||||
private IIcon iconTop;
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
public MachineReactor(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
|
||||
public MachineReactor(boolean blockState) {
|
||||
super(Material.iron);
|
||||
isActive = blockState;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (":reactor_top"));
|
||||
//this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (":reactor_front"));
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + (":block_lead"));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":reactor_side");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_reactor_decal");
|
||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_reactor_front_on" : ":machine_reactor_front_off"));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_reactor_top");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
|
||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : (side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -146,11 +148,32 @@ public class MachineReactor extends BlockContainer {
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityMachineReactor();
|
||||
}
|
||||
|
||||
public static void updateBlockState(boolean isProcessing, World world, int x, int y, int z) {
|
||||
int i = world.getBlockMetadata(x, y, z);
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
keepInventory = true;
|
||||
|
||||
if(isProcessing)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.machine_reactor_on);
|
||||
}else{
|
||||
world.setBlock(x, y, z, ModBlocks.machine_reactor);
|
||||
}
|
||||
|
||||
keepInventory = false;
|
||||
world.setBlockMetadataWithNotify(x, y, z, i, 2);
|
||||
|
||||
if(entity != null) {
|
||||
entity.validate();
|
||||
world.setTileEntity(x, y, z, entity);
|
||||
}
|
||||
}
|
||||
|
||||
@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 (true)
|
||||
if (!keepInventory)
|
||||
{
|
||||
TileEntityMachineReactor tileentityfurnace = (TileEntityMachineReactor)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
@ -198,4 +221,11 @@ public class MachineReactor extends BlockContainer {
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_reactor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,6 +33,8 @@ public class MachineRtgFurnace extends BlockContainer {
|
||||
private final boolean isActive;
|
||||
private static boolean keepInventory;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@ -45,14 +47,15 @@ public class MachineRtgFurnace extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_rtg_furnace_on" : ":machine_rtg_furnace_off"));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_tungsten");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_rtg_furnace_base_alt");
|
||||
this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this.isActive ? ":machine_rtg_furnace_on_alt" : ":machine_rtg_furnace_off_alt"));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_rtg_furnace_side_alt");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon);
|
||||
return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : (side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -229,7 +232,7 @@ public class MachineRtgFurnace extends BlockContainer {
|
||||
{
|
||||
int l = p_149734_1_.getBlockMetadata(x, y, z);
|
||||
float f = x + 0.5F;
|
||||
float f1 = y + 0.0F + rand.nextFloat() * 6.0F / 16.0F;
|
||||
float f1 = y + 0.25F + rand.nextFloat() * 6.0F / 16.0F;
|
||||
float f2 = z + 0.5F;
|
||||
float f3 = 0.52F;
|
||||
float f4 = rand.nextFloat() * 0.6F - 0.3F;
|
||||
|
||||
@ -83,7 +83,7 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
explosion.processTip(1024);
|
||||
} else if(fallout) {
|
||||
|
||||
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.length * 0.9) * 2 * MainRegistry.falloutDura / 100);
|
||||
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.length * 0.9) * 2 * MainRegistry.falloutDura / 10);
|
||||
fallout.posX = this.posX;
|
||||
fallout.posY = this.posY;
|
||||
fallout.posZ = this.posZ;
|
||||
|
||||
@ -73,7 +73,7 @@ public class AssemblerRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Assembler";
|
||||
return "Assembly Machine";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -40,8 +40,9 @@ public class ClientProxy extends ServerProxy
|
||||
MinecraftForge.EVENT_BUS.register(new ModEventHandlerClient());
|
||||
|
||||
AdvancedModelLoader.registerModelHandler(new HmfModelLoader());
|
||||
|
||||
|
||||
RenderingRegistry.registerBlockHandler(new RenderTaintBlock());
|
||||
RenderingRegistry.registerBlockHandler(new RenderRoofBlock());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestRender.class, new RenderTestRender());
|
||||
|
||||
|
||||
@ -544,7 +544,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_uf6_tank), 1), new Object[] { "WTW", "WTW", "SRS", 'S', "plateIron", 'W', ModItems.coil_tungsten, 'T', ModItems.tank_steel, 'W', ModItems.coil_tungsten,'R', "ingotRedstoneAlloy" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_puf6_tank), 1), new Object[] { "WTW", "WTW", "SRS", 'S', "plateSteel", 'W', ModItems.coil_tungsten, 'T', ModItems.tank_steel, 'W', ModItems.coil_tungsten,'R', "ingotRedstoneAlloy" }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_reactor), 1), new Object[] { "LSL", "SCS", "LSL", 'S', "ingotSteel", 'L', "ingotLead", 'C', ModItems.reactor_core }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 1), new Object[] { "SSS", "SFS", "CCC", 'S', "plateSteel", 'C', "plateCopper", 'F', Item.getItemFromBlock(Blocks.furnace) }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 1), new Object[] { "SSS", "LFL", "CCC", 'S', "plateSteel", 'C', ModItems.board_copper, 'L', "plateLead", 'F', Item.getItemFromBlock(Blocks.furnace) }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_rtg_furnace_off), 1), new Object[] { "NNN", "NFN", "UUU", 'N', "plateDenseLead", 'U', ModItems.rtg_unit, 'F', Item.getItemFromBlock(Blocks.furnace) }));
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 1), new Object[] { "BBB", "WFW", "RRR", 'B', ModItems.ingot_beryllium, 'R', ModItems.coil_tungsten, 'W', ModItems.board_copper, 'F', Item.getItemFromBlock(Blocks.furnace) });
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_generator), 1), new Object[] { "SLS", "LCL", "SLS", 'C', ModItems.circuit_red_copper, 'L', ModItems.rod_quad_lead, 'S', "ingotSteel" }));
|
||||
|
||||
@ -1768,10 +1768,10 @@ public class MainRegistry
|
||||
Property propBlastSpeed = config.get(Configuration.CATEGORY_GENERAL, "6.01_blastSpeed", 1024);
|
||||
propBlastSpeed.comment = "Base speed of all detonations (Blocks / tick)";
|
||||
blastSpeed = propBlastSpeed.getInt();
|
||||
Property propFalloutRange = config.get(Configuration.CATEGORY_GENERAL, "6.01_blastSpeed", 100);
|
||||
Property propFalloutRange = config.get(Configuration.CATEGORY_GENERAL, "6.02_falloutRange", 100);
|
||||
propFalloutRange.comment = "Radius of fallout area (base radius * value in percent)";
|
||||
falloutRange = propFalloutRange.getInt();
|
||||
Property propFalloutDura = config.get(Configuration.CATEGORY_GENERAL, "6.01_blastSpeed", 100);
|
||||
Property propFalloutDura = config.get(Configuration.CATEGORY_GENERAL, "6.03_falloutDuration", 100);
|
||||
propFalloutDura.comment = "Duration of fallout (base duration * value in percent)";
|
||||
falloutDura = propFalloutDura.getInt();
|
||||
|
||||
|
||||
@ -148,7 +148,6 @@ public class ModEventHandler
|
||||
RadEntitySavedData eData = RadEntitySavedData.getData(event.world);
|
||||
|
||||
if(eData.worldObj == null) {
|
||||
System.out.println("shit");
|
||||
eData.worldObj = event.world;
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.packet;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.ISource;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
||||
import com.hbm.tileentity.bomb.TileEntityTurretCIWS;
|
||||
import com.hbm.tileentity.bomb.TileEntityTurretCheapo;
|
||||
import com.hbm.tileentity.deco.TileEntityBomber;
|
||||
@ -203,6 +204,11 @@ public class AuxGaugePacket implements IMessage {
|
||||
|
||||
nuke.falls = m.value == 1;
|
||||
}
|
||||
if (te instanceof TileEntityNukeN45) {
|
||||
TileEntityNukeN45 nuke = (TileEntityNukeN45)te;
|
||||
|
||||
nuke.primed = m.value == 1;
|
||||
}
|
||||
|
||||
} catch (Exception x) {}
|
||||
return null;
|
||||
|
||||
52
com/hbm/render/block/RenderRoofBlock.java
Normal file
@ -0,0 +1,52 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelSteelRoof;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class RenderRoofBlock implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { }
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
|
||||
/*Tessellator.instance.draw();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef(x, y, z);
|
||||
|
||||
ModelSteelRoof model = new ModelSteelRoof();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID + ":" + "textures/models/SteelRoof.png"));
|
||||
model.renderModel(0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
Tessellator.instance.startDrawing(0);*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return 334078;
|
||||
}
|
||||
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -28,7 +29,10 @@ public class RenderNukeN45 extends TileEntitySpecialRenderer {
|
||||
ResourceManager.n45_stand.renderAll();
|
||||
}
|
||||
|
||||
double d = /*0;*/ Math.sin((System.currentTimeMillis() % (1000* Math.PI)) / 500D) * 0.175 + 0.175;
|
||||
double d = 0.25;
|
||||
|
||||
if(((TileEntityNukeN45)tileEntity).primed)
|
||||
d /= 4D;
|
||||
|
||||
GL11.glTranslated(0, standing ? 1D : 0.5D, 0);
|
||||
|
||||
|
||||
13
com/hbm/render/util/ProntingUtility.java
Normal file
@ -0,0 +1,13 @@
|
||||
package com.hbm.render.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
public class ProntingUtility {
|
||||
|
||||
public static void convertModelRenderersToTessellatorStatements(List<ModelRenderer> models) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,11 +1,267 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
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;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityNukeN45 extends TileEntity {
|
||||
public class TileEntityNukeN45 extends TileEntity implements ISidedInventory {
|
||||
|
||||
public ItemStack slots[];
|
||||
private String customName;
|
||||
|
||||
public boolean primed = false;
|
||||
|
||||
public TileEntityNukeN45() {
|
||||
slots = new ItemStack[2];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return slots[i];
|
||||
}
|
||||
|
||||
@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 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.nukeN45";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
primed = nbt.getBoolean("primed");
|
||||
|
||||
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);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
nbt.setBoolean("primed", primed);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
primed = true;
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, primed ? 1 : 0, 0));
|
||||
|
||||
if(primed) {
|
||||
|
||||
if(getType() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
int rad = 0;
|
||||
|
||||
if(slots[1] != null) {
|
||||
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_1)
|
||||
rad = 5;
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_2)
|
||||
rad = 10;
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_3)
|
||||
rad = 15;
|
||||
}
|
||||
|
||||
List<Object> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(xCoord + 0.5 - rad, yCoord + 0.5 - rad, zCoord + 0.5 - rad, xCoord + 0.5 + rad, yCoord + 0.5 + rad, zCoord + 0.5 + rad));
|
||||
|
||||
for(Object o : list) {
|
||||
|
||||
Entity e = (Entity)o;
|
||||
|
||||
if(e.width * e.width * e.height >= 1.5) {
|
||||
explode(worldObj, xCoord, yCoord, zCoord, getType());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void explode(World world, int x, int y, int z, int type) {
|
||||
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
|
||||
if(slots[0] != null) {
|
||||
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(ModBlocks.det_cord))
|
||||
return 1;
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(Blocks.tnt))
|
||||
return 2;
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(ModBlocks.det_charge))
|
||||
return 3;
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(ModBlocks.det_nuke))
|
||||
return 4;
|
||||
}
|
||||
|
||||
if(!primed && slots[1] != null) {
|
||||
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_1 ||
|
||||
slots[1].getItem() == ModItems.upgrade_effect_2 ||
|
||||
slots[1].getItem() == ModItems.upgrade_effect_3)
|
||||
return 100;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void clearSlots() {
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.machine.MachineDiFurnace;
|
||||
import com.hbm.blocks.machine.MachineReactor;
|
||||
import com.hbm.inventory.MachineRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
@ -365,6 +367,7 @@ public class TileEntityMachineReactor extends TileEntity implements ISidedInvent
|
||||
if(trigger)
|
||||
{
|
||||
flag1 = true;
|
||||
MachineReactor.updateBlockState(this.dualCookTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -508,12 +508,12 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
||||
|
||||
} else if(te instanceof TileEntityMachineReactor) {
|
||||
TileEntityMachineReactor reactor = (TileEntityMachineReactor)te;
|
||||
if(reactor.dualPower < 1)
|
||||
if(reactor.dualPower < 1 && this.coreHeat > 0)
|
||||
reactor.dualPower = 1;
|
||||
|
||||
} else if(te instanceof TileEntityNukeFurnace) {
|
||||
TileEntityNukeFurnace reactor = (TileEntityNukeFurnace)te;
|
||||
if(reactor.dualPower < 1)
|
||||
if(reactor.dualPower < 1 && this.coreHeat > 0)
|
||||
reactor.dualPower = 1;
|
||||
|
||||
} else if(b == ModBlocks.block_uranium) {
|
||||
|
||||