WIP RTG shit

This commit is contained in:
Vaern 2022-01-13 20:30:29 -08:00
parent 1d2a076543
commit 78d97fa2b9
17 changed files with 239 additions and 134 deletions

View File

@ -1230,8 +1230,8 @@ public class ModBlocks {
test_ct = new TestCT(Material.iron).setBlockName("test_ct").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_ct");
test_rail = new TestRail(Material.iron).setBlockName("test_rail").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_rail");
ore_uranium = new BlockOutgas(Material.rock, true, 5, false).setBlockName("ore_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium");
ore_uranium_scorched = new BlockOutgas(Material.rock, true, 5, false).setBlockName("ore_uranium_scorched").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium_scorched");
ore_uranium = new BlockOutgas(Material.rock, gas_radon, true, 5, true).setBlockName("ore_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium");
ore_uranium_scorched = new BlockOutgas(Material.rock, gas_radon, true, 5, true).setBlockName("ore_uranium_scorched").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium_scorched");
ore_titanium = new BlockGeneric(Material.rock).setBlockName("ore_titanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_titanium");
ore_sulfur = new BlockOre(Material.rock).setBlockName("ore_sulfur").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_sulfur");
ore_thorium = new BlockGeneric(Material.rock).setBlockName("ore_thorium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_thorium");
@ -1245,7 +1245,7 @@ public class ModBlocks {
ore_schrabidium = new BlockOre(Material.rock, 0.1F, 0.5F).setBlockName("ore_schrabidium").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":ore_schrabidium");
ore_beryllium = new BlockGeneric(Material.rock).setBlockName("ore_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_beryllium");
ore_lignite = new BlockOre(Material.rock).setBlockName("ore_lignite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_lignite");
ore_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_asbestos");
ore_asbestos = new BlockOutgas(Material.rock, gas_asbestos, true, 5, true).setBlockName("ore_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_asbestos");
ore_coal_oil = new BlockCoalOil(Material.rock).setBlockName("ore_coal_oil").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_coal_oil");
ore_coal_oil_burning = new BlockCoalBurning(Material.rock).setBlockName("ore_coal_oil_burning").setCreativeTab(MainRegistry.blockTab).setLightLevel(10F/15F).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_coal_oil_burning");
@ -1256,8 +1256,8 @@ public class ModBlocks {
ore_nether_coal = new BlockNetherCoal(Material.rock, false, 5, true).setBlockName("ore_nether_coal").setCreativeTab(MainRegistry.blockTab).setLightLevel(10F/15F).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_coal");
ore_nether_smoldering = new BlockSmolder(Material.rock).setBlockName("ore_nether_smoldering").setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_smoldering");
ore_nether_uranium = new BlockOutgas(Material.rock, true, 5, false).setBlockName("ore_nether_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_uranium");
ore_nether_uranium_scorched = new BlockOutgas(Material.rock, true, 5, false).setBlockName("ore_nether_uranium_scorched").setCreativeTab(MainRegistry.blockTab).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_uranium_scorched");
ore_nether_uranium = new BlockOutgas(Material.rock, gas_radon, true, 5, true).setBlockName("ore_nether_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_uranium");
ore_nether_uranium_scorched = new BlockOutgas(Material.rock, gas_radon, true, 5, true).setBlockName("ore_nether_uranium_scorched").setCreativeTab(MainRegistry.blockTab).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_uranium_scorched");
ore_nether_plutonium = new BlockGeneric(Material.rock).setBlockName("ore_nether_plutonium").setCreativeTab(MainRegistry.blockTab).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_plutonium");
ore_nether_tungsten = new BlockGeneric(Material.rock).setBlockName("ore_nether_tungsten").setCreativeTab(MainRegistry.blockTab).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_tungsten");
ore_nether_sulfur = new BlockOre(Material.rock).setBlockName("ore_nether_sulfur").setCreativeTab(MainRegistry.blockTab).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_sulfur");
@ -1279,10 +1279,10 @@ public class ModBlocks {
stone_gneiss = new BlockGeneric(Material.rock).setBlockName("stone_gneiss").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":stone_gneiss_var");
ore_gneiss_iron = new BlockOre(Material.rock).setBlockName("ore_gneiss_iron").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_iron");
ore_gneiss_gold = new BlockOre(Material.rock).setBlockName("ore_gneiss_gold").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_gold");
ore_gneiss_uranium = new BlockOutgas(Material.rock, true, 5, false).setBlockName("ore_gneiss_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_uranium");
ore_gneiss_uranium_scorched = new BlockOutgas(Material.rock, true, 5, false).setBlockName("ore_gneiss_uranium_scorched").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_uranium_scorched");
ore_gneiss_uranium = new BlockOutgas(Material.rock, gas_radon, true, 5, true).setBlockName("ore_gneiss_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_uranium");
ore_gneiss_uranium_scorched = new BlockOutgas(Material.rock, gas_radon, true, 5, true).setBlockName("ore_gneiss_uranium_scorched").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_uranium_scorched");
ore_gneiss_copper = new BlockOre(Material.rock).setBlockName("ore_gneiss_copper").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_copper");
ore_gneiss_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_gneiss_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_asbestos");
ore_gneiss_asbestos = new BlockOutgas(Material.rock, gas_asbestos, true, 5, true).setBlockName("ore_gneiss_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_asbestos");
ore_gneiss_lithium = new BlockOre(Material.rock).setBlockName("ore_gneiss_lithium").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_lithium");
ore_gneiss_schrabidium = new BlockOre(Material.rock).setBlockName("ore_gneiss_schrabidium").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_schrabidium");
ore_gneiss_rare = new BlockOre(Material.rock).setBlockName("ore_gneiss_rare").setCreativeTab(MainRegistry.blockTab).setHardness(1.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_gneiss_rare");
@ -1313,7 +1313,7 @@ public class ModBlocks {
basalt = new BlockGeneric(Material.rock).setBlockName("basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt");
basalt_sulfur = new BlockOre(Material.rock).setBlockName("basalt_sulfur").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_sulfur");
basalt_fluorite = new BlockOre(Material.rock).setBlockName("basalt_fluorite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_fluorite");
basalt_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("basalt_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_asbestos");
basalt_asbestos = new BlockOutgas(Material.rock, gas_asbestos, true, 5, true).setBlockName("basalt_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_asbestos");
basalt_gem = new BlockCluster(Material.rock).setBlockName("basalt_gem").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_gem");
basalt_smooth = new BlockGeneric(Material.rock).setBlockName("basalt_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_smooth");
basalt_brick = new BlockGeneric(Material.rock).setBlockName("basalt_brick").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_brick");
@ -1380,9 +1380,9 @@ public class ModBlocks {
block_waste = new BlockNuclearWaste().makeBeaconable().setDisplayEffect(ExtDisplayEffect.RADFOG).setBlockName("block_waste").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste");
block_waste_painted = new BlockNuclearWaste().makeBeaconable().setDisplayEffect(ExtDisplayEffect.RADFOG).setBlockName("block_waste_painted").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste_painted");
block_waste_vitrified = new BlockNuclearWaste().makeBeaconable().setDisplayEffect(ExtDisplayEffect.RADFOG).setBlockName("block_waste_vitrified").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste_vitrified");
ancient_scrap = new BlockOutgas(Material.iron, true, 1, true, true).setBlockName("ancient_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":ancient_scrap");
ancient_scrap = new BlockOutgas(Material.iron, gas_radon_tomb, true, 1, true, true).setBlockName("ancient_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":ancient_scrap");
block_corium = new BlockHazard(Material.iron).setBlockName("block_corium").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_corium");
block_corium_cobble = new BlockOutgas(Material.iron, true, 1, true, true).setBlockName("block_corium_cobble").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_corium_cobble");
block_corium_cobble = new BlockOutgas(Material.iron, gas_radon, true, 1, true, true).setBlockName("block_corium_cobble").setCreativeTab(MainRegistry.blockTab).setHardness(100.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":block_corium_cobble");
block_scrap = new BlockFalling(Material.sand).setBlockName("block_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeGravel).setBlockTextureName(RefStrings.MODID + ":block_scrap");
block_electrical_scrap = new BlockFalling(Material.iron).setBlockName("block_electrical_scrap").setCreativeTab(MainRegistry.blockTab).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(RefStrings.MODID + ":electrical_scrap_alt2");
block_beryllium = new BlockBeaconable(Material.iron).setBlockName("block_beryllium").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_beryllium");
@ -1404,7 +1404,7 @@ public class ModBlocks {
block_yellowcake = new BlockHazardFalling().makeBeaconable().setBlockName("block_yellowcake").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeSand).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_yellowcake");
block_insulator = new BlockRotatablePillar(Material.cloth, RefStrings.MODID + ":block_insulator_top").setBlockName("block_insulator").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_insulator_side");
block_fiberglass = new BlockRotatablePillar(Material.cloth, RefStrings.MODID + ":block_fiberglass_top").setBlockName("block_fiberglass").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_fiberglass_side");
block_asbestos = new BlockOutgas(Material.cloth, true, 5, true).setBlockName("block_asbestos").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_asbestos");
block_asbestos = new BlockOutgas(Material.cloth, gas_asbestos, true, 5, true).setBlockName("block_asbestos").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_asbestos");
block_cobalt = new BlockBeaconable(Material.iron).setBlockName("block_cobalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_cobalt");
block_lithium = new BlockLithium(Material.iron).setBlockName("block_lithium").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lithium");
block_zirconium = new BlockBeaconable(Material.iron).setBlockName("block_zirconium").setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_zirconium");
@ -1449,7 +1449,7 @@ public class ModBlocks {
deco_steel = new BlockDecoCT(Material.iron).setBlockName("deco_steel").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel");
deco_lead = new BlockDecoCT(Material.iron).setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
deco_beryllium = new BlockDecoCT(Material.iron).setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
deco_asbestos = new BlockOutgas(Material.cloth, gas_asbestos, true, 5, true).setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
deco_rbmk = new BlockGeneric(Material.iron).setBlockName("deco_rbmk").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_side");
deco_rbmk_smooth = new BlockGeneric(Material.iron).setBlockName("deco_rbmk_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_top");
@ -1494,7 +1494,7 @@ public class ModBlocks {
brick_compound = new BlockGeneric(Material.rock).setBlockName("brick_compound").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(10000.0F).setBlockTextureName(RefStrings.MODID + ":brick_compound");
cmb_brick = new BlockGeneric(Material.rock).setBlockName("cmb_brick").setCreativeTab(MainRegistry.blockTab).setHardness(25.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":cmb_brick");
cmb_brick_reinforced = new BlockGeneric(Material.rock).setBlockName("cmb_brick_reinforced").setCreativeTab(MainRegistry.blockTab).setHardness(25.0F).setResistance(60000.0F).setBlockTextureName(RefStrings.MODID + ":cmb_brick_reinforced");
brick_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("brick_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_asbestos");
brick_asbestos = new BlockOutgas(Material.rock, gas_asbestos, true, 5, true).setBlockName("brick_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":brick_asbestos");
ducrete_smooth = new BlockGeneric(Material.rock).setBlockName("ducrete_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(20.0F).setResistance(8000.0F).setBlockTextureName(RefStrings.MODID + ":ducrete");
@ -1502,9 +1502,9 @@ public class ModBlocks {
brick_ducrete = new BlockGeneric(Material.rock).setBlockName("brick_ducrete").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(12000.0F).setBlockTextureName(RefStrings.MODID + ":brick_ducrete");
reinforced_ducrete = new BlockGeneric(Material.rock).setBlockName("reinforced_ducrete").setCreativeTab(MainRegistry.blockTab).setHardness(20.0F).setResistance(24000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_ducrete");
tile_lab = new BlockOutgas(Material.rock, false, 5, true).setBlockName("tile_lab").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(1.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":tile_lab");
tile_lab_cracked = new BlockOutgas(Material.rock, false, 5, true).setBlockName("tile_lab_cracked").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(1.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":tile_lab_cracked");
tile_lab_broken = new BlockOutgas(Material.rock, true, 5, true).setBlockName("tile_lab_broken").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(1.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":tile_lab_broken");
tile_lab = new BlockOutgas(Material.rock, gas_asbestos, false, 5, true).setBlockName("tile_lab").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(1.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":tile_lab");
tile_lab_cracked = new BlockOutgas(Material.rock, gas_asbestos, false, 5, true).setBlockName("tile_lab_cracked").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(1.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":tile_lab_cracked");
tile_lab_broken = new BlockOutgas(Material.rock, gas_asbestos, true, 5, true).setBlockName("tile_lab_broken").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(1.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":tile_lab_broken");
siege_shield = new SiegeShield(Material.iron).setBlockName("siege_shield").setCreativeTab(MainRegistry.blockTab).setBlockUnbreakable().setResistance(900.0F);
siege_internal = new SiegeInternal(Material.iron).setBlockName("siege_internal").setCreativeTab(MainRegistry.blockTab).setBlockUnbreakable().setResistance(60.0F);

View File

@ -2,6 +2,8 @@ package com.hbm.blocks.generic;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@ -15,7 +17,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class BlockCoalBurning extends BlockOutgas {
public BlockCoalBurning(Material mat) {
super(mat, false, 1, false);
super(mat, ModBlocks.gas_monoxide, false, 1, false);
this.setTickRandomly(true);
}

View File

@ -2,6 +2,7 @@ package com.hbm.blocks.generic;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import cpw.mods.fml.relauncher.Side;
@ -15,7 +16,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class BlockNetherCoal extends BlockOutgas {
public BlockNetherCoal(Material mat, boolean randomTick, int rate, boolean onBreak) {
super(mat, randomTick, rate, onBreak);
super(mat, ModBlocks.gas_monoxide, randomTick, rate, onBreak);
}
@Override

View File

@ -3,6 +3,7 @@ package com.hbm.blocks.generic;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.gas.BlockGasBase;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@ -13,14 +14,16 @@ import net.minecraftforge.common.util.ForgeDirection;
public class BlockOutgas extends BlockOre {
Block gas;
boolean randomTick;
int rate;
boolean onBreak;
boolean onNeighbour;
public BlockOutgas(Material mat, boolean randomTick, int rate, boolean onBreak) {
public BlockOutgas(Material mat, Block gas, boolean randomTick, int rate, boolean onBreak) {
super(mat);
this.gas = gas;
this.setTickRandomly(randomTick);
this.randomTick = randomTick;
this.rate = rate;
@ -28,42 +31,17 @@ public class BlockOutgas extends BlockOre {
this.onNeighbour = false;
}
public BlockOutgas(Material mat, boolean randomTick, int rate, boolean onBreak, boolean onNeighbour) {
this(mat, randomTick, rate, onBreak);
public BlockOutgas(Material mat, Block gas, boolean randomTick, int rate, boolean onBreak, boolean onNeighbour) {
this(mat, gas, randomTick, rate, onBreak);
this.onNeighbour = onNeighbour;
}
public int tickRate(World p_149738_1_) {
public int tickRate(World world) {
return rate;
}
protected Block getGas() {
if(this == ModBlocks.ore_uranium || this == ModBlocks.ore_uranium_scorched ||
this == ModBlocks.ore_gneiss_uranium || this == ModBlocks.ore_gneiss_uranium_scorched ||
this == ModBlocks.ore_nether_uranium || this == ModBlocks.ore_nether_uranium_scorched) {
return ModBlocks.gas_radon;
}
if(this == ModBlocks.block_corium_cobble)
return ModBlocks.gas_radon;
if(this == ModBlocks.ancient_scrap)
return ModBlocks.gas_radon_tomb;
if(this == ModBlocks.ore_coal_oil_burning || this == ModBlocks.ore_nether_coal) {
return ModBlocks.gas_monoxide;
}
if(this == ModBlocks.ore_asbestos || this == ModBlocks.ore_gneiss_asbestos ||
this == ModBlocks.block_asbestos || this == ModBlocks.deco_asbestos ||
this == ModBlocks.brick_asbestos || this == ModBlocks.tile_lab ||
this == ModBlocks.tile_lab_cracked || this == ModBlocks.tile_lab_broken ||
this == ModBlocks.basalt_asbestos) {
return ModBlocks.gas_asbestos;
}
return Blocks.air;
return this.gas;
}
@Override

View File

@ -5,14 +5,14 @@ import net.minecraftforge.common.config.Configuration;
public class MachineConfig {
public static boolean scaleRTGPower = false;
public static boolean doRTGsDecay = false;
public static boolean doRTGsDecay = true;
public static void loadFromConfig(Configuration config) {
final String CATEGORY_MACHINE = "09_machines";
scaleRTGPower = CommonConfig.createConfigBool(config, CATEGORY_MACHINE, "9.00_scaleRTGPower", "Should RTG/Betavoltaic fuel power scale down as it decays?", false);
doRTGsDecay = CommonConfig.createConfigBool(config, CATEGORY_MACHINE, "9.01_doRTGsDecay", "Should RTG/Betavoltaic fuel decay at all?", false);
doRTGsDecay = CommonConfig.createConfigBool(config, CATEGORY_MACHINE, "9.01_doRTGsDecay", "Should RTG/Betavoltaic fuel decay at all?", true);
}
}

View File

@ -7,6 +7,7 @@ import com.hbm.handler.ToolAbility.LuckAbility;
import com.hbm.handler.WeaponAbility;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.handler.guncfg.*;
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
import com.hbm.items.armor.*;
import com.hbm.items.bomb.*;
import com.hbm.items.food.*;
@ -14,6 +15,7 @@ import com.hbm.items.machine.*;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
import com.hbm.items.machine.ItemPlateFuel.FunctionEnum;
import com.hbm.items.machine.ItemRBMKRod.EnumBurnFunc;
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
import com.hbm.items.machine.ItemStamp.StampType;
import com.hbm.items.special.*;
import com.hbm.items.special.ItemPlasticScrap.ScrapType;
@ -26,6 +28,7 @@ import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import com.hbm.tileentity.machine.rbmk.IRBMKFluxReceiver.NType;
import com.hbm.util.EnchantmentUtil;
import com.hbm.util.RTGUtil;
import api.hbm.block.IToolable.ToolType;
import cpw.mods.fml.common.registry.GameRegistry;
@ -709,6 +712,8 @@ public class ModItems {
public static Item thermo_element;
public static Item limiter;
public static Item pellet_rtg_depleted;
public static Item pellet_rtg;
public static Item pellet_rtg_radium;
public static Item pellet_rtg_weak;
@ -719,7 +724,7 @@ public class ModItems {
public static Item pellet_rtg_gold;
public static Item pellet_rtg_americium;
public static Item pellet_rtg_berkelium;
public static Item tritium_deuterium_cake;
public static Item pellet_schrabidium;
@ -3056,16 +3061,19 @@ public class ModItems {
wiring_red_copper = new ItemWiring().setUnlocalizedName("wiring_red_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wiring_red_copper");
pellet_rtg = new ItemRTGPellet(10).setUnlocalizedName("pellet_rtg").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg");
pellet_rtg_radium = new ItemRTGPellet(3).setUnlocalizedName("pellet_rtg_radium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_radium");
pellet_rtg_weak = new ItemRTGPellet(5).setUnlocalizedName("pellet_rtg_weak").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_weak");
pellet_rtg_polonium = new ItemRTGPellet(25).setUnlocalizedName("pellet_rtg_polonium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_polonium");
pellet_rtg_depleted = new ItemRTGPelletDepleted().setUnlocalizedName("pellet_rtg_depleted").setCreativeTab(MainRegistry.controlTab); //TODO: add localization; uncrafting recipes; make radiation scale with depletion for rtgs
pellet_rtg = new ItemRTGPellet(10).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(87.7F, HalfLifeType.MEDIUM, false) * 1.5)).setUnlocalizedName("pellet_rtg").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg");
pellet_rtg_radium = new ItemRTGPellet(3).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(16.0F, HalfLifeType.LONG, false) * 1.5)).setUnlocalizedName("pellet_rtg_radium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_radium");
pellet_rtg_weak = new ItemRTGPellet(5).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(1.0F, HalfLifeType.LONG, false) * 1.5)).setUnlocalizedName("pellet_rtg_weak").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_weak");
pellet_rtg_polonium = new ItemRTGPellet(25).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(16.0F, HalfLifeType.LONG, false) * 1.5)).setUnlocalizedName("pellet_rtg_polonium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_polonium");
pellet_rtg_actinium = new ItemRTGPellet(20).setUnlocalizedName("pellet_rtg_actinium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_actinium");
pellet_rtg_strontium = new ItemRTGPellet(15).setUnlocalizedName("pellet_rtg_strontium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_strontium");
pellet_rtg_lead = new ItemRTGPellet(250).setUnlocalizedName("pellet_rtg_lead").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_lead");
pellet_rtg_gold = new ItemRTGPellet(150).setUnlocalizedName("pellet_rtg_gold").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_gold");
pellet_rtg_americium = new ItemRTGPellet(15).setUnlocalizedName("pellet_rtg_americium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_americium");
pellet_rtg_strontium = new ItemRTGPellet(15).setDecays(DepletedRTGMaterial.ZIRCONIUM, (long) (RTGUtil.getLifespan(16.0F, HalfLifeType.LONG, false) * 1.5)).setUnlocalizedName("pellet_rtg_strontium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_strontium");
pellet_rtg_lead = new ItemRTGPellet(250).setDecays(DepletedRTGMaterial.BISMUTH, (long) (RTGUtil.getLifespan(0.13F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_lead").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_lead");
pellet_rtg_gold = new ItemRTGPellet(150).setDecays(DepletedRTGMaterial.MERCURY, (long) (RTGUtil.getLifespan(2.7F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_gold").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_gold");
pellet_rtg_americium = new ItemRTGPellet(15).setDecays(DepletedRTGMaterial.NEPTUNIUM, (long) (RTGUtil.getLifespan(470.0F, HalfLifeType.MEDIUM, false) * 1.5)).setUnlocalizedName("pellet_rtg_americium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_americium");
pellet_rtg_berkelium = new ItemRTGPellet(20).setUnlocalizedName("pellet_rtg_berkelium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_berkelium");
tritium_deuterium_cake = new ItemCustomLore().setUnlocalizedName("tritium_deuterium_cake").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":tritium_deuterium_cake");
piston_selenium = new Item().setUnlocalizedName("piston_selenium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":piston_selenium");
@ -6085,6 +6093,7 @@ public class ModItems {
GameRegistry.registerItem(pellet_rtg_gold, pellet_rtg_gold.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_americium, pellet_rtg_americium.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_berkelium, pellet_rtg_berkelium.getUnlocalizedName());
GameRegistry.registerItem(pellet_rtg_depleted, pellet_rtg_depleted.getUnlocalizedName());
GameRegistry.registerItem(tritium_deuterium_cake, tritium_deuterium_cake.getUnlocalizedName());
GameRegistry.registerItem(pellet_cluster, pellet_cluster.getUnlocalizedName());
GameRegistry.registerItem(pellet_buckshot, pellet_buckshot.getUnlocalizedName());

View File

@ -7,19 +7,23 @@ import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import com.google.common.collect.ImmutableSet;
import com.hbm.config.MachineConfig;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
import com.hbm.tileentity.IRadioisotopeFuel;
import com.hbm.util.BobMathUtil;
import com.hbm.util.I18nUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
public class ItemRTGPellet extends Item implements IRadioisotopeFuel {
public class ItemRTGPellet extends Item {
private short heat = 0;
private boolean doesDecay = false;
@ -52,34 +56,73 @@ public class ItemRTGPellet extends Item implements IRadioisotopeFuel {
"In the 1920s, uranium was considered a useless byproduct of the production of radium.",
"The Manhattan Project referred to refined natural uranium as tuballoy, enriched uranium as oralloy, and depleted uranium as depletalloy."
};
@Override
public ItemRTGPellet setDecays(@Nonnull ItemStack itemIn, long life) {
public ItemRTGPellet setDecays(DepletedRTGMaterial mat, long life) {
doesDecay = true;
decayItem = itemIn;
decayItem = new ItemStack(ModItems.pellet_rtg_depleted, 1, mat.ordinal());
lifespan = life;
return this;
}
@Override
public long getMaxLifespan() {
return lifespan;
}
@Override
public short getHeat() {
return heat;
}
@CheckForNull
@Override
public ItemStack getDecayItem() {
return decayItem == null ? null : decayItem.copy();
}
@Override
public boolean getDoesDecay() {
return doesDecay;
return this.doesDecay;
}
public static ItemStack handleDecay(ItemStack stack, ItemRTGPellet instance) {
if (instance.getDoesDecay() && MachineConfig.doRTGsDecay) {
if (instance.getLifespan(stack) <= 0)
return instance.getDecayItem();
else
instance.decay(stack);
}
return stack;
}
public void decay(ItemStack stack) {
if (stack != null && stack.getItem() instanceof ItemRTGPellet) {
if (!((ItemRTGPellet) stack.getItem()).getDoesDecay())
return;
if (stack.hasTagCompound())
stack.stackTagCompound.setLong("PELLET_DEPLETION", getLifespan(stack) - 1);
else {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("PELLET_DEPLETION", getMaxLifespan());
}
}
}
public long getLifespan(ItemStack stack)
{
if (stack != null && stack.getItem() instanceof ItemRTGPellet)
{
if (stack.hasTagCompound())
return stack.stackTagCompound.getLong("PELLET_DEPLETION");
else
{
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setLong("PELLET_DEPLETION", getMaxLifespan());
return getMaxLifespan();
}
}
return 0;
}
public static short getScaledPower(ItemRTGPellet fuel, ItemStack stack) {
return (short) Math.ceil(fuel.getHeat() * (fuel.getLifespan(stack) * fuel.getMaxLifespan()));
}
@Override
@ -93,21 +136,35 @@ public class ItemRTGPellet extends Item implements IRadioisotopeFuel {
return stack;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
list.add(I18nUtil.resolveKey(this.getUnlocalizedName() + ".desc"));
IRadioisotopeFuel.addTooltip(list, stack, bool);
}
@Override
public boolean showDurabilityBar(ItemStack stack) {
return getDoesDecay() && getLifespan(stack) != getMaxLifespan();
}
@Override
public double getDurabilityForDisplay(ItemStack stack) {
return IRadioisotopeFuel.getDuraBar(stack);
final ItemRTGPellet instance = (ItemRTGPellet) stack.getItem();
return 1D - (double)instance.getLifespan(stack) / (double)instance.getMaxLifespan();
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
list.add(I18nUtil.resolveKey(this.getUnlocalizedName().concat(".desc")));
final ItemRTGPellet instance = (ItemRTGPellet) stack.getItem();
list.add(I18nUtil.resolveKey("desc.item.rtgHeat", instance.getDoesDecay() && MachineConfig.scaleRTGPower ? getScaledPower(instance, stack) : instance.getHeat()));
if (instance.getDoesDecay()) {
list.add(I18nUtil.resolveKey("desc.item.rtgDecay", I18nUtil.resolveKey(instance.getDecayItem().getUnlocalizedName() + ".name"), instance.getDecayItem().stackSize));
list.add(BobMathUtil.toPercentage(instance.getLifespan(stack), instance.getMaxLifespan()));
if (bool) {
list.add("EXTENDED INFO:");
list.add(String.format("%s / %s ticks", instance.getLifespan(stack), instance.getMaxLifespan()));
final String[] timeLeft = BobMathUtil.ticksToDate(instance.getLifespan(stack));
final String[] maxLife = BobMathUtil.ticksToDate(instance.getMaxLifespan());
list.add(String.format("Time remaining: %s y, %s d, %s h", (Object[]) timeLeft));
list.add(String.format("Maximum life: %s y, %s d, %s h", (Object[]) maxLife));
}
}
}
public String getData() {

View File

@ -0,0 +1,18 @@
package com.hbm.items.machine;
import com.hbm.items.ItemEnumMulti;
public class ItemRTGPelletDepleted extends ItemEnumMulti {
public ItemRTGPelletDepleted() {
super(DepletedRTGMaterial.class, true, true);
}
public enum DepletedRTGMaterial {
BISMUTH,
MERCURY,
NEPTUNIUM,
LEAD,
ZIRCONIUM;
}
}

View File

@ -3,14 +3,13 @@ package com.hbm.tileentity.machine;
import com.hbm.blocks.machine.MachineDiFurnaceRTG;
import com.hbm.inventory.recipes.MachineRecipes;
import com.hbm.items.machine.ItemRTGPellet;
import com.hbm.tileentity.IRTGUser;
import com.hbm.tileentity.IRadioisotopeFuel;
import com.hbm.util.RTGUtil;
import com.hbm.tileentity.TileEntityMachineBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IRTGUser
public class TileEntityDiFurnaceRTG extends TileEntityMachineBase
{
public short progress;
private short processSpeed = 0;
@ -125,7 +124,7 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IRT
}
public boolean hasPower() {
processSpeed = (short) updateRTGs(slots, rtgIn);
processSpeed = (short) RTGUtil.updateRTGs(slots, rtgIn);
return processSpeed >= 15;
}
@ -170,14 +169,4 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IRT
return "container.diFurnaceRTG";
}
@Override
public int getHeat() {
return processSpeed;
}
@Override
public Class<? extends IRadioisotopeFuel> getDesiredClass() {
return ItemRTGPellet.class;
}
}

View File

@ -12,6 +12,7 @@ import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPellet;
import com.hbm.lib.Library;
import com.hbm.tileentity.TileEntityMachineBase;
import com.hbm.util.RTGUtil;
import api.hbm.energy.IEnergyGenerator;
import cpw.mods.fml.relauncher.Side;
@ -31,6 +32,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
public int spin;
public int[] burn = new int[4];
public boolean hasRTG = false;
public int[] RTGSlots = new int[]{ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
@SideOnly(Side.CLIENT)
public float rotation;
@ -123,19 +125,8 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
}
// RTG ///
this.hasRTG = false;
for(int i = 11; i < 21; i++) {
if(slots[i] != null && slots[i].getItem() instanceof ItemRTGPellet) {
ItemRTGPellet pellet = (ItemRTGPellet) slots[i].getItem();
this.spin += pellet.getHeat() * 10;
this.hasRTG = true;
if(slots[i].getItem() == ModItems.pellet_rtg_gold || slots[i].getItem() == ModItems.pellet_rtg_lead) {
if(worldObj.rand.nextInt(60*60*20) == 0)
slots[i] = null;
}
}
}
this.hasRTG = RTGUtil.hasHeat(slots, RTGSlots);
this.spin += RTGUtil.updateRTGs(slots, RTGSlots) * 10;
if(this.spin > 0) {

View File

@ -7,6 +7,7 @@ import com.hbm.items.machine.ItemRTGPellet;
import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.util.RTGUtil;
import api.hbm.energy.IEnergyGenerator;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -27,9 +28,7 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
public long power;
public final long powerMax = 100000;
private static final int[] slots_top = new int[] { 0 };
private static final int[] slots_bottom = new int[] { 0 };
private static final int[] slots_side = new int[] { 0 };
public static final int[] slot_io = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
private String customName;
@ -105,10 +104,7 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
@Override
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
if(itemStack.getItem() != null && (itemStack.getItem() == ModItems.pellet_rtg || itemStack.getItem() == ModItems.pellet_rtg_weak))
return true;
return false;
return itemStack.getItem() instanceof ItemRTGPellet;
}
@Override
@ -174,9 +170,8 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
}
@Override
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
{
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
public int[] getAccessibleSlotsFromSide(int p_94128_1_){
return slot_io;
}
@Override
@ -202,7 +197,7 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
}
public boolean hasHeat() {
return heat > 0;
return RTGUtil.hasHeat(slots, slot_io);
}
@Override
@ -213,20 +208,7 @@ public class TileEntityMachineRTG extends TileEntity implements ISidedInventory,
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
this.sendPower(worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir.getOpposite());
heat = 0;
for(int i = 0; i < slots.length; i++) {
if(slots[i] != null && slots[i].getItem() instanceof ItemRTGPellet) {
heat += ((ItemRTGPellet)slots[i].getItem()).getHeat();
if(slots[i].getItem() == ModItems.pellet_rtg_gold || slots[i].getItem() == ModItems.pellet_rtg_lead) {
if(worldObj.rand.nextInt(60*60*20) == 0)
slots[i] = null;
}
}
}
heat = RTGUtil.updateRTGs(slots, slot_io);
if(heat > heatMax)
heat = heatMax;

View File

@ -11,13 +11,15 @@ import net.minecraft.tileentity.TileEntity;
import com.hbm.blocks.machine.MachineRtgFurnace;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPellet;
import com.hbm.util.RTGUtil;
public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory {
private ItemStack slots[];
public int dualCookTime;
public static final int processingSpeed = 100;
public static final int processingSpeed = 1000;
private static final int[] slots_top = new int[] {0};
private static final int[] slots_bottom = new int[] {4};
@ -104,7 +106,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory
for(int i = 1; i <= 3; i++) {
if(!(slots[i] != null && (slots[i].getItem() == ModItems.pellet_rtg || slots[i].getItem() == ModItems.pellet_rtg_polonium)))
if(!(slots[i] != null && (slots[i].getItem() instanceof ItemRTGPellet)))
return false;
}
@ -262,7 +264,7 @@ public class TileEntityRtgFurnace extends TileEntity implements ISidedInventory
{
if(hasPower() && canProcess())
{
dualCookTime++;
dualCookTime += RTGUtil.updateRTGs(slots, slots_side);
if(this.dualCookTime == TileEntityRtgFurnace.processingSpeed)
{

View File

@ -0,0 +1,76 @@
package com.hbm.util;
import com.hbm.config.MachineConfig;
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
import com.hbm.items.machine.ItemRTGPellet;
import net.minecraft.item.ItemStack;
public class RTGUtil {
public static short getPower(ItemRTGPellet fuel, ItemStack stack)
{
return MachineConfig.scaleRTGPower ? ItemRTGPellet.getScaledPower(fuel, stack) : fuel.getHeat();
}
public static boolean hasHeat(ItemStack[] inventory, int[] rtgSlots) {
int heat = 0;
for(int slot : rtgSlots) {
if(inventory[slot] == null)
continue;
if(!(inventory[slot].getItem() instanceof ItemRTGPellet))
continue;
final ItemRTGPellet pellet = (ItemRTGPellet) inventory[slot].getItem();
heat += getPower(pellet, inventory[slot]);
}
return heat > 0;
}
public static int updateRTGs(ItemStack[] inventory, int[] rtgSlots) {
int newHeat = 0;
for(int slot : rtgSlots) {
if(inventory[slot] == null)
continue;
if(!(inventory[slot].getItem() instanceof ItemRTGPellet))
continue;
final ItemRTGPellet pellet = (ItemRTGPellet) inventory[slot].getItem();
newHeat += getPower(pellet, inventory[slot]);
inventory[slot] = ItemRTGPellet.handleDecay(inventory[slot], pellet);
}
return newHeat;
}
/**
* Gets the lifespan of an RTG based on half-life
* @author UFFR
* @param halfLife The half-life
* @param type Half-life units: {@link#HalfLifeType}
* @param realYears Whether or not to use 365 days per year instead of 100 to calculate time
* @return The half-life calculated into Minecraft ticks
*/
public static long getLifespan(float halfLife, HalfLifeType type, boolean realYears) {
float life = 0;
switch (type)
{
case LONG:
life = (48000 * (realYears ? 365 : 100) * 100) * halfLife;
break;
case MEDIUM:
life = (48000 * (realYears ? 365 : 100)) * halfLife;
break;
case SHORT:
life = 48000 * halfLife;
break;
}
return (long) life;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB