mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
finished pile, bullet part anvil recipes
This commit is contained in:
parent
7a24c74435
commit
0cbdba9665
@ -50,7 +50,7 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
||||
player.addChatComponentMessage(new ChatComponentText("CP1 FUEL ASSEMBLY " + x + " " + y + " " + z).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
|
||||
player.addChatComponentMessage(new ChatComponentText("HEAT: " + pile.heat + "/" + pile.maxHeat).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
player.addChatComponentMessage(new ChatComponentText("DEPLETION: " + pile.progress + "/" + pile.maxProgress).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
player.addChatComponentMessage(new ChatComponentText("FLUX: " + pile.neutrons).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
player.addChatComponentMessage(new ChatComponentText("FLUX: " + pile.lastNeutrons).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -58,6 +58,8 @@ public class BlockGraphiteRod extends BlockGraphiteDrilledBase implements IToola
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
||||
|
||||
world.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.click", 0.3F, pureMeta == oldMeta ? 0.75F : 0.65F);
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(pureMeta);
|
||||
|
||||
if(dir == ForgeDirection.UNKNOWN)
|
||||
|
||||
@ -309,25 +309,6 @@ public class WeaponRecipes {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_fireext_foam, 1), new Object[] { " N ", "NFN", " N ", 'N', "dustSaltpeter", 'F', ModItems.ammo_fireext }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_fireext_sand, 1), new Object[] { "NNN", "NFN", "NNN", 'N', ModBlocks.sand_boron, 'F', ModItems.ammo_fireext });
|
||||
|
||||
//Casings
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_357, 1), new Object[] { " P ", " ", "P P", 'P', "plateCopper" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_44, 1), new Object[] { "P", " ", "P", 'P', "plateCopper" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_9, 1), new Object[] { "P", "P", 'P', "plateCopper" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_50, 1), new Object[] { " P ", " P ", "PPP", 'P', "plateCopper" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_buckshot, 1), new Object[] { "P P", "PPP", 'P', "plateCopper" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_357, 1), new Object[] { " P ", " ", "P P", 'P', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_44, 1), new Object[] { "P", " ", "P", 'P', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_9, 1), new Object[] { "P", "P", 'P', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_50, 1), new Object[] { " P ", " P ", "PPP", 'P', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.casing_buckshot, 1), new Object[] { "P P", "PPP", 'P', "plateIron" }));
|
||||
|
||||
//Primers
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.primer_357, 1), new Object[] { "R", "P", 'P', "plateIron", 'R', "dustRedstone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.primer_44, 1), new Object[] { "P", "R", 'P', "plateIron", 'R', "dustRedstone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.primer_9, 1), new Object[] { "R", "P", 'P', "plateAluminum", 'R', "dustRedstone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.primer_50, 1), new Object[] { "P", "R", 'P', "plateAluminum", 'R', "dustRedstone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.primer_buckshot, 1), new Object[] { "R", "P", 'P', "plateCopper", 'R', "dustRedstone" }));
|
||||
|
||||
//Turrets
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_light_ammo, 1), new Object[] { " L ", "IGI", "ICI", 'L', "plateLead", 'I', "plateIron", 'C', "plateCopper", 'G', Items.gunpowder }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_heavy_ammo, 1), new Object[] { "LGC", "LGC", "LGC", 'L', "plateLead", 'C', "plateCopper", 'G', Items.gunpowder }));
|
||||
|
||||
@ -201,6 +201,17 @@ public class AnvilRecipes {
|
||||
|
||||
public static void registerConstructionAmmo() {
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack("plateCopper"), new AnvilOutput(new ItemStack(ModItems.casing_357))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack("plateCopper"), new AnvilOutput(new ItemStack(ModItems.casing_44))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack("plateCopper"), new AnvilOutput(new ItemStack(ModItems.casing_9))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack("plateCopper"), new AnvilOutput(new ItemStack(ModItems.casing_50))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack("plateCopper"), new AnvilOutput(new ItemStack(ModItems.casing_buckshot))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] {new OreDictStack("plateIron"), new ComparableStack(Items.redstone)}, new AnvilOutput(new ItemStack(ModItems.primer_357))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] {new OreDictStack("plateIron"), new ComparableStack(Items.redstone)}, new AnvilOutput(new ItemStack(ModItems.primer_44))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] {new OreDictStack("plateIron"), new ComparableStack(Items.redstone)}, new AnvilOutput(new ItemStack(ModItems.primer_9))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] {new OreDictStack("plateIron"), new ComparableStack(Items.redstone)}, new AnvilOutput(new ItemStack(ModItems.primer_50))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] {new OreDictStack("plateIron"), new ComparableStack(Items.redstone)}, new AnvilOutput(new ItemStack(ModItems.primer_buckshot))).setTier(1));
|
||||
|
||||
Object[][] recs = new Object[][] {
|
||||
{ModItems.ammo_12gauge, ModItems.powder_fire, ModItems.ammo_12gauge_incendiary, 20, 2},
|
||||
{ModItems.ammo_12gauge, Item.getItemFromBlock(ModBlocks.gravel_obsidian), ModItems.ammo_12gauge_shrapnel, 20, 2},
|
||||
|
||||
@ -3380,10 +3380,10 @@ public class ModItems {
|
||||
rod_dual_tritium = new ItemHazard(1F).setUnlocalizedName("rod_dual_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_tritium");
|
||||
rod_quad_tritium = new ItemHazard(2F).setUnlocalizedName("rod_quad_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_tritium");
|
||||
|
||||
pile_rod_uranium = new Item().setUnlocalizedName("pile_rod_uranium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_uranium");
|
||||
pile_rod_plutonium = new Item().setUnlocalizedName("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_plutonium");
|
||||
pile_rod_source = new Item().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source");
|
||||
pile_rod_boron = new Item().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron");
|
||||
pile_rod_uranium = new ItemPileRod().setUnlocalizedName("pile_rod_uranium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_uranium");
|
||||
pile_rod_plutonium = new ItemPileRod().setUnlocalizedName("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_plutonium");
|
||||
pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source");
|
||||
pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron");
|
||||
|
||||
rbmk_lid = new ItemRBMKLid().setUnlocalizedName("rbmk_lid").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_lid");
|
||||
rbmk_lid_glass = new ItemRBMKLid().setUnlocalizedName("rbmk_lid_glass").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rbmk_lid_glass");
|
||||
|
||||
35
src/main/java/com/hbm/items/machine/ItemPileRod.java
Normal file
35
src/main/java/com/hbm/items/machine/ItemPileRod.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemPileRod extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "Use on drilled graphite to insert");
|
||||
list.add(EnumChatFormatting.YELLOW + "Use screwdriver to extract");
|
||||
list.add("");
|
||||
|
||||
if(this == ModItems.pile_rod_uranium) {
|
||||
list.add(EnumChatFormatting.GREEN + "[Reactive Fuel]");
|
||||
list.add(EnumChatFormatting.YELLOW + "Use hand drill to take core sample");
|
||||
}
|
||||
|
||||
if(this == ModItems.pile_rod_boron) {
|
||||
list.add(EnumChatFormatting.BLUE + "[Neutron Absorber]");
|
||||
list.add(EnumChatFormatting.YELLOW + "Click to toggle");
|
||||
}
|
||||
|
||||
if(this == ModItems.pile_rod_source || this == ModItems.pile_rod_plutonium) {
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "[Neutron Source]");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,9 @@ import com.hbm.crafting.*;
|
||||
import com.hbm.crafting.handlers.*;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.AnvilRecipes.AnvilConstructionRecipe;
|
||||
import com.hbm.inventory.AnvilRecipes.AnvilOutput;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.items.special.ItemHot;
|
||||
@ -1016,6 +1019,12 @@ public class CraftingManager {
|
||||
GameRegistry.addSmelting(ModItems.crystal_trixite, new ItemStack(ModItems.ingot_plutonium, 4), 2.0F);
|
||||
GameRegistry.addSmelting(ModItems.crystal_cinnebar, new ItemStack(ModItems.cinnebar, 4), 2.0F);
|
||||
|
||||
GameRegistry.addSmelting(ModItems.casing_357, new ItemStack(ModItems.ingot_copper), 0.1F);
|
||||
GameRegistry.addSmelting(ModItems.casing_44, new ItemStack(ModItems.ingot_copper), 0.1F);
|
||||
GameRegistry.addSmelting(ModItems.casing_9, new ItemStack(ModItems.ingot_copper), 0.1F);
|
||||
GameRegistry.addSmelting(ModItems.casing_50, new ItemStack(ModItems.ingot_copper), 0.1F);
|
||||
GameRegistry.addSmelting(ModItems.casing_buckshot, new ItemStack(ModItems.ingot_copper), 0.1F);
|
||||
|
||||
GameRegistry.addSmelting(ModItems.circuit_schrabidium, new ItemStack(ModItems.circuit_gold, 1), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.circuit_gold, new ItemStack(ModItems.circuit_red_copper, 1), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.circuit_red_copper, new ItemStack(ModItems.circuit_copper, 1), 1.0F);
|
||||
|
||||
@ -17,8 +17,6 @@ public class RenderTurretChekhov extends RenderTurretBase {
|
||||
TileEntityTurretChekhov turret = (TileEntityTurretChekhov)te;
|
||||
Vec3 pos = turret.getHorizontalOffset();
|
||||
|
||||
ResourceManager.test_shader.use();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + pos.xCoord, y, z + pos.zCoord);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
@ -52,7 +50,5 @@ public class RenderTurretChekhov extends RenderTurretBase {
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
ResourceManager.test_shader.release();
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ public class TileEntityReactorControl extends TileEntity implements ISidedInvent
|
||||
|
||||
hullHeat = reactor.hullHeat;
|
||||
coreHeat = reactor.coreHeat;
|
||||
fuel = reactor.fuel * 100 / Math.min(1, reactor.maxFuel);
|
||||
fuel = reactor.fuel * 100 / Math.max(1, reactor.maxFuel);
|
||||
water = reactor.tanks[0].getFill();
|
||||
cool = reactor.tanks[1].getFill();
|
||||
steam = reactor.tanks[2].getFill();
|
||||
|
||||
@ -51,8 +51,13 @@ public abstract class TileEntityPileBase extends TileEntity {
|
||||
TileEntity te = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(te instanceof IPileNeutronReceiver) {
|
||||
|
||||
//this part throttles neutron efficiency for reactions that are way too close, efficiency reaches 100% after 2.5 meters
|
||||
float mult = Math.min((float)range / 2.5F, 1F);
|
||||
int n = (int)(flux * mult);
|
||||
|
||||
IPileNeutronReceiver rec = (IPileNeutronReceiver) te;
|
||||
rec.receiveNeutrons(flux);
|
||||
rec.receiveNeutrons(n);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,10 +3,8 @@ package com.hbm.tileentity.machine.pile;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import api.hbm.block.IPileNeutronReceiver;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutronReceiver {
|
||||
|
||||
@ -36,13 +34,16 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr
|
||||
}
|
||||
|
||||
private void dissipateHeat() {
|
||||
this.heat -= heat * 0.025; //remove 2.5% of the stored heat per tick
|
||||
this.heat -= heat * 0.05; //remove 5% of the stored heat per tick
|
||||
}
|
||||
|
||||
private void react() {
|
||||
|
||||
int reaction = (int) (this.neutrons * (1D - ((double)this.heat / (double)this.maxHeat) * 0.5D)); //max heat reduces reaction by 50% due to thermal expansion
|
||||
|
||||
this.lastNeutrons = this.neutrons;
|
||||
this.neutrons = 0;;
|
||||
|
||||
this.progress += reaction;
|
||||
|
||||
if(reaction <= 0)
|
||||
@ -50,11 +51,8 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr
|
||||
|
||||
this.heat += reaction;
|
||||
|
||||
for(int i = 0; i < 6; i++)
|
||||
this.castRay(reaction, 5);
|
||||
|
||||
this.lastNeutrons = this.neutrons;
|
||||
this.neutrons = 0;
|
||||
for(int i = 0; i < 16; i++)
|
||||
this.castRay((int) Math.max(reaction * 0.25, 1), 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
package com.hbm.tileentity.machine.pile;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
public class TileEntityPileSource extends TileEntityPileBase {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
for(int i = 0; i < 6; i++) {
|
||||
this.castRay(5, 5);
|
||||
|
||||
int n = this.getBlockType() == ModBlocks.block_graphite_source ? 1 : 3;
|
||||
|
||||
for(int i = 0; i < 16; i++) {
|
||||
this.castRay(n, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
Loading…
x
Reference in New Issue
Block a user