diff --git a/src/main/java/com/hbm/handler/nei/SILEXRecipeHandler.java b/src/main/java/com/hbm/handler/nei/SILEXRecipeHandler.java index efedb31f1..cc1dba5b5 100644 --- a/src/main/java/com/hbm/handler/nei/SILEXRecipeHandler.java +++ b/src/main/java/com/hbm/handler/nei/SILEXRecipeHandler.java @@ -10,8 +10,12 @@ import java.util.Map; import com.hbm.inventory.gui.GUISILEX; import com.hbm.inventory.recipes.SILEXRecipes; import com.hbm.inventory.recipes.SILEXRecipes.SILEXRecipe; +import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; import com.hbm.lib.RefStrings; +import com.hbm.util.I18nUtil; import com.hbm.util.WeightedRandomObject; +import com.hbm.inventory.RecipesCommon.ComparableStack; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; @@ -19,7 +23,9 @@ import codechicken.nei.recipe.TemplateRecipeHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; public class SILEXRecipeHandler extends TemplateRecipeHandler { @@ -34,6 +40,7 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler { List outputs; List chances; double produced; + EnumWavelengths crystalStrength; public RecipeSet(Object input, SILEXRecipe recipe) { @@ -41,6 +48,7 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler { this.outputs = new ArrayList(); this.chances = new ArrayList(); this.produced = recipe.fluidProduced / recipe.fluidConsumed; + this.crystalStrength = EnumWavelengths.values()[recipe.laserStrength]; double weight = 0; @@ -141,7 +149,7 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler { if(recipe.getKey() instanceof ItemStack) { - if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey())) + if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey())) this.arecipes.add(new RecipeSet(recipe.getKey(), recipe.getValue())); } else if (recipe.getKey() instanceof ArrayList) { @@ -149,7 +157,7 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler { for(Object o : (ArrayList)recipe.getKey()) { ItemStack stack = (ItemStack)o; - if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack)) + if (NEIServerUtils.areStacksSameType(ingredient, stack)) this.arecipes.add(new RecipeSet(stack, recipe.getValue())); } } @@ -174,6 +182,12 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler { RecipeSet rec = (RecipeSet) this.arecipes.get(recipe); FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; + + /*int index = 0; + for(Double chance : rec.chances) { + fontRenderer.drawString(((int)(chance * 10D) / 10D) + "%", 84, 28 + index * 18 - 9 * ((rec.chances.size() + 1) / 2), 0x404040); + index++; + }*/ for(int i = 0; i < rec.chances.size(); i++) { @@ -186,6 +200,11 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler { String am = ((int)(rec.produced * 10D) / 10D) + "x"; fontRenderer.drawString(am, 52 - fontRenderer.getStringWidth(am) / 2, 43, 0x404040); + + String wavelength = (rec.crystalStrength == EnumWavelengths.NULL) ? EnumChatFormatting.WHITE+"N/A" : rec.crystalStrength.textColor + I18nUtil.resolveKey(rec.crystalStrength.name); + fontRenderer.drawString(wavelength, (33 - fontRenderer.getStringWidth(wavelength) / 2), 8, 0x404040); + + } @Override @@ -197,4 +216,4 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler { public String getGuiTexture() { return RefStrings.MODID + ":textures/gui/nei/gui_nei_silex.png"; } -} +} \ No newline at end of file diff --git a/src/main/java/com/hbm/inventory/gui/GUIFEL.java b/src/main/java/com/hbm/inventory/gui/GUIFEL.java index 3365d8759..12bac9043 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIFEL.java +++ b/src/main/java/com/hbm/inventory/gui/GUIFEL.java @@ -1,10 +1,11 @@ package com.hbm.inventory.gui; -import org.apache.commons.lang3.math.NumberUtils; -import org.lwjgl.input.Keyboard; +import java.awt.Color; + import org.lwjgl.opengl.GL11; import com.hbm.inventory.container.ContainerFEL; +import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; import com.hbm.lib.RefStrings; import com.hbm.packet.AuxButtonPacket; import com.hbm.packet.PacketDispatcher; @@ -13,87 +14,54 @@ import com.hbm.tileentity.machine.TileEntityFEL; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; public class GUIFEL extends GuiInfoContainer { public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_fel.png"); private TileEntityFEL fel; - private GuiTextField field; public GUIFEL(InventoryPlayer invPlayer, TileEntityFEL laser) { super(new ContainerFEL(invPlayer, laser)); this.fel = laser; - this.xSize = 176; - this.ySize = 168; + this.xSize = 203; + this.ySize = 169; } - - @Override - public void initGui() { - super.initGui(); - - Keyboard.enableRepeatEvents(true); - this.field = new GuiTextField(this.fontRendererObj, guiLeft + 57, guiTop + 57, 29, 12); - this.field.setTextColor(-1); - this.field.setDisabledTextColour(-1); - this.field.setEnableBackgroundDrawing(false); - this.field.setMaxStringLength(3); - this.field.setText(String.valueOf(fel.watts)); - } - + @Override public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 16, 18, 9, mouseX, mouseY, new String[] {"Microwave"}); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 25, 18, 9, mouseX, mouseY, new String[] {"Infrared"}); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 34, 18, 9, mouseX, mouseY, new String[] {"Visible Light"}); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 43, 18, 9, mouseX, mouseY, new String[] {"UV"}); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 52, 18, 9, mouseX, mouseY, new String[] {"X-Ray"}); - this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 61, 18, 9, mouseX, mouseY, new String[] {"Gamma Ray"}); - this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 17, 16, 52, fel.power, fel.maxPower); + this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 182, guiTop + 27, 16, 113, fel.power, fel.maxPower); } protected void mouseClicked(int x, int y, int i) { super.mouseClicked(x, y, i); - this.field.mouseClicked(x, y, i); - - if(guiLeft + 97 <= x && guiLeft + 97 + 18 > x && guiTop + 52 < y && guiTop + 52 + 18 >= y) { - - if(NumberUtils.isNumber(field.getText())) { - int j = MathHelper.clamp_int((int) Double.parseDouble(field.getText()), 1, 100); - field.setText(j + ""); - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(fel.xCoord, fel.yCoord, fel.zCoord, j, 1)); - } - } - - if(guiLeft + 97 <= x && guiLeft + 97 + 18 > x && guiTop + 16 < y && guiTop + 16 + 18 >= y) { + if(guiLeft + 142 <= x && guiLeft + 142 + 29 > x && guiTop + 41 < y && guiTop + 41 + 17 >= y) { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(fel.xCoord, fel.yCoord, fel.zCoord, 0, 2)); } - for(int k = 0; k < 6; k++) { - - if(guiLeft + 133 <= x && guiLeft + 133 + 18 > x && guiTop + 16 + k * 9 < y && guiTop + 16 + k * 9 + 9 >= y) { - mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); - PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(fel.xCoord, fel.yCoord, fel.zCoord, k, 0)); - } - } } @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.fel.hasCustomInventoryName() ? this.fel.getInventoryName() : I18n.format(this.fel.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); - this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + this.fontRendererObj.drawString(name, 90 + this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 7, 0xffffff); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 98, 4210752); + + if(fel.missingValidSilex && fel.isOn) { + this.fontRendererObj.drawString(I18n.format("ERR."), 55 + this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 9, 0xFF0000); + } else if(fel.isOn) { + this.fontRendererObj.drawString(I18n.format("LIVE"), 54 + this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 9, 0x00FF00); + } + } @Override @@ -101,29 +69,39 @@ public class GUIFEL extends GuiInfoContainer { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - - if(field.isFocused()) - drawTexturedModalRect(guiLeft + 53, guiTop + 53, 210, 4, 34, 16); - + if(fel.isOn) - drawTexturedModalRect(guiLeft + 97, guiTop + 16, 192, 0, 18, 18); + drawTexturedModalRect(guiLeft + 142, guiTop + 41, 203, 0, 29, 17); - int mode = fel.mode; - drawTexturedModalRect(guiLeft + 133, guiTop + 16 + mode * 9, 176, 52 + mode * 9, 18, 9); + int k = (int)fel.getPowerScaled(114); + drawTexturedModalRect(guiLeft + 182, guiTop + 27 + 113 - k, 203, 17 + 113 - k, 16, k); - int i = (int) fel.getPowerScaled(52); - drawTexturedModalRect(guiLeft + 8, guiTop + 69 - i, 176, 52 - i, 16, i); - - drawTexturedModalRect(guiLeft + 53, guiTop + 45, 210, 0, fel.watts * 34 / 100, 4); + int color = !(fel.mode == EnumWavelengths.VISIBLE) ? fel.mode.guiColor : Color.HSBtoRGB(fel.getWorldObj().getTotalWorldTime() / 50.0F, 0.5F, 1F) & 16777215; - this.field.drawTextBox(); - } - - @Override - protected void keyTyped(char c, int key) { - - if(!this.field.textboxKeyTyped(c, key)) { - super.keyTyped(c, key); + if(fel.power > fel.powerReq * Math.pow(2, fel.mode.ordinal()) && fel.isOn && !(fel.mode == EnumWavelengths.NULL) && fel.distance > 0) { + + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glLineWidth(5F); + + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawing(1); + tessellator.setColorOpaque_I(color); + + tessellator.addVertex(guiLeft + 113, guiTop + 31.5F, this.zLevel); + tessellator.addVertex(guiLeft + 135, guiTop + 31.5F, this.zLevel); + tessellator.draw(); + + tessellator.startDrawing(1); + tessellator.setColorOpaque_I(color); + + tessellator.addVertex(0, guiTop + 31.5F, this.zLevel); + tessellator.addVertex(guiLeft + 4, guiTop + 31.5F, this.zLevel); + tessellator.draw(); + + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glPopMatrix(); } - } -} + } +} \ No newline at end of file diff --git a/src/main/java/com/hbm/inventory/gui/GUISILEX.java b/src/main/java/com/hbm/inventory/gui/GUISILEX.java index ff2f7604c..8de55b89a 100644 --- a/src/main/java/com/hbm/inventory/gui/GUISILEX.java +++ b/src/main/java/com/hbm/inventory/gui/GUISILEX.java @@ -1,16 +1,21 @@ package com.hbm.inventory.gui; +import java.awt.Color; + import org.lwjgl.opengl.GL11; import com.hbm.inventory.container.ContainerSILEX; import com.hbm.inventory.fluid.Fluids; +import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; import com.hbm.lib.RefStrings; import com.hbm.packet.AuxButtonPacket; import com.hbm.packet.PacketDispatcher; import com.hbm.tileentity.machine.TileEntitySILEX; +import com.hbm.util.I18nUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; @@ -19,6 +24,7 @@ public class GUISILEX extends GuiInfoContainer { public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_silex.png"); private TileEntitySILEX silex; + int offset = 0; public GUISILEX(InventoryPlayer invPlayer, TileEntitySILEX laser) { super(new ContainerSILEX(invPlayer, laser)); @@ -32,7 +38,7 @@ public class GUISILEX extends GuiInfoContainer { public void drawScreen(int mouseX, int mouseY, float f) { super.drawScreen(mouseX, mouseY, f); - silex.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 54, 52, 7); + silex.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 42, 52, 7); if(silex.current != null) { this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 27, guiTop + 72, 16, 52, mouseX, mouseY, new String[] { silex.currentFill + "/" + silex.maxFill + "mB", silex.current.toStack().getDisplayName() }); @@ -41,6 +47,7 @@ public class GUISILEX extends GuiInfoContainer { this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 10, guiTop + 92, 10, 10, mouseX, mouseY, new String[] { "Void contents" }); } + @Override protected void mouseClicked(int x, int y, int i) { super.mouseClicked(x, y, i); @@ -55,22 +62,33 @@ public class GUISILEX extends GuiInfoContainer { protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.silex.hasCustomInventoryName() ? this.silex.getInventoryName() : I18n.format(this.silex.getInventoryName()); - this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(name, (this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2) - 54, 8, 4210752); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + + if(silex.mode != EnumWavelengths.NULL) { + this.fontRendererObj.drawString(silex.mode.textColor + I18nUtil.resolveKey(silex.mode.name), 100 + (32 - this.fontRendererObj.getStringWidth(I18nUtil.resolveKey(silex.mode.name)) / 2), 16, 0); + } } @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + if(silex.mode != EnumWavelengths.NULL) { + float freq = 0.1F * (float)Math.pow(2, silex.mode.ordinal()); + int color = (silex.mode != EnumWavelengths.VISIBLE) ? silex.mode.guiColor : Color.HSBtoRGB(silex.getWorldObj().getTotalWorldTime() / 50.0F, 0.5F, 1F) & 16777215; + drawWave(81, 46, 16, 84, 0.5F, freq, color, 3F, 1F); + } + if(silex.tank.getFill() > 0) { if(silex.tank.getTankType() == Fluids.ACID || silex.fluidConversion.containsKey(silex.tank.getTankType())) { - drawTexturedModalRect(guiLeft + 43, guiTop + 53, 176, 118, 54, 9); + drawTexturedModalRect(guiLeft + 7, guiTop + 41, 176, 118, 54, 9); } else { - drawTexturedModalRect(guiLeft + 43, guiTop + 53, 176, 109, 54, 9); + drawTexturedModalRect(guiLeft + 7, guiTop + 41, 176, 109, 54, 9); } } @@ -81,6 +99,40 @@ public class GUISILEX extends GuiInfoContainer { drawTexturedModalRect(guiLeft + 26, guiTop + 124 - f, 176, 109 - f, 16, f); int i = silex.getFluidScaled(52); - drawTexturedModalRect(guiLeft + 44, guiTop + 54, 176, silex.tank.getTankType() == Fluids.ACID ? 43 : 50, i, 7); + drawTexturedModalRect(guiLeft + 8, guiTop + 42, 176, silex.tank.getTankType() == Fluids.ACID ? 43 : 50, i, 7); } -} + + private void drawWave(int x, int y, int height, int width, float resolution, float freq, int color, float thickness, float mult) { + float samples = ((float)width) / resolution; + float scale = ((float)height)/2F; + float offset = (float)((float)silex.getWorldObj().getTotalWorldTime() % (4*Math.PI/freq));//((width/3)*Math.PI/3));//(2.05F*width*freq)); + for(int i = 1; i < samples; i++) { + double currentX = offset + x + i*resolution; + double nextX = offset + x + (i+1)*resolution; + double currentY = y + scale*Math.sin(freq*currentX); + double nextY = y + scale*Math.sin(freq*nextX); + drawLine(thickness, color, currentX-offset, currentY, nextX-offset, nextY); + + + } + } + + private void drawLine(float width, int color, double x1, double y1, double x2, double y2) { + + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glLineWidth(width); + + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawing(1); + tessellator.setColorOpaque_I(color); + + tessellator.addVertex(guiLeft + x1, guiTop + y1, this.zLevel); + tessellator.addVertex(guiLeft + x2, guiTop + y2, this.zLevel); + tessellator.draw(); + + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glPopMatrix(); + } +} \ No newline at end of file diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index 34e7da34a..167cbd124 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -738,6 +738,18 @@ public class AssemblerRecipes { new ComparableStack(ModItems.crystal_diamond, 1) }, 400); + makeRecipe(new ComparableStack(Item.getItemFromBlock(ModBlocks.machine_fel), 1), new AStack[] { + new ComparableStack(ModBlocks.fusion_conductor, 16), + new ComparableStack(ModBlocks.machine_lithium_battery, 2), + new OreDictStack(STEEL.ingot(), 16), + new OreDictStack(STEEL.plate(), 24), + new OreDictStack(POLYMER.ingot(), 8), + new ComparableStack(ModItems.circuit_red_copper, 4), + new ComparableStack(ModItems.wire_red_copper, 64), + new ComparableStack(ModItems.coil_advanced_torus, 16), + new ComparableStack(ModItems.circuit_gold, 1) + }, 400); + makeRecipe(new ComparableStack(ModBlocks.rbmk_blank, 1), new AStack[] { new ComparableStack(ModBlocks.concrete_asbestos, 4), new OreDictStack(STEEL.plate(), 4), diff --git a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java index 94ce516ec..87b47a478 100644 --- a/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/SILEXRecipes.java @@ -28,68 +28,68 @@ public class SILEXRecipes { itemTranslation.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.UF6.getID()), new ComparableStack(ModItems.ingot_uranium)); dictTranslation.put("dustUranium", "ingotUranium"); - recipes.put("ingotUranium", new SILEXRecipe(900, 100) + recipes.put("ingotUranium", new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 11)) ); - recipes.put(new ComparableStack(ModItems.ingot_pu_mix), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.ingot_pu_mix), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 6)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 3)) ); - recipes.put(new ComparableStack(ModItems.ingot_am_mix), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.ingot_am_mix), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am241), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am242), 6)) ); itemTranslation.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.PUF6.getID()), new ComparableStack(ModItems.ingot_plutonium)); dictTranslation.put("dustPlutonium", "ingotPlutonium"); - recipes.put("ingotPlutonium", new SILEXRecipe(900, 100) + recipes.put("ingotPlutonium", new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 4)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 2)) ); - recipes.put(new ComparableStack(ModItems.ingot_schraranium), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.ingot_schraranium), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_schrabidium), 4)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium), 2)) ); itemTranslation.put(new ComparableStack(ModItems.powder_australium), new ComparableStack(ModItems.ingot_australium)); - recipes.put(new ComparableStack(ModItems.ingot_australium), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.ingot_australium), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_australium_lesser), 5)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_australium_greater), 1)) ); - recipes.put(new ComparableStack(ModItems.crystal_schraranium), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.crystal_schraranium), new SILEXRecipe(900, 100, 3) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_schrabidium), 5)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium), 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium), 2)) ); itemTranslation.put(new ComparableStack(ModItems.powder_lapis), new ComparableStack(Items.dye, 1, 4)); - recipes.put(new ComparableStack(Items.dye, 1, 4), new SILEXRecipe(100, 100) + recipes.put(new ComparableStack(Items.dye, 1, 4), new SILEXRecipe(100, 100 ,1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.sulfur), 4)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_aluminium), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cobalt), 3)) ); - recipes.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.DEATH.getID()), new SILEXRecipe(1000, 1000) + recipes.put(new ComparableStack(ModItems.fluid_icon, 1, Fluids.DEATH.getID()), new SILEXRecipe(1000, 1000, 4) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_impure_osmiridium), 1)) ); for(int i = 0; i < 5; i++) { // UEU // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 88 - i * 6)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 8 - i * 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 3 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 2 + 5 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_ueu, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 88 - i * 6)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 8 - i * 2)) @@ -97,116 +97,116 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 1 + 5 * i)) ); // MEU // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_meu, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_meu, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium_fuel), 90 - i * 12)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 5 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 6 + 7 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_meu, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_meu, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium_fuel), 89 - i * 12)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 5 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 6 + 7 * i)) ); // HEU233 // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu233, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu233, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u233), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), 4 + 8 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), 6 + 12 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu233, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu233, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u233), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), 4 + 8 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), 6 + 12 * i)) ); // HEU235 // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu235, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu235, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 8 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 6 + 12 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu235, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_heu235, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 4 + 8 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 6 + 12 * i)) ); // TH232 // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_thmeu, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_thmeu, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_thorium_fuel), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), 10 + 20 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_thmeu, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_thmeu, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_thorium_fuel), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), 10 + 20 * i)) ); // LEP // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_lep, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_lep, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium_fuel), 90 - i * 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 7 + 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 3 + 5 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_lep, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_lep, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_plutonium_fuel), 89 - i * 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 7 + 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 3 + 5 * i)) ); // MEP // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_mep, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_mep, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu_mix), 85 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 10 + 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 5 + 5 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_mep, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_mep, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu_mix), 84 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 10 + 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 5 + 5 * i)) ); // HEP239 // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep239, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep239, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 85 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 15 + 20 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep239, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep239, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 84 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 15 + 20 * i)) ); // HEP241 // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep241, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep241, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 85 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), 15 + 20 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep241, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_hep241, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 84 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), 15 + 20 * i)) ); // MEN // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_men, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_men, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium_fuel), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 4 + 8 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 6 + 12 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_men, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_men, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium_fuel), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), 4 + 8 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), 6 + 12 * i)) ); // MOX // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mox_fuel), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 4 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), 3 + 6 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), 3 + 7 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 2 + 3 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_mox, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mox_fuel), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_long_tiny, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), 2 + 4 * i)) @@ -215,26 +215,26 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_short_tiny, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), 2 + 3 * i)) ); // LEAUS // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_leaus, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_leaus, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_australium_lesser), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 6 + 12 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pb209), 4 + 8 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_leaus, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_leaus, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_australium_lesser), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 6 + 12 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pb209), 4 + 8 * i)) ); // HEAUS // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_heaus, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_heaus, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_australium_lesser), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 5 + 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(Items.gold_nugget), 3 + 6 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pb209), 2 + 4 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_heaus, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_heaus, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_australium_lesser), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 5 + 10 * i)) @@ -242,34 +242,34 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pb209), 2 + 4 * i)) ); // BALEFIRE // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire, 1, i), new SILEXRecipe(400, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire, 1, i), new SILEXRecipe(400, 100, 3) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 90 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 10 + 20 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire, 1, i + 5), new SILEXRecipe(400, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire, 1, i + 5), new SILEXRecipe(400, 100, 3) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 89 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 10 + 20 * i)) ); // FLASHGOLD // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire_gold, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire_gold, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 90 - 20 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 10 + 20 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire_gold, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire_gold, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 89 - 20 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 10 + 20 * i)) ); // FLASHLEAD // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_flashlead, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_flashlead, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 44 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pb209), 44 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 1 + 6 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mercury), 1 + 6 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_gh336), 10 + 8 * i)) ); //Reimumunch - recipes.put(new ComparableStack(ModItems.rbmk_pellet_flashlead, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_flashlead, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 2)) //literal how .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 43 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pb209), 43 - 10 * i)) @@ -278,13 +278,13 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_gh336), 10 + 8 * i)) ); // POBE // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_po210be, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_po210be, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 45 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 5 + 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_po210be, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_po210be, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 44 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i)) @@ -292,14 +292,14 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) ); // PUBE // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_pu238be, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_pu238be, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 45 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 3 + 5 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 2 + 5 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_pu238be, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_pu238be, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 44 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i)) @@ -308,14 +308,14 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) ); // RABE // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_ra226be, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_ra226be, 1, i), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 45 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 3 + 5 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 2 + 5 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_ra226be, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_ra226be, 1, i + 5), new SILEXRecipe(600, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 44 - 10 * i)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i)) @@ -324,7 +324,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) ); // FLASHGOLD // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_drx, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_drx, 1, i), new SILEXRecipe(600, 100, 4) .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) @@ -332,7 +332,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_drx, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_drx, 1, i + 5), new SILEXRecipe(600, 100, 4) .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) @@ -341,13 +341,13 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1)) ); // ZFB BI // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_bismuth, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_bismuth, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium), 50 - i * 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 50 - i * 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 50 + i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 150)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_bismuth, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_bismuth, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_uranium), 50 - i * 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 50 - i * 10)) @@ -355,13 +355,13 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 147)) ); // ZFB PU-241 // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_pu241, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_pu241, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 50 - i * 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 50 - i * 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 50 + i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 150)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_pu241, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_pu241, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 50 - i * 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 50 - i * 10)) @@ -369,37 +369,37 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 147)) ); // ZFB RG-AM // - recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_am_mix, 1, i), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_am_mix, 1, i), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 100 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am_mix), 50 + i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 150)) ); - recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_am_mix, 1, i + 5), new SILEXRecipe(600, 100) + recipes.put(new ComparableStack(ModItems.rbmk_pellet_zfb_am_mix, 1, i + 5), new SILEXRecipe(600, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 3)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 100 - i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am_mix), 50 + i * 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 147)) ); } - recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 45)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 15)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 65)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 15)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 12)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 12)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 56)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.URANIUM235.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 32)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 22)) @@ -408,25 +408,25 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 16)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 25)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 45)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 15)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 60)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 25)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 15)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 4)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 12)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 14)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 60)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.URANIUM233.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 12)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 34)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 13)) @@ -435,7 +435,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 29)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 10)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 25)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 2)) @@ -443,7 +443,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 6)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 52)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM239.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 16)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 40)) @@ -451,7 +451,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 39)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu241), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_neptunium), 5)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 2)) @@ -459,7 +459,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 7)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 66)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM240.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 22)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 20)) @@ -468,7 +468,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 36)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am241), 25)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_am242), 35)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 5)) @@ -476,46 +476,46 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 7)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 25)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.PLUTONIUM241.ordinal()), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 60)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 5)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u233), 40)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u235), 35)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 25)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.THORIUM.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 35)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 40)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 10)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu239), 40)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu240), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_technetium), 15)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 15)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_long_depleted, 1, ItemWasteLong.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 16)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 55)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 20)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 9)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 40)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 7)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_i131_tiny), 5)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_cs137_tiny), 8)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 40)) ); - recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.nuclear_waste_short_depleted, 1, ItemWasteShort.WasteClass.NEPTUNIUM.ordinal()), new SILEXRecipe(900, 100, 1) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_zirconium), 7)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 29)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_u238), 2)) @@ -523,7 +523,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 17)) ); - recipes.put(new ComparableStack(ModItems.fallout, 1), new SILEXRecipe(900, 100) + recipes.put(new ComparableStack(ModItems.fallout, 1), new SILEXRecipe(900, 100, 2) .addOut(new WeightedRandomObject(new ItemStack(ModItems.dust_tiny), 90)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_co60), 2)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_sr90_tiny), 3)) @@ -532,7 +532,7 @@ public class SILEXRecipes { .addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 1)) ); - recipes.put(new ComparableStack(Blocks.gravel, 1), new SILEXRecipe(1000, 250) + recipes.put(new ComparableStack(Blocks.gravel, 1), new SILEXRecipe(1000, 250, 0) .addOut(new WeightedRandomObject(new ItemStack(Items.flint), 80)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_boron), 5)) .addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_lithium), 10)) @@ -623,20 +623,22 @@ public class SILEXRecipes { return recipes; } - public static class SILEXRecipe { +public static class SILEXRecipe { public int fluidProduced; public int fluidConsumed; + public int laserStrength; public List outputs = new ArrayList(); - public SILEXRecipe(int fluidProduced, int fluidConsumed) { + public SILEXRecipe(int fluidProduced, int fluidConsumed, int laserStrength) { this.fluidProduced = fluidProduced; this.fluidConsumed = fluidConsumed; + this.laserStrength = laserStrength; } public SILEXRecipe addOut(WeightedRandomObject entry) { outputs.add(entry); return this; - } + } } } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 0c2fd40ba..419835a58 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -13,6 +13,7 @@ import com.hbm.items.armor.*; import com.hbm.items.bomb.*; import com.hbm.items.food.*; import com.hbm.items.machine.*; +import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType; import com.hbm.items.machine.ItemPlateFuel.FunctionEnum; import com.hbm.items.machine.ItemRBMKRod.EnumBurnFunc; @@ -718,6 +719,12 @@ public class ModItems { public static Item part_carbon; public static Item part_copper; public static Item part_plutonium; + + public static Item laser_crystal_co2; + public static Item laser_crystal_bismuth; + public static Item laser_crystal_cmb; + public static Item laser_crystal_dnt; + public static Item laser_crystal_digamma; public static Item thermo_element; public static Item limiter; @@ -3228,6 +3235,12 @@ public class ModItems { part_copper = new Item().setUnlocalizedName("part_copper").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":part_copper"); part_plutonium = new Item().setUnlocalizedName("part_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":part_plutonium"); + laser_crystal_co2 = new ItemFELCrystal(EnumWavelengths.IR).setUnlocalizedName("laser_crystal_co2").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":laser_crystal_co2"); + laser_crystal_bismuth = new ItemFELCrystal(EnumWavelengths.VISIBLE).setUnlocalizedName("laser_crystal_bismuth").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":laser_crystal_bismuth"); + laser_crystal_cmb = new ItemFELCrystal(EnumWavelengths.UV).setUnlocalizedName("laser_crystal_cmb").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":laser_crystal_cmb"); + laser_crystal_dnt = new ItemFELCrystal(EnumWavelengths.GAMMA).setUnlocalizedName("laser_crystal_dnt").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":laser_crystal_dnt"); + laser_crystal_digamma = new ItemFELCrystal(EnumWavelengths.DRX).setUnlocalizedName("laser_crystal_digamma").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":laser_crystal_digamma"); + thermo_element = new Item().setUnlocalizedName("thermo_element").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":thermo_element"); limiter = new Item().setUnlocalizedName("limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":limiter"); @@ -6443,6 +6456,13 @@ public class ModItems { GameRegistry.registerItem(part_copper, part_copper.getUnlocalizedName()); GameRegistry.registerItem(part_plutonium, part_plutonium.getUnlocalizedName()); + //FEL laser crystals + GameRegistry.registerItem(laser_crystal_co2, laser_crystal_co2.getUnlocalizedName()); + GameRegistry.registerItem(laser_crystal_bismuth, laser_crystal_bismuth.getUnlocalizedName()); + GameRegistry.registerItem(laser_crystal_cmb, laser_crystal_cmb.getUnlocalizedName()); + GameRegistry.registerItem(laser_crystal_dnt, laser_crystal_dnt.getUnlocalizedName()); + GameRegistry.registerItem(laser_crystal_digamma, laser_crystal_digamma.getUnlocalizedName()); + //Recycled Units GameRegistry.registerItem(recycled_ground, recycled_ground.getUnlocalizedName()); GameRegistry.registerItem(recycled_rock, recycled_rock.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemFELCrystal.java b/src/main/java/com/hbm/items/machine/ItemFELCrystal.java new file mode 100644 index 000000000..4b0e03748 --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemFELCrystal.java @@ -0,0 +1,56 @@ +package com.hbm.items.machine; + +import java.util.List; + +import com.hbm.items.ModItems; +import com.hbm.util.I18nUtil; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class ItemFELCrystal extends Item { + + public EnumWavelengths wavelength = EnumWavelengths.NULL; + + public ItemFELCrystal(EnumWavelengths wavelength) + { + this.wavelength = wavelength; + this.setMaxStackSize(1); + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + String desc = (stack.getItem() == ModItems.laser_crystal_digamma) ? (EnumChatFormatting.OBFUSCATED + "THERADIANCEOFATHOUSANDSUNS") : (this.getUnlocalizedNameInefficiently(stack) + ".desc"); + list.add(I18nUtil.resolveKey(desc)); + list.add(wavelength.textColor + I18nUtil.resolveKey(wavelength.name) + " - " + wavelength.textColor + I18nUtil.resolveKey(this.wavelength.wavelengthRange)); + } + + public static enum EnumWavelengths{ + NULL("la creatura", "6 dollar", 0x010101, 0x010101, EnumChatFormatting.WHITE), + + IR("wavelengths.name.ir", "wavelengths.waveRange.ir", 0xBB1010, 0xCC4040, EnumChatFormatting.RED), + VISIBLE("wavelengths.name.visible", "wavelengths.waveRange.visible", 0, 0, EnumChatFormatting.GREEN), + UV("wavelengths.name.uv", "wavelengths.waveRange.uv", 0x0A1FC4, 0x00EFFF, EnumChatFormatting.AQUA), + GAMMA("wavelengths.name.gamma", "wavelengths.waveRange.gamma", 0x150560, 0xEF00FF, EnumChatFormatting.LIGHT_PURPLE), + DRX("wavelengths.name.drx", "wavelengths.waveRange.drx", 0xFF0000, 0xFF0000, EnumChatFormatting.DARK_RED); + + public String name = ""; + public String wavelengthRange = ""; + public int renderedBeamColor; + public int guiColor; + public EnumChatFormatting textColor; + + private EnumWavelengths(String name, String wavelength, int color, int guiColor, EnumChatFormatting textColor) { + this.name = name; + this.wavelengthRange = wavelength; + this.renderedBeamColor = color; + this.guiColor = guiColor; + this.textColor = textColor; + } + } +} \ No newline at end of file diff --git a/src/main/java/com/hbm/items/weapon/ItemAmmo.java b/src/main/java/com/hbm/items/weapon/ItemAmmo.java index 3879b007b..5246dc19a 100644 --- a/src/main/java/com/hbm/items/weapon/ItemAmmo.java +++ b/src/main/java/com/hbm/items/weapon/ItemAmmo.java @@ -728,6 +728,34 @@ public class ItemAmmo extends Item { if(this == ModItems.ammo_folly_du) { list.add(EnumChatFormatting.BLUE + "+ Howitzer 17kg U238 shell"); } + + //STINGER + if(this == ModItems.ammo_stinger_rocket) { + list.add(EnumChatFormatting.BLUE + "+ Homing"); + } + if(this == ModItems.ammo_stinger_rocket_he) { + list.add(EnumChatFormatting.BLUE + "+ Homing"); + list.add(EnumChatFormatting.BLUE + "+ Increased Blast Radius"); + list.add(EnumChatFormatting.RED + "- Increased Wear"); + } + if(this == ModItems.ammo_stinger_rocket_incendiary) { + list.add(EnumChatFormatting.BLUE + "+ Homing"); + list.add(EnumChatFormatting.BLUE + "+ Incendiary explosion"); + list.add(EnumChatFormatting.RED + "- Slightly Increased wear"); + } + if(this == ModItems.ammo_stinger_rocket_nuclear) { + list.add(EnumChatFormatting.BLUE + "+ Homing"); + list.add(EnumChatFormatting.BLUE + "+ Nuclear"); + list.add(EnumChatFormatting.RED + "- Highly Increased wear"); + } + if(this == ModItems.ammo_stinger_rocket_bones) { + list.add(EnumChatFormatting.BLUE + "+ Homing"); + list.add(EnumChatFormatting.YELLOW + "* RATTLE ME BONES"); + list.add(EnumChatFormatting.YELLOW + "* WELCOME ABOARD MATEYS!"); + list.add(EnumChatFormatting.YELLOW + "* RATTLE ME BONES"); + list.add(EnumChatFormatting.YELLOW + "* RATTLE ME BONES"); + list.add(EnumChatFormatting.YELLOW + "* SPIN THE WHEEL FOR THE TREASURE TO TAKE"); + } } } diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 55973cd64..efe7e53f5 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -313,6 +313,12 @@ public class CraftingManager { addRecipeAuto(new ItemStack(ModItems.blades_advanced_alloy, 1), new Object[] { "PIP", 'P', ALLOY.plate(), 'I', new ItemStack(ModItems.blades_advanced_alloy, 1, OreDictionary.WILDCARD_VALUE) }); addRecipeAuto(new ItemStack(ModItems.blades_combine_steel, 1), new Object[] { "PIP", 'P', CMB.plate(), 'I', new ItemStack(ModItems.blades_combine_steel, 1, OreDictionary.WILDCARD_VALUE) }); addRecipeAuto(new ItemStack(ModItems.blades_schrabidium, 1), new Object[] { "PIP", 'P', SA326.plate(), 'I', new ItemStack(ModItems.blades_schrabidium, 1, OreDictionary.WILDCARD_VALUE) }); + + addRecipeAuto(new ItemStack(ModItems.laser_crystal_co2, 1), new Object[] { "QDQ", "NCN", "QDQ", 'Q', ModBlocks.glass_quartz, 'D', DESH.ingot(), 'N', ND.ingot(), 'C', new ItemStack(ModItems.fluid_tank_full, 1, Fluids.CARBONDIOXIDE.getID()) }); + addRecipeAuto(new ItemStack(ModItems.laser_crystal_bismuth, 1), new Object[] {"QUQ", "BCB", "QTQ", 'Q', ModBlocks.glass_quartz, 'U', U.ingot(), 'T', TH232.ingot(), 'B', ModItems.nugget_bismuth, 'C', ModItems.crystal_rare }); + addRecipeAuto(new ItemStack(ModItems.laser_crystal_cmb, 1), new Object[] {"QBQ", "CSC", "QBQ", 'Q', ModBlocks.glass_quartz, 'B', CMB.ingot(), 'C', SBD.ingot(), 'S', ModItems.cell_anti_schrabidium }); + addRecipeAuto(new ItemStack(ModItems.laser_crystal_dnt, 1), new Object[] {"QDQ", "SBS", "QDQ", 'Q', ModBlocks.glass_quartz, 'D', DNT.ingot(), 'B', ModItems.egg_balefire, 'S', ModItems.powder_spark_mix }); + addRecipeAuto(new ItemStack(ModItems.laser_crystal_digamma, 1), new Object[] {"QUQ", "UEU", "QUQ", 'Q', ModBlocks.glass_quartz, 'U', ModItems.undefined, 'E', ModItems.ingot_electronium } ); Item[] bricks = new Item[] {Items.brick, Items.netherbrick}; diff --git a/src/main/java/com/hbm/render/tileentity/RenderFEL.java b/src/main/java/com/hbm/render/tileentity/RenderFEL.java index 00b8c928d..9d888457f 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderFEL.java +++ b/src/main/java/com/hbm/render/tileentity/RenderFEL.java @@ -5,6 +5,7 @@ import java.awt.Color; import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; +import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; import com.hbm.main.ResourceManager; import com.hbm.render.util.BeamPronter; import com.hbm.render.util.BeamPronter.EnumBeamType; @@ -38,23 +39,20 @@ public class RenderFEL extends TileEntitySpecialRenderer { GL11.glShadeModel(GL11.GL_FLAT); TileEntityFEL fel = (TileEntityFEL) tileEntity; - int color = 0xff0000; + int color = 0xffffff; - switch(fel.mode) { - case 0: color = 0x303000; break; - case 1: color = 0xFF1010; break; - case 2: color = Color.HSBtoRGB(fel.getWorldObj().getTotalWorldTime() / 50.0F, 1F, 0.3F) & 16777215; break; - case 3: color = 0x150560; break; - case 4: color = 0x054005; break; - case 5: color = 0x156015; break; + if(fel.mode.renderedBeamColor == 0) { + color = Color.HSBtoRGB(fel.getWorldObj().getTotalWorldTime() / 50.0F, 0.5F, 0.1F) & 16777215; + } else { + color = fel.mode.renderedBeamColor; + } + int length = fel.distance - 3; + GL11.glTranslated(0, 1.5, -1.5); + if(fel.power > fel.powerReq * Math.pow(2, fel.mode.ordinal()) && fel.isOn && !(fel.mode == EnumWavelengths.NULL) && length > 0) { + BeamPronter.prontBeam(Vec3.createVectorHelper(0, 0, -length - 1), EnumWaveType.SPIRAL, EnumBeamType.SOLID, color, color, 0, 1, 0F, 2, 0.0625F); + BeamPronter.prontBeam(Vec3.createVectorHelper(0, 0, -length - 1), EnumWaveType.RANDOM, EnumBeamType.SOLID, color, color, (int)(tileEntity.getWorldObj().getTotalWorldTime() % 1000 / 2), (length / 2) + 1, 0.0625F, 2, 0.0625F); } - int length = 25; - - GL11.glTranslated(0, 1.5, -1.5); - BeamPronter.prontBeam(Vec3.createVectorHelper(0, 0, -length - 1), EnumWaveType.SPIRAL, EnumBeamType.SOLID, color, color, 0, 1, 0F, 2, 0.0625F); - BeamPronter.prontBeam(Vec3.createVectorHelper(0, 0, -length - 1), EnumWaveType.RANDOM, EnumBeamType.SOLID, color, color, (int)(tileEntity.getWorldObj().getTotalWorldTime() % 1000 / 2), (length / 2) + 1, 0.0625F, 2, 0.0625F); - GL11.glPopMatrix(); } -} +} \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityFEL.java b/src/main/java/com/hbm/tileentity/machine/TileEntityFEL.java index 23ed1f571..53e8ae51e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityFEL.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityFEL.java @@ -1,29 +1,59 @@ package com.hbm.tileentity.machine; +import java.util.ArrayList; +import java.util.List; + import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockHazard; +import com.hbm.blocks.generic.BlockHazardFalling; +import com.hbm.blocks.machine.MachineSILEX; +import com.hbm.extprop.HbmLivingProps; +import com.hbm.handler.radiation.ChunkRadiationManager; +import com.hbm.interfaces.Spaghetti; +import com.hbm.items.machine.ItemFELCrystal; +import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; import com.hbm.lib.Library; +import com.hbm.main.MainRegistry; +import com.hbm.packet.AuxElectricityPacket; +import com.hbm.packet.PacketDispatcher; import com.hbm.tileentity.TileEntityMachineBase; +import api.hbm.energy.IEnergyUser; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; +import net.minecraft.block.BlockTNT; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MathHelper; import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityFEL extends TileEntityMachineBase { +public class TileEntityFEL extends TileEntityMachineBase implements IEnergyUser { public long power; - public static final long maxPower = 1000000; - public int watts; - public int mode = 0; + public static final long maxPower = 20000000; + public static final int powerReq = 1250; + public EnumWavelengths mode = EnumWavelengths.NULL; public boolean isOn; + public boolean missingValidSilex = true ; + public int distance; + public List entities = new ArrayList(); + public TileEntityFEL() { - super(1); + super(2); } @Override @@ -32,70 +62,146 @@ public class TileEntityFEL extends TileEntityMachineBase { } @Override + @Spaghetti ("What the fuck were you thinking") public void updateEntity() { if(!worldObj.isRemote) { + //this.trySubscribe(world, x, y, z, dir); TODO this.power = Library.chargeTEFromItems(slots, 0, power, maxPower); - int range = 50; - ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); - int length = 5; + if(this.isOn && !(this.slots[1] == null)) { + + if(this.slots[1].getItem() instanceof ItemFELCrystal) { + + ItemFELCrystal crystal = (ItemFELCrystal) this.slots[1].getItem(); + this.mode = crystal.wavelength; + + } else { this.mode = EnumWavelengths.NULL; } + + } else { this.mode = EnumWavelengths.NULL; } - for(int i = 5; i < range; i++) { + int range = 24; + ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset); + int length = 3; + boolean silexSpacing = false; + if(this.isOn && power >= powerReq * Math.pow(3, mode.ordinal()) && this.mode != EnumWavelengths.NULL) { - length = i; - - int x = xCoord + dir.offsetX * i; - int y = yCoord + 1; - int z = zCoord + dir.offsetZ * i; + int distance = this.distance-1; + double blx = Math.min(xCoord, xCoord + dir.offsetX * distance) + 0.2; + double bux = Math.max(xCoord, xCoord + dir.offsetX * distance) + 0.8; + double bly = Math.min(yCoord, 1 + yCoord + dir.offsetY * distance) + 0.2; + double buy = Math.max(yCoord, 1 + yCoord + dir.offsetY * distance) + 0.8; + double blz = Math.min(zCoord, zCoord + dir.offsetZ * distance) + 0.2; + double buz = Math.max(zCoord, zCoord + dir.offsetZ * distance) + 0.8; - Block b = worldObj.getBlock(x, y, z); + List list = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(blx, bly, blz, bux, buy, buz)); - if(b.getMaterial().isOpaque()) - continue; - - if(b == ModBlocks.machine_silex) { - - TileEntity te = worldObj.getTileEntity(x + dir.offsetX, yCoord, z + dir.offsetZ); - - if(te instanceof TileEntitySILEX) { - TileEntitySILEX silex = (TileEntitySILEX) te; - silex.laser += this.watts; + for(EntityLivingBase entity : list) { + switch(this.mode) { + case VISIBLE: entity.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 60 * 65536, 0)); + case IR: + case UV: entity.setFire(65535); break; + case GAMMA: HbmLivingProps.incrementRadiation(entity, 25); break; + case DRX: HbmLivingProps.incrementDigamma(entity, 0.1F); break; } } - break; + power -= powerReq * ((mode.ordinal() == 0) ? 0 : Math.pow(3, mode.ordinal())); + for(int i = 3; i < range; i++) { + + length = i; + + int x = xCoord + dir.offsetX * i; + int y = yCoord + 1; + int z = zCoord + dir.offsetZ * i; + + Block b = worldObj.getBlock(x, y, z); + + if(!(b.getMaterial().isOpaque()) && b != Blocks.tnt) { + this.distance = range; + silexSpacing = false; + continue; + } + + if(b == ModBlocks.machine_silex) { + + TileEntity te = worldObj.getTileEntity(x + dir.offsetX, yCoord, z + dir.offsetZ); + + if(te instanceof TileEntitySILEX) { + TileEntitySILEX silex = (TileEntitySILEX) te; + int meta = silex.getBlockMetadata() - BlockDummyable.offset; + if(rotationIsValid(meta, this.getBlockMetadata() - BlockDummyable.offset) && i >= 5 && silexSpacing == false ) { + if(silex.mode != this.mode) { + silex.mode = this.mode; + this.missingValidSilex = false; + silexSpacing = true; + continue; + } + } else { + MachineSILEX silexBlock = (MachineSILEX)silex.getBlockType(); + silexBlock.breakBlock(worldObj, silex.xCoord, silex.yCoord, silex.zCoord, silexBlock, 0); + worldObj.spawnEntityInWorld(new EntityItem(worldObj, x + 0.5, y + 0.5, z + 0.5, new ItemStack(Item.getItemFromBlock(ModBlocks.machine_silex)))); + } + } + + } else if(b.getMaterial().isOpaque() || b == Blocks.tnt) { + + this.distance = i; + + if(b.getMaterial().isLiquid()) { + worldObj.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "random.fizz", 1.0F, 1.0F); + worldObj.setBlockToAir(x, y, z); + break; + } + + float hardness = b.getExplosionResistance(null); + if(hardness < 2400 && worldObj.rand.nextInt(5) == 0) { + worldObj.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "random.fizz", 1.0F, 1.0F); + Block block = (this.mode != EnumWavelengths.DRX) ? Blocks.fire : (MainRegistry.polaroidID == 11) ? ModBlocks.digamma_matter : ModBlocks.fire_digamma; + worldObj.setBlock(x, y, z, block); + if(this.mode == EnumWavelengths.DRX) + worldObj.setBlock(x, y-1, z, ModBlocks.ash_digamma); + } + break; + } + } } NBTTagCompound data = new NBTTagCompound(); data.setLong("power", power); - data.setByte("mode", (byte)mode); - data.setByte("watts", (byte)watts); + data.setString("mode", mode.toString()); data.setBoolean("isOn", isOn); + data.setBoolean("valid", missingValidSilex); + data.setInteger("distance", distance); this.networkPack(data, 250); + + PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50)); } } + + public boolean rotationIsValid(int silexMeta, int felMeta) { + ForgeDirection silexDir = ForgeDirection.getOrientation(silexMeta); + ForgeDirection felDir = ForgeDirection.getOrientation(felMeta); + if(silexDir == felDir || silexDir == felDir.getOpposite()) { + return true; + } + + return false; + } @Override public void networkUnpack(NBTTagCompound nbt) { this.power = nbt.getLong("power"); - this.mode = nbt.getByte("mode"); - this.watts = nbt.getByte("watts"); + this.mode = EnumWavelengths.valueOf(nbt.getString("mode")); this.isOn = nbt.getBoolean("isOn"); + this.distance = nbt.getInteger("distance"); + this.missingValidSilex = nbt.getBoolean("valid"); } @Override public void handleButtonPacket(int value, int meta) { - if(meta == 0) { - this.mode = Math.abs(value) % 6; - } - - if(meta == 1){ - this.watts = MathHelper.clamp_int(value, 1, 100); - } - if(meta == 2){ this.isOn = !this.isOn; } @@ -105,18 +211,15 @@ public class TileEntityFEL extends TileEntityMachineBase { return (power * i) / maxPower; } - public int getWattsScaled(int i) { - return (watts * i) / 100; - } - @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); power = nbt.getLong("power"); - watts = nbt.getInteger("watts"); - mode = nbt.getInteger("mode"); + mode = EnumWavelengths.valueOf(nbt.getString("mode")); isOn = nbt.getBoolean("isOn"); + missingValidSilex = nbt.getBoolean("valid"); + distance = nbt.getInteger("distance"); } @Override @@ -124,21 +227,15 @@ public class TileEntityFEL extends TileEntityMachineBase { super.writeToNBT(nbt); nbt.setLong("power", power); - nbt.setInteger("watts", watts); - nbt.setInteger("mode", mode); + nbt.setString("mode", mode.toString()); nbt.setBoolean("isOn", isOn); + nbt.setBoolean("valid", missingValidSilex); + nbt.setInteger("distance", distance); } @Override public AxisAlignedBB getRenderBoundingBox() { - return AxisAlignedBB.getBoundingBox( - xCoord - 4, - yCoord, - zCoord - 4, - xCoord + 5, - yCoord + 3, - zCoord + 5 - ); + return INFINITE_EXTENT_AABB; } @Override @@ -146,4 +243,19 @@ public class TileEntityFEL extends TileEntityMachineBase { public double getMaxRenderDistanceSquared() { return 65536.0D; } -} + + @Override + public void setPower(long i) { + power = i; + } + + @Override + public long getPower() { + return power; + } + + @Override + public long getMaxPower() { + return maxPower; + } +} \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntitySILEX.java b/src/main/java/com/hbm/tileentity/machine/TileEntitySILEX.java index c9db1e9ed..4b4ce9600 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntitySILEX.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntitySILEX.java @@ -12,6 +12,7 @@ import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.recipes.SILEXRecipes; import com.hbm.inventory.recipes.SILEXRecipes.SILEXRecipe; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths; import com.hbm.tileentity.TileEntityMachineBase; import com.hbm.util.InventoryUtil; import com.hbm.util.WeightedRandomObject; @@ -25,20 +26,21 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.WeightedRandom; public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcceptor { - - public int laser = 0; + + public EnumWavelengths mode = EnumWavelengths.NULL; + public boolean hasLaser; public FluidTank tank; public ComparableStack current; public int currentFill; public static final int maxFill = 16000; public int progress; public final int processTime = 100; - - //0: Input - //1: Fluid ID - //2-3: Fluid Containers - //4: Output - //5-10: Queue + + // 0: Input + // 1: Fluid ID + // 2-3: Fluid Containers + // 4: Output + // 5-10: Queue public TileEntitySILEX() { super(11); @@ -52,28 +54,29 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce @Override public void updateEntity() { - + if(!worldObj.isRemote) { tank.setType(1, 1, slots); tank.loadTank(2, 3, slots); - + loadFluid(); - + if(!process()) { this.progress = 0; } - + dequeue(); - + if(currentFill <= 0) { current = null; } - + NBTTagCompound data = new NBTTagCompound(); data.setInteger("fill", currentFill); data.setInteger("progress", progress); - + data.setString("mode", mode.toString()); + if(this.current != null) { data.setInteger("item", Item.getIdFromItem(this.current.item)); data.setInteger("meta", this.current.meta); @@ -81,85 +84,88 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce tank.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId); this.networkPack(data, 50); + + this.mode = EnumWavelengths.NULL; } } - + public void networkUnpack(NBTTagCompound nbt) { - + this.currentFill = nbt.getInteger("fill"); this.progress = nbt.getInteger("progress"); - + this.mode = EnumWavelengths.valueOf(nbt.getString("mode")); + if(this.currentFill > 0) { this.current = new ComparableStack(Item.getItemById(nbt.getInteger("item")), 1, nbt.getInteger("meta")); - + } else { this.current = null; } } - + public void handleButtonPacket(int value, int meta) { - + this.currentFill = 0; this.current = null; } - + public int getProgressScaled(int i) { return (progress * i) / processTime; } - + public int getFluidScaled(int i) { return (tank.getFill() * i) / tank.getMaxFill(); } - + public int getFillScaled(int i) { return (currentFill * i) / maxFill; } - + public static final HashMap fluidConversion = new HashMap(); - + static { putFluid(Fluids.UF6); putFluid(Fluids.PUF6); putFluid(Fluids.DEATH); } - + private static void putFluid(FluidType fluid) { fluidConversion.put(fluid, new ComparableStack(ModItems.fluid_icon, 1, fluid.getID())); } - + int loadDelay; - + public void loadFluid() { - + ComparableStack conv = fluidConversion.get(tank.getTankType()); - + if(conv != null) { - + if(currentFill == 0) { current = (ComparableStack) conv.copy(); } - + if(current != null && current.equals(conv)) { - + int toFill = Math.min(10, Math.min(maxFill - currentFill, tank.getFill())); currentFill += toFill; tank.setFill(tank.getFill() - toFill); } } - + loadDelay++; - + if(loadDelay > 20) loadDelay = 0; - + if(loadDelay == 0 && slots[0] != null && tank.getTankType() == Fluids.ACID && (this.current == null || this.current.equals(new ComparableStack(slots[0]).makeSingular()))) { SILEXRecipe recipe = SILEXRecipes.getOutput(slots[0]); - + if(recipe == null) return; - + int load = recipe.fluidProduced; - + if(load <= this.maxFill - this.currentFill && load <= tank.getFill()) { this.currentFill += load; this.current = new ComparableStack(slots[0]).makeSingular(); @@ -168,53 +174,58 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce } } } - + private boolean process() { - + if(current == null || currentFill <= 0) return false; - + SILEXRecipe recipe = SILEXRecipes.getOutput(current.toStack()); - + if(recipe == null) return false; - + + if(recipe.laserStrength > this.mode.ordinal()) + return false; + if(currentFill < recipe.fluidConsumed) return false; - + if(slots[4] != null) return false; - - progress++; - + + int progressSpeed = (int) Math.pow(2, this.mode.ordinal() - recipe.laserStrength + 1) / 2; + + progress += progressSpeed; + if(progress >= processTime) { - + currentFill -= recipe.fluidConsumed; - - ItemStack out = ((WeightedRandomObject)WeightedRandom.getRandomItem(worldObj.rand, recipe.outputs)).asStack(); + + ItemStack out = ((WeightedRandomObject) WeightedRandom.getRandomItem(worldObj.rand, recipe.outputs)).asStack(); slots[4] = out.copy(); progress = 0; this.markDirty(); } - + return true; } - + private void dequeue() { - + if(slots[4] != null) { - + for(int i = 5; i < 11; i++) { - + if(slots[i] != null && slots[i].stackSize < slots[i].getMaxStackSize() && InventoryUtil.doesStackDataMatch(slots[4], slots[i])) { slots[i].stackSize++; this.decrStackSize(4, 1); return; } } - + for(int i = 5; i < 11; i++) { - + if(slots[i] == null) { slots[i] = slots[4].copy(); slots[4] = null; @@ -231,9 +242,10 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce @Override public boolean isItemValidForSlot(int i, ItemStack itemStack) { - - if(i == 0) return SILEXRecipes.getOutput(itemStack) != null; - + + if(i == 0) + return SILEXRecipes.getOutput(itemStack) != null; + return false; } @@ -241,46 +253,40 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce public boolean canExtractItem(int slot, ItemStack itemStack, int side) { return slot >= 5; } - + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); this.tank.readFromNBT(nbt, "tank"); this.currentFill = nbt.getInteger("fill"); - + this.mode = EnumWavelengths.valueOf(nbt.getString("mode")); + if(this.currentFill > 0) { this.current = new ComparableStack(Item.getItemById(nbt.getInteger("item")), 1, nbt.getInteger("meta")); } } - + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); this.tank.writeToNBT(nbt, "tank"); nbt.setInteger("fill", this.currentFill); - + nbt.setString("mode", mode.toString()); + if(this.current != null) { nbt.setInteger("item", Item.getIdFromItem(this.current.item)); nbt.setInteger("meta", this.current.meta); } } - + @Override public AxisAlignedBB getRenderBoundingBox() { - return AxisAlignedBB.getBoundingBox( - xCoord - 1, - yCoord, - zCoord - 1, - xCoord + 2, - yCoord + 3, - zCoord + 2 - ); + return AxisAlignedBB.getBoundingBox(xCoord - 1, yCoord, zCoord - 1, xCoord + 2, yCoord + 3, zCoord + 2); } - + @Override @SideOnly(Side.CLIENT) - public double getMaxRenderDistanceSquared() - { + public double getMaxRenderDistanceSquared() { return 65536.0D; } @@ -291,7 +297,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce @Override public void setFluidFill(int fill, FluidType type) { - + if(type == tank.getTankType()) tank.setFill(fill); } @@ -303,24 +309,28 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce @Override public List getTanks() { - return new ArrayList() {{ add(tank); }}; + return new ArrayList() { + { + add(tank); + } + }; } @Override public int getFluidFill(FluidType type) { - + if(type == tank.getTankType()) return tank.getFill(); - + return 0; } @Override public int getMaxFluidFill(FluidType type) { - + if(type == tank.getTankType()) return tank.getMaxFill(); - + return 0; } -} +} \ No newline at end of file diff --git a/src/main/resources/assets/hbm/textures/gui/machine/gui_fel.png b/src/main/resources/assets/hbm/textures/gui/machine/gui_fel.png index 25c4533d3..db573b1a7 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/machine/gui_fel.png and b/src/main/resources/assets/hbm/textures/gui/machine/gui_fel.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/nei/gui_nei_silex.png b/src/main/resources/assets/hbm/textures/gui/nei/gui_nei_silex.png index 81879d81d..c31ef6de6 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/nei/gui_nei_silex.png and b/src/main/resources/assets/hbm/textures/gui/nei/gui_nei_silex.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_silex.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_silex.png index b2bd23864..7f92facaf 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/processing/gui_silex.png and b/src/main/resources/assets/hbm/textures/gui/processing/gui_silex.png differ diff --git a/src/main/resources/assets/hbm/textures/items/laser_crystal_bismuth.png b/src/main/resources/assets/hbm/textures/items/laser_crystal_bismuth.png new file mode 100644 index 000000000..f35669dc6 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/laser_crystal_bismuth.png differ diff --git a/src/main/resources/assets/hbm/textures/items/laser_crystal_cmb.png b/src/main/resources/assets/hbm/textures/items/laser_crystal_cmb.png new file mode 100644 index 000000000..d66693130 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/laser_crystal_cmb.png differ diff --git a/src/main/resources/assets/hbm/textures/items/laser_crystal_co2.png b/src/main/resources/assets/hbm/textures/items/laser_crystal_co2.png new file mode 100644 index 000000000..dbf44374c Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/laser_crystal_co2.png differ diff --git a/src/main/resources/assets/hbm/textures/items/laser_crystal_digamma.png b/src/main/resources/assets/hbm/textures/items/laser_crystal_digamma.png new file mode 100644 index 000000000..6a2397cb4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/laser_crystal_digamma.png differ diff --git a/src/main/resources/assets/hbm/textures/items/laser_crystal_digamma.png.mcmeta b/src/main/resources/assets/hbm/textures/items/laser_crystal_digamma.png.mcmeta new file mode 100644 index 000000000..d7b41bbd3 --- /dev/null +++ b/src/main/resources/assets/hbm/textures/items/laser_crystal_digamma.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": { } +} diff --git a/src/main/resources/assets/hbm/textures/items/laser_crystal_dnt.png b/src/main/resources/assets/hbm/textures/items/laser_crystal_dnt.png new file mode 100644 index 000000000..410f475ac Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/laser_crystal_dnt.png differ