diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 00186ea93..b58595a29 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -236,6 +236,7 @@ public class ModBlocks { public static Block reinforced_stone; public static Block concrete_smooth; + public static Block concrete_colored; public static Block concrete; public static Block concrete_asbestos; public static Block concrete_pillar; @@ -1191,7 +1192,7 @@ public class ModBlocks { block_white_phosphorus = new BlockHazard(Material.rock).addFire(15).toBlock().setBlockName("block_white_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_white_phosphorus"); block_red_phosphorus = new BlockHazardFalling().addFire(15).toBlock().setStepSound(Block.soundTypeSand).setBlockName("block_red_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_red_phosphorus"); block_fallout = new BlockHazardFalling().addRadiation(ItemHazard.fo * ItemHazard.block).toBlock().setStepSound(Block.soundTypeGravel).setBlockName("block_fallout").setCreativeTab(MainRegistry.blockTab).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":ash"); - block_foam = new BlockGeneric(Material.snow).setBlockName("block_foam").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeSnow).setHardness(0.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":foam"); + block_foam = new BlockGeneric(Material.craftedSnow).setBlockName("block_foam").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeSnow).setHardness(0.5F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":foam"); block_graphite = new BlockFlammable(Material.iron, 30, 5).setBlockName("block_graphite").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_graphite"); block_boron = new BlockGeneric(Material.iron).setBlockName("block_boron").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_boron"); block_lanthanium = new BlockGeneric(Material.iron).setBlockName("block_lanthanium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lanthanium"); @@ -1244,6 +1245,7 @@ public class ModBlocks { reinforced_stone = new BlockGeneric(Material.rock).setBlockName("reinforced_stone").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(3000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_stone"); concrete_smooth = new BlockGeneric(Material.rock).setBlockName("concrete_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete"); + concrete_colored = new BlockConcreteColored(Material.rock).setBlockName("concrete_colored").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete"); concrete = new BlockGeneric(Material.rock).setBlockName("concrete").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_tile"); concrete_asbestos = new BlockGeneric(Material.rock).setBlockName("concrete_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_asbestos"); concrete_pillar = new BlockRotatablePillar(Material.rock, RefStrings.MODID + ":concrete_pillar_top").setBlockName("concrete_pillar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_pillar_side"); @@ -1356,8 +1358,8 @@ public class ModBlocks { frozen_log = new WasteLog(Material.wood).setBlockName("frozen_log").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F); frozen_planks = new BlockOre(Material.wood).setBlockName("frozen_planks").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":frozen_planks"); fallout = new BlockFallout(Material.snow).addRadiation(ItemHazard.fo * ItemHazard.powder * 2).toBlock().setBlockName("fallout").setStepSound(Block.soundTypeGravel).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":ash"); - foam_layer = new BlockFallout(Material.snow).setBlockName("foam_layer").setStepSound(Block.soundTypeSnow).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":foam"); - sand_boron_layer = new BlockFallout(Material.sand).setBlockName("sand_boron_layer").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":sand_boron"); + foam_layer = new BlockLayering(Material.snow).setBlockName("foam_layer").setStepSound(Block.soundTypeSnow).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":foam"); + sand_boron_layer = new BlockLayering(Material.sand).setBlockName("sand_boron_layer").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":sand_boron"); sellafield_slaked = new BlockGeneric(Material.rock).setBlockName("sellafield_slaked").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_slaked"); sellafield_0 = new BlockOre(Material.rock, 0.5F, 10F).setBlockName("sellafield_0").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0"); @@ -2092,6 +2094,7 @@ public class ModBlocks { //Bricks GameRegistry.registerBlock(reinforced_stone, reinforced_stone.getUnlocalizedName()); GameRegistry.registerBlock(concrete_smooth, concrete_smooth.getUnlocalizedName()); + GameRegistry.registerBlock(concrete_colored, ItemBlockColored.class, concrete_colored.getUnlocalizedName()); GameRegistry.registerBlock(concrete, concrete.getUnlocalizedName()); GameRegistry.registerBlock(concrete_asbestos, concrete_asbestos.getUnlocalizedName()); GameRegistry.registerBlock(concrete_pillar, concrete_pillar.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/generic/BlockConcreteColored.java b/src/main/java/com/hbm/blocks/generic/BlockConcreteColored.java new file mode 100644 index 000000000..d767a9f5e --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockConcreteColored.java @@ -0,0 +1,63 @@ +package com.hbm.blocks.generic; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemDye; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class BlockConcreteColored extends Block { + + @SideOnly(Side.CLIENT) + private IIcon[] icons; + + public BlockConcreteColored(Material p_i45398_1_) { + super(p_i45398_1_); + this.setCreativeTab(CreativeTabs.tabBlock); + } + + @SideOnly(Side.CLIENT) + public IIcon getIcon(int p_149691_1_, int p_149691_2_) { + return this.icons[p_149691_2_ % this.icons.length]; + } + + public int damageDropped(int p_149692_1_) { + return p_149692_1_; + } + + public static int func_150032_b(int p_150032_0_) { + return func_150031_c(p_150032_0_); + } + + public static int func_150031_c(int p_150031_0_) { + return ~p_150031_0_ & 15; + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) { + for(int i = 0; i < 16; ++i) { + p_149666_3_.add(new ItemStack(p_149666_1_, 1, i)); + } + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister p_149651_1_) { + this.icons = new IIcon[16]; + + for(int i = 0; i < this.icons.length; ++i) { + this.icons[i] = p_149651_1_.registerIcon(this.getTextureName() + "_" + ItemDye.field_150921_b[func_150031_c(i)]); + } + } + + public MapColor getMapColor(int p_149728_1_) { + return MapColor.getMapColorForBlockColored(p_149728_1_); + } +} diff --git a/src/main/java/com/hbm/blocks/generic/BlockLayering.java b/src/main/java/com/hbm/blocks/generic/BlockLayering.java new file mode 100644 index 000000000..fa039eff3 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockLayering.java @@ -0,0 +1,105 @@ +package com.hbm.blocks.generic; + +import java.util.Random; + +import com.hbm.blocks.machine.rbmk.RBMKDebris; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.EnumSkyBlock; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockLayering extends Block { + + public BlockLayering(Material mat) { + super(mat); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F); + this.func_150154_b(0); + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { + int l = p_149668_1_.getBlockMetadata(p_149668_2_, p_149668_3_, p_149668_4_) & 7; + float f = 0.125F; + return AxisAlignedBB.getBoundingBox((double) p_149668_2_ + this.minX, (double) p_149668_3_ + this.minY, (double) p_149668_4_ + this.minZ, (double) p_149668_2_ + this.maxX, (double) ((float) p_149668_3_ + (float) l * f), (double) p_149668_4_ + this.maxZ); + } + + public boolean isOpaqueCube() { + return false; + } + + public boolean renderAsNormalBlock() { + return false; + } + + public void setBlockBoundsForItemRender() { + this.func_150154_b(0); + } + + public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { + this.func_150154_b(p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_)); + } + + protected void func_150154_b(int p_150154_1_) { + int j = p_150154_1_ & 7; + float f = (float) (2 * (1 + j)) / 16.0F; + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F); + } + + public boolean canPlaceBlockAt(World world, int x, int y, int z) { + Block block = world.getBlock(x, y - 1, z); + + if(block instanceof RBMKDebris) + return true; + + return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(world, x, y - 1, z) ? true : (block == this && (world.getBlockMetadata(x, y - 1, z) & 7) == 7 ? true : block.isOpaqueCube() && block.getMaterial().blocksMovement())) : false; + } + + public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) { + this.func_150155_m(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_); + } + + private boolean func_150155_m(World p_150155_1_, int p_150155_2_, int p_150155_3_, int p_150155_4_) { + if(!this.canPlaceBlockAt(p_150155_1_, p_150155_2_, p_150155_3_, p_150155_4_)) { + p_150155_1_.setBlockToAir(p_150155_2_, p_150155_3_, p_150155_4_); + return false; + } else { + return true; + } + } + + public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_) { + super.harvestBlock(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_); + p_149636_1_.setBlockToAir(p_149636_3_, p_149636_4_, p_149636_5_); + } + + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { + return null; + } + + public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) { + if(p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11) { + p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); + } + } + + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) { + return p_149646_5_ == 1 ? true : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_); + } + + public int quantityDropped(int meta, int fortune, Random random) { + return (meta & 7) + 1; + } + + public boolean isReplaceable(IBlockAccess world, int x, int y, int z) { + int meta = world.getBlockMetadata(x, y, z); + return meta >= 7 ? false : blockMaterial.isReplaceable(); + } +} diff --git a/src/main/java/com/hbm/crafting/MineralRecipes.java b/src/main/java/com/hbm/crafting/MineralRecipes.java index ee9bbdeda..85d94992c 100644 --- a/src/main/java/com/hbm/crafting/MineralRecipes.java +++ b/src/main/java/com/hbm/crafting/MineralRecipes.java @@ -124,11 +124,15 @@ public class MineralRecipes { GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_pu239, 2), new Object[] { ModItems.billet_pu239, ModItems.billet_pu239, ModItems.billet_pu239 }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_pu240, 2), new Object[] { ModItems.billet_pu240, ModItems.billet_pu240, ModItems.billet_pu240 }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_pu_mix, 2), new Object[] { ModItems.billet_pu_mix, ModItems.billet_pu_mix, ModItems.billet_pu_mix }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 2), new Object[] { ModItems.billet_uranium_fuel, ModItems.billet_uranium_fuel, ModItems.billet_uranium_fuel }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_plutonium_fuel, 2), new Object[] { ModItems.billet_plutonium_fuel, ModItems.billet_plutonium_fuel, ModItems.billet_plutonium_fuel }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_mox_fuel, 2), new Object[] { ModItems.billet_mox_fuel, ModItems.billet_mox_fuel, ModItems.billet_mox_fuel }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_neptunium, 2), new Object[] { ModItems.billet_neptunium, ModItems.billet_neptunium, ModItems.billet_neptunium }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_neptunium_fuel, 2), new Object[] { ModItems.billet_neptunium_fuel, ModItems.billet_neptunium_fuel, ModItems.billet_neptunium_fuel }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_polonium, 2), new Object[] { ModItems.billet_polonium, ModItems.billet_polonium, ModItems.billet_polonium }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_schrabidium, 2), new Object[] { ModItems.billet_schrabidium, ModItems.billet_schrabidium, ModItems.billet_schrabidium }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_solinium, 2), new Object[] { ModItems.billet_solinium, ModItems.billet_solinium, ModItems.billet_solinium }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_schrabidium_fuel, 2), new Object[] { ModItems.billet_schrabidium_fuel, ModItems.billet_schrabidium_fuel, ModItems.billet_schrabidium_fuel }); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg), new Object[] { ModItems.billet_pu238, ModItems.billet_pu238, ModItems.billet_pu238, "plateIron" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_rtg_weak), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_pu238, "plateIron" })); diff --git a/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java b/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java index e77b2518e..7b153f1f0 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java @@ -421,8 +421,18 @@ public class GunEnergyFactory { Block b = bullet.worldObj.getBlock(ix, iy, iz); - if(b != ModBlocks.foam_layer && b.isReplaceable(bullet.worldObj, ix, iy, iz) && ModBlocks.foam_layer.canPlaceBlockAt(bullet.worldObj, ix, iy, iz)) { - bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.foam_layer); + if(b.isReplaceable(bullet.worldObj, ix, iy, iz) && ModBlocks.foam_layer.canPlaceBlockAt(bullet.worldObj, ix, iy, iz)) { + + if(b != ModBlocks.foam_layer) { + bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.foam_layer); + } else { + int meta = bullet.worldObj.getBlockMetadata(ix, iy, iz); + + if(meta < 6) + bullet.worldObj.setBlockMetadataWithNotify(ix, iy, iz, meta + 1, 3); + else + bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.block_foam); + } } if(fizz) @@ -476,8 +486,18 @@ public class GunEnergyFactory { Block b = bullet.worldObj.getBlock(ix, iy, iz); - if(b != ModBlocks.sand_boron_layer && b.isReplaceable(bullet.worldObj, ix, iy, iz) && ModBlocks.sand_boron_layer.canPlaceBlockAt(bullet.worldObj, ix, iy, iz)) { - bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.sand_boron_layer); + if((b.isReplaceable(bullet.worldObj, ix, iy, iz) || b == ModBlocks.sand_boron_layer) && ModBlocks.sand_boron_layer.canPlaceBlockAt(bullet.worldObj, ix, iy, iz)) { + + if(b != ModBlocks.sand_boron_layer) { + bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.sand_boron_layer); + } else { + int meta = bullet.worldObj.getBlockMetadata(ix, iy, iz); + + if(meta < 6) + bullet.worldObj.setBlockMetadataWithNotify(ix, iy, iz, meta + 1, 3); + else + bullet.worldObj.setBlock(ix, iy, iz, ModBlocks.sand_boron); + } if(b.getMaterial() == Material.fire) bullet.worldObj.playSoundEffect(bullet.posX, bullet.posY, bullet.posZ, "random.fizz", 1.0F, 1.5F + bullet.worldObj.rand.nextFloat() * 0.5F); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 9687ad02e..e6f09c840 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -925,6 +925,19 @@ public class ModItems { public static Item rbmk_fuel_pu238be; public static Item rbmk_fuel_balefire; public static Item rbmk_fuel_drx; + public static Item rbmk_pellet_meu; + public static Item rbmk_pellet_thmeu; + public static Item rbmk_pellet_lep; + public static Item rbmk_pellet_mep; + public static Item rbmk_pellet_men; + public static Item rbmk_pellet_mox; + public static Item rbmk_pellet_les; + public static Item rbmk_pellet_mes; + public static Item rbmk_pellet_hes; + public static Item rbmk_pellet_leaus; + public static Item rbmk_pellet_heaus; + public static Item rbmk_pellet_balefire; + public static Item rbmk_pellet_drx; public static Item scrap; public static Item trinitite; @@ -3253,6 +3266,20 @@ public class ModItems { .setMeltingPoint(100000) .addDigamma(0.1F).toItem().setUnlocalizedName("rbmk_fuel_drx").setTextureName(RefStrings.MODID + ":rbmk_fuel_drx"); + rbmk_pellet_meu = new ItemRBMKPellet("Medium Enriched Uranium-235").setUnlocalizedName("rbmk_pellet_meu").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_meu"); + rbmk_pellet_thmeu = new ItemRBMKPellet("Thorium with MEU Driver Fuel").setUnlocalizedName("rbmk_pellet_thmeu").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_thmeu"); + rbmk_pellet_lep = new ItemRBMKPellet("Low Enriched Plutonium-239").setUnlocalizedName("rbmk_pellet_lep").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_lep"); + rbmk_pellet_mep = new ItemRBMKPellet("Medium Enriched Plutonium-239").setUnlocalizedName("rbmk_pellet_mep").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_mep"); + rbmk_pellet_men = new ItemRBMKPellet("Medium Enriched Neptunium-237").setUnlocalizedName("rbmk_pellet_men").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_men"); + rbmk_pellet_mox = new ItemRBMKPellet("Mixed LEU & LEP Oxide").setUnlocalizedName("rbmk_pellet_mox").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_mox"); + rbmk_pellet_les = new ItemRBMKPellet("Low Enriched Schrabidium-326").setUnlocalizedName("rbmk_pellet_les").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_les"); + rbmk_pellet_mes = new ItemRBMKPellet("Medium Enriched Schrabidium-326").setUnlocalizedName("rbmk_pellet_mes").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_mes"); + rbmk_pellet_hes = new ItemRBMKPellet("Highly Enriched Schrabidium-326").setUnlocalizedName("rbmk_pellet_hes").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_hes"); + rbmk_pellet_leaus = new ItemRBMKPellet("Low Enriched Australium (Tasmanite)").setUnlocalizedName("rbmk_pellet_leaus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_leaus"); + rbmk_pellet_heaus = new ItemRBMKPellet("Highly Enriched Australium (Ayerite)").setUnlocalizedName("rbmk_pellet_heaus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_heaus"); + rbmk_pellet_balefire = new ItemRBMKPellet("Draconic Flames").setUnlocalizedName("rbmk_pellet_balefire").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_balefire"); + rbmk_pellet_drx = new ItemRBMKPellet(EnumChatFormatting.OBFUSCATED + "can't you hear, can't you hear the thunder?").setUnlocalizedName("rbmk_pellet_drx").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rbmk_pellet_drx"); + trinitite = new ItemHazard().addRadiation(ItemHazard.trn * ItemHazard.ingot).toItem().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite_new"); nuclear_waste_long = new ItemHazard(5F).setUnlocalizedName("nuclear_waste_long").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long"); nuclear_waste_long_tiny = new ItemHazard(0.5F).setUnlocalizedName("nuclear_waste_long_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long_tiny"); @@ -5924,6 +5951,22 @@ public class ModItems { GameRegistry.registerItem(rbmk_fuel_pu238be, rbmk_fuel_pu238be.getUnlocalizedName()); GameRegistry.registerItem(rbmk_fuel_balefire, rbmk_fuel_balefire.getUnlocalizedName()); GameRegistry.registerItem(rbmk_fuel_drx, rbmk_fuel_drx.getUnlocalizedName()); + + GameRegistry.registerItem(rbmk_pellet_meu, rbmk_pellet_meu.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_thmeu, rbmk_pellet_thmeu.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_lep, rbmk_pellet_lep.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_mep, rbmk_pellet_mep.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_men, rbmk_pellet_men.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_mox, rbmk_pellet_mox.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_les, rbmk_pellet_les.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_mes, rbmk_pellet_mes.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_mes, rbmk_pellet_mes.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_mes, rbmk_pellet_mes.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_hes, rbmk_pellet_hes.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_leaus, rbmk_pellet_leaus.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_heaus, rbmk_pellet_heaus.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_balefire, rbmk_pellet_balefire.getUnlocalizedName()); + GameRegistry.registerItem(rbmk_pellet_drx, rbmk_pellet_drx.getUnlocalizedName()); GameRegistry.registerItem(debris_graphite, debris_graphite.getUnlocalizedName()); GameRegistry.registerItem(debris_metal, debris_metal.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/block/ItemBlockColored.java b/src/main/java/com/hbm/items/block/ItemBlockColored.java new file mode 100644 index 000000000..a1c85e4a9 --- /dev/null +++ b/src/main/java/com/hbm/items/block/ItemBlockColored.java @@ -0,0 +1,17 @@ +package com.hbm.items.block; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; + +public class ItemBlockColored extends ItemBlock { + + public ItemBlockColored(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + } + + public int getMetadata(int meta) { + return meta; + } +} diff --git a/src/main/java/com/hbm/items/block/ItemTrapBlock.java b/src/main/java/com/hbm/items/block/ItemTrapBlock.java index 284bd9699..05f9d52a4 100644 --- a/src/main/java/com/hbm/items/block/ItemTrapBlock.java +++ b/src/main/java/com/hbm/items/block/ItemTrapBlock.java @@ -13,18 +13,17 @@ public class ItemTrapBlock extends ItemBlock { public ItemTrapBlock(Block block) { super(block); - this.setMaxDamage(0); - this.setHasSubtypes(true); + this.setMaxDamage(0); + this.setHasSubtypes(true); } - + @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - + list.add(Trap.get(itemstack.getItemDamage()).toString()); } - - public int getMetadata(int meta) - { - return meta; - } + + public int getMetadata(int meta) { + return meta; + } } diff --git a/src/main/java/com/hbm/items/machine/ItemRBMKPellet.java b/src/main/java/com/hbm/items/machine/ItemRBMKPellet.java new file mode 100644 index 000000000..3f728273f --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemRBMKPellet.java @@ -0,0 +1,100 @@ +package com.hbm.items.machine; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +public class ItemRBMKPellet extends Item { + + public String fullName = ""; + + public ItemRBMKPellet(String fullName) { + this.fullName = fullName; + this.setHasSubtypes(true); + this.setMaxDamage(0); + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tabs, List list) { + for(int i = 0; i < 10; ++i) { + list.add(new ItemStack(item, 1, i)); + } + } + + @SideOnly(Side.CLIENT) + private IIcon[] enrichmentOverlays = new IIcon[5]; + private IIcon xenonOverlay; + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister p_94581_1_) { + super.registerIcons(p_94581_1_); + + for(int i = 0; i < enrichmentOverlays.length; i++) { + enrichmentOverlays[i] = p_94581_1_.registerIcon("hbm:rbmk_pellet_overlay_e" + i); + } + + xenonOverlay = p_94581_1_.registerIcon("hbm:rbmk_pellet_overlay_xenon"); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public int getRenderPasses(int meta) { + return hasXenon(meta) ? 3 : 2; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + super.addInformation(stack, player, list, bool); + + list.add(EnumChatFormatting.ITALIC + this.fullName); + + int meta = rectify(stack.getItemDamage()); + + switch(meta % 5) { + case 0: list.add(EnumChatFormatting.GOLD + "Brand New"); break; + case 1: list.add(EnumChatFormatting.YELLOW + "Barely Depleted"); break; + case 2: list.add(EnumChatFormatting.GREEN + "Moderately Depleted"); break; + case 3: list.add(EnumChatFormatting.DARK_GREEN + "Highly Depleted"); break; + case 4: list.add(EnumChatFormatting.DARK_GRAY + "Fully Depleted"); break; + } + + if(hasXenon(meta)) + list.add(EnumChatFormatting.DARK_PURPLE + "High Xenon Poison"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamageForRenderPass(int meta, int pass) { + + if(pass == 0) + return this.itemIcon; + + if(pass == 2) + return this.xenonOverlay; + + return this.enrichmentOverlays[rectify(meta) % 5]; + } + + private boolean hasXenon(int meta) { + return rectify(meta) >= 5; + } + + private int rectify(int meta) { + return Math.abs(meta) % 10; + } +} diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 54204be91..f2dce15bb 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -1214,6 +1214,7 @@ item.gun_euthanasia.name=Euthanasia item.gun_euthanasia_ammo.name=Spritze item.gun_fatman.name=M42 Nukleares Katapult "Fat Man" item.gun_fatman_ammo.name=Miniatombombe (LEGACY) +item.gun_fireext.name=Feuerlöscher item.gun_flamer.name=Herr Topaz item.gun_flechette.name=Flechet-Gewehr item.gun_folly.name=Prototyp Digamma "Irrsinn" diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 5a16da838..b5a104b96 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -1282,6 +1282,7 @@ item.gun_euthanasia.name=Euthanasia item.gun_euthanasia_ammo.name=Syringe item.gun_fatman.name=M42 Nuclear Catapult "Fat Man" item.gun_fatman_ammo.name=Mini Nuke (LEGACY) +item.gun_fireext.name=Fire Extinguisher item.gun_flamer.name=Mister Topaz item.gun_flechette.name=Flechette Rifle item.gun_folly.name=Prototype Digamma "Folly" diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_black.png b/src/main/resources/assets/hbm/textures/blocks/concrete_black.png new file mode 100644 index 000000000..5f4a8ee4b Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_black.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_blue.png b/src/main/resources/assets/hbm/textures/blocks/concrete_blue.png new file mode 100644 index 000000000..68c66d7a6 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_blue.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_brown.png b/src/main/resources/assets/hbm/textures/blocks/concrete_brown.png new file mode 100644 index 000000000..38eca38fd Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_brown.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_cyan.png b/src/main/resources/assets/hbm/textures/blocks/concrete_cyan.png new file mode 100644 index 000000000..f78bb3244 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_cyan.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_gray.png b/src/main/resources/assets/hbm/textures/blocks/concrete_gray.png new file mode 100644 index 000000000..a6445a176 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_gray.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_green.png b/src/main/resources/assets/hbm/textures/blocks/concrete_green.png new file mode 100644 index 000000000..76b0b1f26 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_green.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_light_blue.png b/src/main/resources/assets/hbm/textures/blocks/concrete_light_blue.png new file mode 100644 index 000000000..0ead483e3 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_light_blue.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_lime.png b/src/main/resources/assets/hbm/textures/blocks/concrete_lime.png new file mode 100644 index 000000000..3a07f8c47 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_lime.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_magenta.png b/src/main/resources/assets/hbm/textures/blocks/concrete_magenta.png new file mode 100644 index 000000000..7b0574873 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_magenta.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_orange.png b/src/main/resources/assets/hbm/textures/blocks/concrete_orange.png new file mode 100644 index 000000000..52f97a3bf Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_orange.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_pink.png b/src/main/resources/assets/hbm/textures/blocks/concrete_pink.png new file mode 100644 index 000000000..20b485813 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_pink.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_purple.png b/src/main/resources/assets/hbm/textures/blocks/concrete_purple.png new file mode 100644 index 000000000..677204029 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_purple.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_red.png b/src/main/resources/assets/hbm/textures/blocks/concrete_red.png new file mode 100644 index 000000000..c1f489e78 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_red.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_silver.png b/src/main/resources/assets/hbm/textures/blocks/concrete_silver.png new file mode 100644 index 000000000..9aa518398 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_silver.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_white.png b/src/main/resources/assets/hbm/textures/blocks/concrete_white.png new file mode 100644 index 000000000..a6a2a66e6 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_white.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_yellow.png b/src/main/resources/assets/hbm/textures/blocks/concrete_yellow.png new file mode 100644 index 000000000..c187bd205 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/concrete_yellow.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_balefire.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_balefire.png new file mode 100644 index 000000000..54bca2361 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_balefire.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_drx.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_drx.png new file mode 100644 index 000000000..e92c6b6e8 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_drx.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_grayscale.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_grayscale.png new file mode 100644 index 000000000..650673c45 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_grayscale.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_heaus.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_heaus.png new file mode 100644 index 000000000..c66b6fbb3 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_heaus.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_hes.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_hes.png new file mode 100644 index 000000000..8e50da2f3 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_hes.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_leaus.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_leaus.png new file mode 100644 index 000000000..a360fbac4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_leaus.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_lep.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_lep.png new file mode 100644 index 000000000..8137b9001 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_lep.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_les.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_les.png new file mode 100644 index 000000000..b569051c8 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_les.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_men.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_men.png new file mode 100644 index 000000000..f3e89c335 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_men.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mep.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mep.png new file mode 100644 index 000000000..0ff6e61eb Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mep.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mes.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mes.png new file mode 100644 index 000000000..44d48bb44 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mes.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_meu.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_meu.png new file mode 100644 index 000000000..98810cd2e Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_meu.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mox.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mox.png new file mode 100644 index 000000000..691d7ba6b Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_mox.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e0.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e0.png new file mode 100644 index 000000000..d9915fd6a Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e0.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e1.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e1.png new file mode 100644 index 000000000..ae173ebb9 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e1.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e2.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e2.png new file mode 100644 index 000000000..6c68ad814 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e2.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e3.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e3.png new file mode 100644 index 000000000..c196ebc70 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e3.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e4.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e4.png new file mode 100644 index 000000000..e9c763cd9 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_e4.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_xenon.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_xenon.png new file mode 100644 index 000000000..59e79e2b2 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_overlay_xenon.png differ diff --git a/src/main/resources/assets/hbm/textures/items/rbmk_pellet_thmeu.png b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_thmeu.png new file mode 100644 index 000000000..522fae02c Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/rbmk_pellet_thmeu.png differ