marshmallows, neptunium fuel, better RBMK fires

This commit is contained in:
Bob 2021-04-19 22:44:36 +02:00
parent 693756653e
commit c0887a5d32
20 changed files with 276 additions and 52 deletions

View File

@ -858,6 +858,7 @@ public class ModBlocks {
public static final int guiID_rbmk_control = 115;
public static final int guiID_rbmk_console = 116;
public static Block pribris;
public static Block pribris_burning;
public static Block book_guide;
@ -1579,6 +1580,7 @@ public class ModBlocks {
rbmk_moderator = new RBMKModerator().setBlockName("rbmk_moderator").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_moderator");
rbmk_console = new RBMKConsole().setBlockName("rbmk_console").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_console");
pribris = new RBMKDebris().setBlockName("pribris").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris");
pribris_burning = new RBMKDebrisBurning().setBlockName("pribris_burning").setCreativeTab(MainRegistry.machineTab).setHardness(50.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_debris_burning");
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab);
@ -2240,7 +2242,7 @@ public class ModBlocks {
GameRegistry.registerBlock(rbmk_moderator, rbmk_moderator.getUnlocalizedName());
GameRegistry.registerBlock(rbmk_console, rbmk_console.getUnlocalizedName());
GameRegistry.registerBlock(pribris, pribris.getUnlocalizedName());
//GameRegistry.registerBlock(rbmk_console, rbmk_console.getUnlocalizedName());
GameRegistry.registerBlock(pribris_burning, pribris_burning.getUnlocalizedName());
GameRegistry.registerBlock(red_cable, red_cable.getUnlocalizedName());
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());

View File

@ -79,4 +79,10 @@ public class CoriumBlock extends BlockFluidClassic {
world.setBlock(x, y, z, ModBlocks.block_corium);
}
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderBlockPass() {
return 0;
}
}

View File

@ -1,17 +1,8 @@
package com.hbm.blocks.machine.rbmk;
import java.util.Random;
import com.hbm.main.MainRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
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.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class RBMKDebris extends Block {
@ -35,18 +26,4 @@ public class RBMKDebris extends Block {
public boolean renderAsNormalBlock() {
return false;
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
if(world.getBlock(x, y + 1, z) == Blocks.air && rand.nextInt(100) == 0) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "rbmkflame");
data.setInteger("maxAge", 300);
data.setDouble("posX", x + 0.5);
data.setDouble("posY", y + 1.75);
data.setDouble("posZ", z + 0.5);
MainRegistry.proxy.effectNT(data);
}
}
}

View File

@ -0,0 +1,58 @@
package com.hbm.blocks.machine.rbmk;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class RBMKDebrisBurning extends RBMKDebris {
@Override
public int tickRate(World world) {
return 100 + world.rand.nextInt(20);
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(!world.isRemote) {
if(rand.nextInt(5) == 0) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "rbmkflame");
data.setInteger("maxAge", 300);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + 0.25 + rand.nextDouble() * 0.5, y + 1.75, z + 0.25 + rand.nextDouble() * 0.5), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 1.75, z + 0.5, 75));
MainRegistry.proxy.effectNT(data);
}
if(rand.nextInt(50) == 0) {
world.setBlock(x, y, z, ModBlocks.pribris);
} else {
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
}
}
}
public void onBlockAdded(World world, int x, int y, int z) {
super.onBlockAdded(world, x, y, z);
if(!world.isRemote) {
if(world.rand.nextInt(3) == 0) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "rbmkflame");
data.setInteger("maxAge", 300);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + 0.25 + world.rand.nextDouble() * 0.5, y + 1.75, z + 0.25 + world.rand.nextDouble() * 0.5), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 1.75, z + 0.5, 75));
MainRegistry.proxy.effectNT(data);
}
}
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
}
}

View File

@ -56,6 +56,9 @@ public class MineralRecipes {
RecipesCommon.add9To1(ModItems.nugget_pu_mix, ModItems.ingot_pu_mix);
RecipesCommon.add1To9(ModItems.ingot_pu_mix, ModItems.nugget_pu_mix);
RecipesCommon.add9To1(ModItems.nugget_neptunium_fuel, ModItems.ingot_neptunium_fuel);
RecipesCommon.add1To9(ModItems.ingot_neptunium_fuel, ModItems.nugget_neptunium_fuel);
RecipesCommon.addBillet(ModItems.billet_uranium, ModItems.nugget_uranium, "nuggetUranium");
RecipesCommon.addBillet(ModItems.billet_u233, ModItems.nugget_u233, "nuggetUranium233", "tinyU233");
RecipesCommon.addBillet(ModItems.billet_u235, ModItems.nugget_u235, "nuggetUranium235", "tinyU235");
@ -66,33 +69,38 @@ public class MineralRecipes {
RecipesCommon.addBillet(ModItems.billet_pu239, ModItems.nugget_pu239, "nuggetPlutonium239", "tinyPu239");
RecipesCommon.addBillet(ModItems.billet_pu240, ModItems.nugget_pu240, "nuggetPlutonium240", "tinyPu240");
RecipesCommon.addBillet(ModItems.billet_pu_mix, ModItems.nugget_pu_mix);
RecipesCommon.addBillet(ModItems.billet_neptunium, ModItems.nugget_neptunium, "nuggetNeptunium");
RecipesCommon.addBillet(ModItems.billet_neptunium, ModItems.nugget_neptunium, "nuggetNeptunium237", "tinyNp237");
RecipesCommon.addBillet(ModItems.billet_polonium, ModItems.nugget_polonium, "nuggetPolonium");
RecipesCommon.addBillet(ModItems.billet_schrabidium, ModItems.nugget_schrabidium);
RecipesCommon.addBillet(ModItems.billet_solinium, ModItems.nugget_solinium);
RecipesCommon.addBillet(ModItems.billet_uranium_fuel, ModItems.nugget_uranium_fuel);
RecipesCommon.addBillet(ModItems.billet_thorium_fuel, ModItems.nugget_thorium_fuel);
RecipesCommon.addBillet(ModItems.billet_plutonium_fuel, ModItems.nugget_plutonium_fuel);
RecipesCommon.addBillet(ModItems.billet_neptunium_fuel, ModItems.nugget_neptunium_fuel);
RecipesCommon.addBillet(ModItems.billet_mox_fuel, ModItems.nugget_mox_fuel);
RecipesCommon.addBillet(ModItems.billet_schrabidium_fuel, ModItems.nugget_schrabidium_fuel);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_thorium_fuel, 2), new Object[] { ModItems.billet_th232, ModItems.billet_th232, ModItems.billet_u233 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_thorium_fuel, 3), new Object[] { ModItems.billet_th232, ModItems.billet_th232, ModItems.billet_u233 });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_thorium_fuel, 1), new Object[] { "nuggetThorium232", "nuggetThorium232", "nuggetThorium232", "nuggetThorium232", "nuggetUranium233", "nuggetUranium233" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_thorium_fuel, 1), new Object[] { "tinyTh232", "tinyTh232", "tinyTh232", "tinyTh232", "tinyU233", "tinyU233" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 2), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_u233 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_uranium_fuel, 3), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_u233 });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_uranium_fuel, 1), new Object[] { "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium233", "nuggetUranium233" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_uranium_fuel, 1), new Object[] { "tinyU238", "tinyU238", "tinyU238", "tinyU238", "tinyU233", "tinyU233" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 2), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_u235 });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_uranium_fuel, 3), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_u235 });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_uranium_fuel, 1), new Object[] { "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium235", "nuggetUranium235" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_uranium_fuel, 1), new Object[] { "tinyU238", "tinyU238", "tinyU238", "tinyU238", "tinyU235", "tinyU235" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_plutonium_fuel, 2), new Object[] { ModItems.billet_u238, ModItems.billet_pu_mix, ModItems.billet_pu_mix });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_plutonium_fuel, 3), new Object[] { ModItems.billet_u238, ModItems.billet_pu_mix, ModItems.billet_pu_mix });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_plutonium_fuel, 1), new Object[] { ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, "nuggetUranium238", "nuggetUranium238" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_plutonium_fuel, 1), new Object[] { ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, "tinyU238", "tinyU238" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_mox_fuel, 2), new Object[] { ModItems.billet_u238, ModItems.billet_u235, ModItems.billet_pu_mix });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_neptunium_fuel, 3), new Object[] { ModItems.billet_u238, ModItems.billet_u238, ModItems.billet_neptunium });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_neptunium_fuel, 1), new Object[] { "nuggetNeptunium", "nuggetNeptunium", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_neptunium_fuel, 1), new Object[] { "tinyNp237", "tinyNp237", "tinyU238", "tinyU238", "tinyU238", "tinyU238" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_mox_fuel, 3), new Object[] { ModItems.billet_u238, ModItems.billet_u235, ModItems.billet_pu_mix });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_mox_fuel, 1), new Object[] { ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, "nuggetUranium238", "nuggetUranium238", "nuggetUranium235", "nuggetUranium235" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_mox_fuel, 1), new Object[] { ModItems.nugget_pu_mix, ModItems.nugget_pu_mix, "tinyU238", "tinyU238", "tinyU235", "tinyU235" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_schrabidium_fuel, 2), new Object[] { ModItems.billet_schrabidium, ModItems.billet_neptunium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_schrabidium_fuel, 1), new Object[] { ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, "nuggetNeptunium", "nuggetNeptunium", ModItems.nugget_beryllium, ModItems.nugget_beryllium }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.billet_schrabidium_fuel, 3), new Object[] { ModItems.billet_schrabidium, ModItems.billet_neptunium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium, ModItems.nugget_beryllium });
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_schrabidium_fuel, 1), new Object[] { ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, "nuggetNeptunium237", "nuggetNeptunium237", ModItems.nugget_beryllium, ModItems.nugget_beryllium }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.billet_schrabidium_fuel, 1), new Object[] { ModItems.nugget_schrabidium, ModItems.nugget_schrabidium, "tinyNp237", "tinyNp237", ModItems.nugget_beryllium, ModItems.nugget_beryllium }));
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_uranium, 2), new Object[] { ModItems.billet_uranium, ModItems.billet_uranium, ModItems.billet_uranium });
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ingot_u233, 2), new Object[] { ModItems.billet_u233, ModItems.billet_u233, ModItems.billet_u233 });
@ -104,6 +112,7 @@ public class MineralRecipes {
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_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 });

View File

@ -20,6 +20,7 @@ public class OreDictManager {
OreDictionary.registerOre("ingotPlutonium238", ModItems.ingot_pu238);
OreDictionary.registerOre("ingotPlutonium239", ModItems.ingot_pu239);
OreDictionary.registerOre("ingotPlutonium240", ModItems.ingot_pu240);
OreDictionary.registerOre("ingotNeptunium237", ModItems.ingot_neptunium);
OreDictionary.registerOre("U233", ModItems.ingot_u233);
OreDictionary.registerOre("U235", ModItems.ingot_u235);
OreDictionary.registerOre("U238", ModItems.ingot_u238);
@ -27,7 +28,7 @@ public class OreDictManager {
OreDictionary.registerOre("Pu238", ModItems.ingot_pu238);
OreDictionary.registerOre("Pu239", ModItems.ingot_pu239);
OreDictionary.registerOre("Pu240", ModItems.ingot_pu240);
OreDictionary.registerOre("ingotNeptunium", ModItems.ingot_neptunium);
OreDictionary.registerOre("Np237", ModItems.ingot_neptunium);
OreDictionary.registerOre("ingotPolonium", ModItems.ingot_polonium);
OreDictionary.registerOre("ingotSchrabidium", ModItems.ingot_schrabidium);
OreDictionary.registerOre("ingotTitanium", ModItems.ingot_titanium);
@ -81,7 +82,7 @@ public class OreDictManager {
OreDictionary.registerOre("nuggetDaffergon", ModItems.nugget_daffergon);
OreDictionary.registerOre("nuggetVerticium", ModItems.nugget_verticium);
OreDictionary.registerOre("nuggetEuphemium", ModItems.nugget_euphemium);
OreDictionary.registerOre("nuggetNeptunium", ModItems.nugget_neptunium);
OreDictionary.registerOre("nuggetNeptunium237", ModItems.nugget_neptunium);
OreDictionary.registerOre("nuggetPolonium", ModItems.nugget_polonium);
OreDictionary.registerOre("nuggetSchrabidium", ModItems.nugget_schrabidium);
OreDictionary.registerOre("nuggetZirconium", ModItems.nugget_zirconium);
@ -92,6 +93,7 @@ public class OreDictManager {
OreDictionary.registerOre("tinyPu238", ModItems.nugget_pu238);
OreDictionary.registerOre("tinyPu239", ModItems.nugget_pu239);
OreDictionary.registerOre("tinyPu240", ModItems.nugget_pu240);
OreDictionary.registerOre("tinyNp237", ModItems.nugget_neptunium);
OreDictionary.registerOre("nuggetNeodymium", ModItems.fragment_neodymium);
OreDictionary.registerOre("nuggetCobalt", ModItems.fragment_cobalt);

View File

@ -903,6 +903,7 @@ public class ModItems {
public static Item rbmk_fuel_thmeu;
public static Item rbmk_fuel_lep;
public static Item rbmk_fuel_mep;
public static Item rbmk_fuel_men;
public static Item rbmk_fuel_mox;
public static Item rbmk_fuel_les;
public static Item rbmk_fuel_mes;
@ -1548,6 +1549,7 @@ public class ModItems {
public static Item pancake;
public static Item nugget;
public static Item peas;
public static Item marshmallow;
public static Item med_ipecac;
public static Item med_ptsd;
@ -3129,28 +3131,31 @@ public class ModItems {
rbmk_lid = new Item().setUnlocalizedName("rbmk_lid").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_lid");
rbmk_fuel_empty = new Item().setUnlocalizedName("rbmk_fuel_empty").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_fuel_empty");
rbmk_fuel_meu = new ItemRBMKRod("Medium Enriched Uranium")
rbmk_fuel_meu = new ItemRBMKRod("Medium Enriched Uranium-235")
.setYield(100000000D)
.setStats(100).setUnlocalizedName("rbmk_fuel_meu").setTextureName(RefStrings.MODID + ":rbmk_fuel_meu");
rbmk_fuel_thmeu = new ItemRBMKRod("Thorium with MEU Driver Fuel")
.setYield(100000000D)
.setStats(100).setUnlocalizedName("rbmk_fuel_thmeu").setTextureName(RefStrings.MODID + ":rbmk_fuel_thmeu");
rbmk_fuel_lep = new ItemRBMKRod("Low Enriched Plutonium")
rbmk_fuel_lep = new ItemRBMKRod("Low Enriched Plutonium-239")
.setYield(100000000D)
.setStats(100).setUnlocalizedName("rbmk_fuel_lep").setTextureName(RefStrings.MODID + ":rbmk_fuel_lep");
rbmk_fuel_mep = new ItemRBMKRod("Medium Enriched Plutonium")
rbmk_fuel_mep = new ItemRBMKRod("Medium Enriched Plutonium-239")
.setYield(100000000D)
.setStats(100, 20).setUnlocalizedName("rbmk_fuel_mep").setTextureName(RefStrings.MODID + ":rbmk_fuel_mep");
rbmk_fuel_men = new ItemRBMKRod("Medium Enriched Neptunium-237")
.setYield(100000000D)
.setStats(100, 20).setUnlocalizedName("rbmk_fuel_men").setTextureName(RefStrings.MODID + ":rbmk_fuel_men");
rbmk_fuel_mox = new ItemRBMKRod("Mixed LEU & LEP Oxide")
.setYield(100000000D)
.setStats(100).setUnlocalizedName("rbmk_fuel_mox").setTextureName(RefStrings.MODID + ":rbmk_fuel_mox");
rbmk_fuel_les = new ItemRBMKRod("Low Enriched Schrabidium")
rbmk_fuel_les = new ItemRBMKRod("Low Enriched Schrabidium-236")
.setYield(100000000D)
.setStats(100).setUnlocalizedName("rbmk_fuel_les").setTextureName(RefStrings.MODID + ":rbmk_fuel_les");
rbmk_fuel_mes = new ItemRBMKRod("Medium Enriched Schrabidium")
rbmk_fuel_mes = new ItemRBMKRod("Medium Enriched Schrabidium-236")
.setYield(100000000D)
.setStats(100).setUnlocalizedName("rbmk_fuel_mes").setTextureName(RefStrings.MODID + ":rbmk_fuel_mes");
rbmk_fuel_hes = new ItemRBMKRod("Highly Enriched Schrabidium")
rbmk_fuel_hes = new ItemRBMKRod("Highly Enriched Schrabidium-236")
.setYield(100000000D)
.setStats(100).setUnlocalizedName("rbmk_fuel_hes").setTextureName(RefStrings.MODID + ":rbmk_fuel_hes");
rbmk_fuel_leaus = new ItemRBMKRod("Low Enriched Australium (Tasmanite)")
@ -3765,6 +3770,7 @@ public class ModItems {
pancake = new ItemPancake(20, 20, false).setUnlocalizedName("pancake").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pancake");
nugget = new ItemLemon(200, 200, false).setUnlocalizedName("nugget").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":nugget");
peas = new ItemPeas().setUnlocalizedName("peas").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":peas");
marshmallow = new Item().setUnlocalizedName("marshmallow").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":marshmallow");
defuser = new Item().setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser");
reacher = new Item().setUnlocalizedName("reacher").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":reacher");
@ -5812,6 +5818,7 @@ public class ModItems {
GameRegistry.registerItem(rbmk_fuel_thmeu, rbmk_fuel_thmeu.getUnlocalizedName());
GameRegistry.registerItem(rbmk_fuel_lep, rbmk_fuel_lep.getUnlocalizedName());
GameRegistry.registerItem(rbmk_fuel_mep, rbmk_fuel_mep.getUnlocalizedName());
GameRegistry.registerItem(rbmk_fuel_men, rbmk_fuel_men.getUnlocalizedName());
GameRegistry.registerItem(rbmk_fuel_mox, rbmk_fuel_mox.getUnlocalizedName());
GameRegistry.registerItem(rbmk_fuel_les, rbmk_fuel_les.getUnlocalizedName());
GameRegistry.registerItem(rbmk_fuel_mes, rbmk_fuel_mes.getUnlocalizedName());
@ -6565,6 +6572,7 @@ public class ModItems {
GameRegistry.registerItem(pancake, pancake.getUnlocalizedName());
GameRegistry.registerItem(nugget, nugget.getUnlocalizedName());
GameRegistry.registerItem(peas, peas.getUnlocalizedName());
GameRegistry.registerItem(marshmallow, marshmallow.getUnlocalizedName());
GameRegistry.registerItem(med_ipecac, med_ipecac.getUnlocalizedName());
GameRegistry.registerItem(med_ptsd, med_ptsd.getUnlocalizedName());
GameRegistry.registerItem(canteen_13, canteen_13.getUnlocalizedName());

View File

@ -111,7 +111,9 @@ public class ItemRBMKRod extends ItemHazard {
setYield(stack, y);
//TODO: core heatup
double coreHeat = this.getCoreHeat(stack);
coreHeat += outFlux * heat;
this.setCoreHeat(stack, coreHeat);
/*System.out.println("=== FUEL SUMMARY REPORT ===");
System.out.println("I AM " + this.getUnlocalizedName());
@ -129,7 +131,19 @@ public class ItemRBMKRod extends ItemHazard {
* @param stack
*/
public void updateHeat(ItemStack stack) {
//TODO
//TODO: use exponentials so the heat function isn't linear (to allow very spicy core temperatures)
double coreHeat = this.getCoreHeat(stack);
double hullHeat = this.getHullHeat(stack);
if(coreHeat > hullHeat) {
coreHeat -= this.diffusion;
hullHeat += this.diffusion;
this.setCoreHeat(stack, coreHeat);
this.setHullHeat(stack, hullHeat);
}
}
/**
@ -137,8 +151,19 @@ public class ItemRBMKRod extends ItemHazard {
* @param stack
* @return
*/
public double provideHeat(ItemStack stack) {
return 0; //TODO
public double provideHeat(ItemStack stack, double heat) {
double hullHeat = this.getHullHeat(stack);
if(hullHeat <= heat)
return 0;
double ret = (hullHeat - heat) / 2; //TODO: replace this with an euler func that employs our old buddy diffusion
hullHeat -= ret;
this.setHullHeat(stack, hullHeat);
return ret;
}
/**

View File

@ -1238,11 +1238,15 @@ public class ClientProxy extends ServerProxy {
}
if("rbmkflame".equals(type)) {
int maxAge = data.getInteger("maxAge");
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRBMKFlame(man, world, x, y, z, maxAge));
}
if("rbmkmush".equals(type)) {
float scale = data.getFloat("scale");
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRBMKMush(man, world, x, y, z, scale));
}
if("anim".equals(type)) {
if("crucible".equals(data.getString("mode")) && player.getHeldItem() != null) {

View File

@ -6,9 +6,7 @@ import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager;
@ -26,6 +24,7 @@ public class ParticleRBMKFlame extends EntityFX {
super(world, x, y, z);
this.theRenderEngine = texman;
this.particleMaxAge = maxAge;
this.particleScale = rand.nextFloat() + 1F;
}
public int getFXLayer() {
@ -71,7 +70,7 @@ public class ParticleRBMKFlame extends EntityFX {
this.particleAlpha = (this.particleMaxAge - this.particleAge) / 20F;
}
this.particleScale = 1;
this.particleAlpha *= 0.5F;
tess.setColorRGBA_F(1.0F, 1.0F, 1.0F, this.particleAlpha);

View File

@ -0,0 +1,97 @@
package com.hbm.particle;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
//gracefully copy-pasted from xR
@SideOnly(Side.CLIENT)
public class ParticleRBMKMush extends EntityFX {
private static final ResourceLocation texture = new ResourceLocation(com.hbm.lib.RefStrings.MODID + ":textures/particle/rbmk_mush.png");
private TextureManager theRenderEngine;
private int age;
private int maxAge;
public ParticleRBMKMush(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_, float scale) {
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
theRenderEngine = p_i1213_1_;
maxAge = 50;
this.particleRed = this.particleGreen = this.particleBlue = 0;
this.particleScale = scale;
}
public ParticleRBMKMush(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_, float red, float green, float blue, float scale) {
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
theRenderEngine = p_i1213_1_;
maxAge = 50;
this.particleRed = red;
this.particleGreen = green;
this.particleBlue = blue;
this.particleScale = scale;
}
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
++this.age;
if(this.age == this.maxAge) {
this.setDead();
}
}
public int getFXLayer() {
return 3;
}
public void renderParticle(Tessellator tessellaator, float p_70539_2_, float x, float y, float z, float sx, float sz) {
this.theRenderEngine.bindTexture(texture);
int segs = 30;
// the size of one frame
double frame = 1D / (double) segs;
// how many frames we're in
int prog = age * segs / maxAge;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDepthMask(false);
RenderHelper.disableStandardItemLighting();
tessellaator.startDrawingQuads();
tessellaator.setNormal(0.0F, 1.0F, 0.0F);
tessellaator.setBrightness(240);
float scale = this.particleScale;
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double) p_70539_2_ - interpPosX));
float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double) p_70539_2_ - interpPosY)) + particleScale;
float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double) p_70539_2_ - interpPosZ));
tessellaator.addVertexWithUV((double) (pX - x * scale - sx * scale), (double) (pY - y * scale), (double) (pZ - z * scale - sz * scale), 1, (prog + 1) * frame);
tessellaator.addVertexWithUV((double) (pX - x * scale + sx * scale), (double) (pY + y * scale), (double) (pZ - z * scale + sz * scale), 1, prog * frame);
tessellaator.addVertexWithUV((double) (pX + x * scale + sx * scale), (double) (pY + y * scale), (double) (pZ + z * scale + sz * scale), 0, prog * frame);
tessellaator.addVertexWithUV((double) (pX + x * scale - sx * scale), (double) (pY - y * scale), (double) (pZ + z * scale - sz * scale), 0, (prog + 1) * frame);
tessellaator.draw();
GL11.glPolygonOffset(0.0F, 0.0F);
GL11.glEnable(GL11.GL_LIGHTING);
}
}

View File

@ -10,6 +10,8 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.rbmk.RBMKBase;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.NBTPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.tileentity.INBTPacketReceiver;
@ -243,10 +245,17 @@ public abstract class TileEntityRBMKBase extends TileEntity implements INBTPacke
if(i <= 4 - reduce) {
if(reduce > 1 && i == 4 - reduce && worldObj.rand.nextInt(3) == 0)
worldObj.setBlock(xCoord, yCoord + i, zCoord, ModBlocks.corium_block);
else
if(reduce > 1 && i == 4 - reduce) {
if(worldObj.rand.nextInt(3) == 0) {
worldObj.setBlock(xCoord, yCoord + i, zCoord, ModBlocks.corium_block);
} else {
worldObj.setBlock(xCoord, yCoord + i, zCoord, ModBlocks.pribris_burning);
}
} else {
worldObj.setBlock(xCoord, yCoord + i, zCoord, ModBlocks.pribris);
}
} else {
worldObj.setBlock(xCoord, yCoord + i, zCoord, Blocks.air);
@ -291,6 +300,16 @@ public abstract class TileEntityRBMKBase extends TileEntity implements INBTPacke
rbmk.onMelt(minDist + 1);
}
int smallDim = Math.min(maxX - minX, maxZ - minZ);
int avgX = minX + (maxX - minX) / 2;
int avgZ = minZ + (maxZ - minZ) / 2;
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "rbmkmush");
data.setFloat("scale", smallDim);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, avgX + 0.5, yCoord + 1, avgZ + 0.5), new TargetPoint(worldObj.provider.dimensionId,avgX + 0.5, yCoord + 1, avgZ + 0.5, 250));
MainRegistry.proxy.effectNT(data);
}
private void getFF(int x, int y, int z) {

View File

@ -2,6 +2,10 @@ package com.hbm.tileentity.machine.rbmk;
import com.hbm.tileentity.TileEntityMachineBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityRBMKConsole extends TileEntityMachineBase {
public TileEntityRBMKConsole() {
@ -17,4 +21,15 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase {
public void updateEntity() {
}
@Override
public AxisAlignedBB getRenderBoundingBox() {
return AxisAlignedBB.getBoundingBox(xCoord - 2, yCoord, zCoord - 2, xCoord + 3, yCoord + 4, zCoord + 3);
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
}

View File

@ -45,6 +45,9 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
double fluxOut = rod.burn(slots[0], fluxIn);
NType rType = rod.rType;
rod.updateHeat(slots[0]);
this.heat += rod.provideHeat(slots[0], heat);
//for spreading, we want the buffered flux to be 0 because we want to know exactly how much gets reflected back
this.fluxFast = 0;
this.fluxSlow = 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB