RBMK recycling pellets, colored concrete, more fireext mechanics

This commit is contained in:
Bob 2021-05-21 01:01:50 +02:00
parent b7c5f89ba5
commit e0db26ef44
47 changed files with 372 additions and 16 deletions

View File

@ -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());

View File

@ -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_);
}
}

View File

@ -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();
}
}

View File

@ -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" }));

View File

@ -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);

View File

@ -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());

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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"

View File

@ -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"

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B