From 97b20770384a6082f20af63dde2eeb094314062e Mon Sep 17 00:00:00 2001 From: Boblet Date: Tue, 30 Jun 2026 15:18:41 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=20PETAL=20DANCE=20=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog | 12 ++++ src/main/java/api/hbm/ntl/StackCache.java | 6 +- .../java/com/hbm/inventory/SlotPattern.java | 8 +-- .../container/ContainerAutocrafter.java | 2 +- .../ContainerPneumoStorageExporter.java | 2 +- .../com/hbm/inventory/gui/GUIFusionTorus.java | 6 +- .../gui/GUIMachineAssemblyFactory.java | 10 +-- .../gui/GUIMachineAssemblyMachine.java | 10 +-- .../gui/GUIMachineChemicalFactory.java | 10 +-- .../gui/GUIMachineChemicalPlant.java | 8 +-- .../hbm/inventory/gui/GUIMachinePUREX.java | 8 +-- .../inventory/gui/GUIMachinePlasmaForge.java | 10 +-- .../hbm/inventory/gui/GUIMachinePrecAss.java | 8 +-- .../hbm/inventory/recipes/CrucibleRecipe.java | 2 +- .../inventory/recipes/PlasmaForgeRecipe.java | 2 +- .../recipes/loader/GenericRecipe.java | 9 ++- .../java/com/hbm/module/ParseMSES1Ext1.java | 6 ++ .../hbm/module/machine/ModuleMachineBase.java | 17 ++++- .../tileentity/RenderAssemblyFactory.java | 3 +- .../tileentity/RenderAssemblyMachine.java | 3 +- .../tileentity/RenderChemicalPlant.java | 3 +- .../tileentity/RenderFusionPlasmaForge.java | 3 +- .../hbm/render/tileentity/RenderPrecAss.java | 3 +- .../TileEntityMachineAssemblyFactory.java | 5 +- .../TileEntityMachineAssemblyMachine.java | 39 ++++++++-- .../TileEntityMachineChemicalFactory.java | 5 +- .../TileEntityMachineChemicalPlant.java | 5 +- .../machine/TileEntityMachinePUREX.java | 5 +- .../machine/TileEntityMachinePrecAss.java | 5 +- .../fusion/TileEntityFusionPlasmaForge.java | 5 +- .../machine/fusion/TileEntityFusionTorus.java | 2 +- .../TileEntityPneumoStorageExporter.java | 68 +++++++++++++++++- .../textures/gui/processing/gui_chemplant.png | Bin 3594 -> 3643 bytes 33 files changed, 208 insertions(+), 82 deletions(-) diff --git a/changelog b/changelog index b5b39f0d4..0e1a5cf5a 100644 --- a/changelog +++ b/changelog @@ -29,6 +29,18 @@ * Increased the blast furnace's fuel buffer by 50%, allowing coke blocks to be used * If an RoR controller tries to parse an integer, but the supplied string represents a decimal, instead of canceling the operation, the system will now interpret decimals and round them to be integers * This means that the AUTOCAL can now send RoR commands using calculated values directly without the use of `round` or `evalr` +* Assembly machines now support Redstone-over-Radio + * Active state (0 or 1), progress (0-100) and current recipe (internal name) can now be read + * The recipe can be set using a controller + * Do note that setting a recipe that needs a blueprint without that blueprint will not work + * RoR set recipes cause the assembler to go into low power mode, making it run at only 25% speed (visible through the blue progress bar) + * The speed penalty is removed as soon as a recipe is assigned manually again +* The AUTOCAL's script interpreter now runs MS-ES v1.1 (First Extended Instruction Set) + * Allows the use of a global stack, similar to the buffer which can hold 256 values + * Allows splitting of strings and counting of string fragments + * Adds substring operations + * Polling for receiving only fresh RoR signals + * A command for writing the world time to the buffer, allowing for more precise timers ## Fixed * Fixed AUTOCAL's number comparison functions not working with variable substitution as advertised diff --git a/src/main/java/api/hbm/ntl/StackCache.java b/src/main/java/api/hbm/ntl/StackCache.java index 004ead61a..7d941d73c 100644 --- a/src/main/java/api/hbm/ntl/StackCache.java +++ b/src/main/java/api/hbm/ntl/StackCache.java @@ -197,7 +197,11 @@ public class StackCache { public static long getStackIdentity(Item item, int meta, NBTTagCompound nbt) { if(item == null) return getNullIdentity(); - long identity = Item.getIdFromItem(item) * 27644437; + return getStackIdentity(Item.getIdFromItem(item), meta, nbt); + } + + public static long getStackIdentity(int item, int meta, NBTTagCompound nbt) { + long identity = item * 27644437; identity += meta; identity *= 27644437; if(nbt != null) identity += nbt.hashCode(); diff --git a/src/main/java/com/hbm/inventory/SlotPattern.java b/src/main/java/com/hbm/inventory/SlotPattern.java index a1bdc6c67..317424214 100644 --- a/src/main/java/com/hbm/inventory/SlotPattern.java +++ b/src/main/java/com/hbm/inventory/SlotPattern.java @@ -16,10 +16,10 @@ public class SlotPattern extends Slot { public SlotPattern(IInventory inv, int index, int x, int y) { super(inv, index, x, y); } - - public SlotPattern(IInventory inv, int index, int x, int y, boolean allowStackSize) { - super(inv, index, x, y); - this.allowStackSize = allowStackSize; + + public SlotPattern allowStackSize() { + this.allowStackSize = true; + return this; } @Override diff --git a/src/main/java/com/hbm/inventory/container/ContainerAutocrafter.java b/src/main/java/com/hbm/inventory/container/ContainerAutocrafter.java index 2c8b0438b..8dc57f397 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerAutocrafter.java +++ b/src/main/java/com/hbm/inventory/container/ContainerAutocrafter.java @@ -24,7 +24,7 @@ public class ContainerAutocrafter extends ContainerBase { this.addSlotToContainer(new SlotPattern(tedf, j + i * 3, 44 + j * 18, 22 + i * 18)); } } - this.addSlotToContainer(new SlotPattern(tedf, 9, 116, 40, true)); + this.addSlotToContainer(new SlotPattern(tedf, 9, 116, 40).allowStackSize()); /* RECIPE */ addSlots(tedf,10, 44, 86, 3, 3); diff --git a/src/main/java/com/hbm/inventory/container/ContainerPneumoStorageExporter.java b/src/main/java/com/hbm/inventory/container/ContainerPneumoStorageExporter.java index 95776aa6d..4928ba349 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerPneumoStorageExporter.java +++ b/src/main/java/com/hbm/inventory/container/ContainerPneumoStorageExporter.java @@ -14,7 +14,7 @@ public class ContainerPneumoStorageExporter extends ContainerBase { super(invPlayer, exporter); for(int i = 0; i < 9; i++) { - this.addSlotToContainer(new SlotPattern(exporter, i, 17 + (i % 3) * 18, 17 + (i / 3) * 18, true)); + this.addSlotToContainer(new SlotPattern(exporter, i, 17 + (i % 3) * 18, 17 + (i / 3) * 18).allowStackSize()); } addSlots(exporter, 9, 80, 17, 3, 3); diff --git a/src/main/java/com/hbm/inventory/gui/GUIFusionTorus.java b/src/main/java/com/hbm/inventory/gui/GUIFusionTorus.java index 98e11de61..9e7160305 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIFusionTorus.java +++ b/src/main/java/com/hbm/inventory/gui/GUIFusionTorus.java @@ -41,7 +41,7 @@ public class GUIFusionTorus extends GuiInfoContainer { torus.coolantTanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 188, guiTop + 46, 16, 52); torus.coolantTanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 206, guiTop + 46, 16, 52); - FusionRecipe recipe = (FusionRecipe) FusionRecipes.INSTANCE.recipeNameMap.get(this.torus.fusionModule.recipe); + FusionRecipe recipe = (FusionRecipe) this.torus.fusionModule.getRecipe(); if(recipe != null) { drawCustomInfoStat(mouseX, mouseY, guiLeft + 43, guiTop + 115, 18, 18, mouseX, mouseY, EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(torus.klystronEnergy) + "KyU / " + BobMathUtil.getShortNumber(recipe.ignitionTemp) + "KyU"); @@ -70,7 +70,7 @@ public class GUIFusionTorus extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - if(this.checkClick(x, y, 43, 80, 18, 18)) GUIScreenRecipeSelector.openSelector(FusionRecipes.INSTANCE, torus, torus.fusionModule.recipe, 0, ItemBlueprints.grabPool(torus.slots[1]), this); + if(this.checkClick(x, y, 43, 80, 18, 18)) GUIScreenRecipeSelector.openSelector(FusionRecipes.INSTANCE, torus, torus.fusionModule.getRecipeName(), 0, ItemBlueprints.grabPool(torus.slots[1]), this); } @Override @@ -103,7 +103,7 @@ public class GUIFusionTorus extends GuiInfoContainer { drawTexturedModalRect(guiLeft + 98, guiTop + 91, 0, 250, j, 6); } - FusionRecipe recipe = FusionRecipes.INSTANCE.recipeNameMap.get(torus.fusionModule.recipe); + FusionRecipe recipe = (FusionRecipe) torus.fusionModule.getRecipe(); // power LED if(recipe != null && torus.power >= recipe.power) drawTexturedModalRect(guiLeft + 160, guiTop + 115, 246, 14, 8, 8); diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyFactory.java b/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyFactory.java index 11f7db844..d08490d19 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyFactory.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyFactory.java @@ -47,8 +47,8 @@ public class GUIMachineAssemblyFactory extends GuiInfoContainer { this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 234, guiTop + 18, 16, 92, assembler.power, assembler.maxPower); for(int i = 0; i < 4; i++) if(guiLeft + 6 + (i % 2) * 109 <= mouseX && guiLeft + 6 + (i % 2) * 109 + 18 > mouseX && guiTop + 53 + (i / 2) * 56 < mouseY && guiTop + 53 + (i / 2) * 56 + 18 >= mouseY) { - if(this.assembler.assemblerModule[i].recipe != null && AssemblyMachineRecipes.INSTANCE.recipeNameMap.containsKey(this.assembler.assemblerModule[i].recipe)) { - GenericRecipe recipe = (GenericRecipe) AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(this.assembler.assemblerModule[i].recipe); + if(this.assembler.assemblerModule[i].getRecipeName() != null && AssemblyMachineRecipes.INSTANCE.recipeNameMap.containsKey(this.assembler.assemblerModule[i].getRecipeName())) { + GenericRecipe recipe = this.assembler.assemblerModule[i].getRecipe(); GUIElements.drawHoveringTextRecipe(recipe.print(), mouseX, mouseY, this.fontRendererObj, itemRender, this.width, this.height); } else { this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY); @@ -60,7 +60,7 @@ public class GUIMachineAssemblyFactory extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - for(int i = 0; i < 4; i++) if(this.checkClick(x, y, 6 + (i % 2) * 109, 53 + (i / 2) * 56, 18, 18)) GUIScreenRecipeSelector.openSelector(AssemblyMachineRecipes.INSTANCE, assembler, assembler.assemblerModule[i].recipe, i, ItemBlueprints.grabPool(assembler.slots[4 + i * 14]), this); + for(int i = 0; i < 4; i++) if(this.checkClick(x, y, 6 + (i % 2) * 109, 53 + (i / 2) * 56, 18, 18)) GUIScreenRecipeSelector.openSelector(AssemblyMachineRecipes.INSTANCE, assembler, assembler.assemblerModule[i].getRecipeName(), i, ItemBlueprints.grabPool(assembler.slots[4 + i * 14]), this); } @Override @@ -87,7 +87,7 @@ public class GUIMachineAssemblyFactory extends GuiInfoContainer { } for(int g = 0; g < 4; g++) { - GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assembler.assemblerModule[g].recipe); + GenericRecipe recipe = assembler.assemblerModule[g].getRecipe(); /// LEFT LED if(assembler.didProcess[g]) { @@ -105,7 +105,7 @@ public class GUIMachineAssemblyFactory extends GuiInfoContainer { } for(int g = 0; g < 4; g++) { - GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assembler.assemblerModule[g].recipe); + GenericRecipe recipe = assembler.assemblerModule[g].getRecipe(); this.renderItem(recipe != null ? recipe.getIcon() : TEMPLATE_FOLDER, 7 + (g % 2) * 109, 54 + (g / 2) * 56); diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyMachine.java b/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyMachine.java index 0e5f8184c..bcb51491b 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyMachine.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineAssemblyMachine.java @@ -42,8 +42,8 @@ public class GUIMachineAssemblyMachine extends GuiInfoContainer { this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 61, assembler.power, assembler.maxPower); if(guiLeft + 7 <= mouseX && guiLeft + 7 + 18 > mouseX && guiTop + 125 < mouseY && guiTop + 125 + 18 >= mouseY) { - if(this.assembler.assemblerModule.recipe != null && AssemblyMachineRecipes.INSTANCE.recipeNameMap.containsKey(this.assembler.assemblerModule.recipe)) { - GenericRecipe recipe = (GenericRecipe) AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(this.assembler.assemblerModule.recipe); + if(this.assembler.assemblerModule.getRecipeName() != null && AssemblyMachineRecipes.INSTANCE.recipeNameMap.containsKey(this.assembler.assemblerModule.getRecipeName())) { + GenericRecipe recipe = this.assembler.assemblerModule.getRecipe(); GUIElements.drawHoveringTextRecipe(recipe.print(), mouseX, mouseY, this.fontRendererObj, itemRender, this.width, this.height); } else { this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY); @@ -55,7 +55,7 @@ public class GUIMachineAssemblyMachine extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(AssemblyMachineRecipes.INSTANCE, assembler, assembler.assemblerModule.recipe, 0, ItemBlueprints.grabPool(assembler.slots[1]), this); + if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(AssemblyMachineRecipes.INSTANCE, assembler, assembler.assemblerModule.getRecipeName(), 0, ItemBlueprints.grabPool(assembler.slots[1]), this); } @Override @@ -77,10 +77,10 @@ public class GUIMachineAssemblyMachine extends GuiInfoContainer { if(assembler.assemblerModule.progress > 0) { int j = (int) Math.ceil(70 * assembler.assemblerModule.progress); - drawTexturedModalRect(guiLeft + 62, guiTop + 126, 176, 61, j, 16); + drawTexturedModalRect(guiLeft + 62, guiTop + 126, 176, 61 + (assembler.assemblerModule.restrictedMode ? 16 : 0), j, 16); } - GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assembler.assemblerModule.recipe); + GenericRecipe recipe = assembler.assemblerModule.getRecipe(); /// LEFT LED if(assembler.didProcess) { diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalFactory.java b/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalFactory.java index 885411e82..e20b94d4f 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalFactory.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalFactory.java @@ -47,8 +47,8 @@ public class GUIMachineChemicalFactory extends GuiInfoContainer { this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 224, guiTop + 18, 16, 68, chemplant.power, chemplant.maxPower); for(int i = 0; i < 4; i++) if(guiLeft + 74 <= mouseX && guiLeft + 74 + 18 > mouseX && guiTop + 19 + i * 22 < mouseY && guiTop + 19 + i * 22 + 18 >= mouseY) { - if(this.chemplant.chemplantModule[i].recipe != null && ChemicalPlantRecipes.INSTANCE.recipeNameMap.containsKey(this.chemplant.chemplantModule[i].recipe)) { - GenericRecipe recipe = (GenericRecipe) ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(this.chemplant.chemplantModule[i].recipe); + if(this.chemplant.chemplantModule[i].getRecipeName() != null && ChemicalPlantRecipes.INSTANCE.recipeNameMap.containsKey(this.chemplant.chemplantModule[i].getRecipeName())) { + GenericRecipe recipe = this.chemplant.chemplantModule[i].getRecipe(); GUIElements.drawHoveringTextRecipe(recipe.print(), mouseX, mouseY, this.fontRendererObj, itemRender, this.width, this.height); } else { this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY); @@ -60,7 +60,7 @@ public class GUIMachineChemicalFactory extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - for(int i = 0; i < 4; i++) if(this.checkClick(x, y, 74, 19 + i * 22, 18, 18)) GUIScreenRecipeSelector.openSelector(ChemicalPlantRecipes.INSTANCE, chemplant, chemplant.chemplantModule[i].recipe, i, ItemBlueprints.grabPool(chemplant.slots[4 + i * 7]), this); + for(int i = 0; i < 4; i++) if(this.checkClick(x, y, 74, 19 + i * 22, 18, 18)) GUIScreenRecipeSelector.openSelector(ChemicalPlantRecipes.INSTANCE, chemplant, chemplant.chemplantModule[i].getRecipeName(), i, ItemBlueprints.grabPool(chemplant.slots[4 + i * 7]), this); } @Override @@ -87,7 +87,7 @@ public class GUIMachineChemicalFactory extends GuiInfoContainer { } for(int g = 0; g < 4; g++) { - GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplant.chemplantModule[g].recipe); + GenericRecipe recipe = chemplant.chemplantModule[g].getRecipe(); /// LEFT LED if(chemplant.didProcess[g]) { @@ -105,7 +105,7 @@ public class GUIMachineChemicalFactory extends GuiInfoContainer { } for(int g = 0; g < 4; g++) { // not a great way of doing it but at least we eliminate state leak bullshit - GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplant.chemplantModule[g].recipe); + GenericRecipe recipe = chemplant.chemplantModule[g].getRecipe(); this.renderItem(recipe != null ? recipe.getIcon() : TEMPLATE_FOLDER, 75, 20 + g * 22); diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalPlant.java b/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalPlant.java index bc63a81b5..0f42776f1 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalPlant.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineChemicalPlant.java @@ -43,8 +43,8 @@ public class GUIMachineChemicalPlant extends GuiInfoContainer { this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 61, chemplant.power, chemplant.maxPower); if(guiLeft + 7 <= mouseX && guiLeft + 7 + 18 > mouseX && guiTop + 125 < mouseY && guiTop + 125 + 18 >= mouseY) { - if(this.chemplant.chemplantModule.recipe != null && ChemicalPlantRecipes.INSTANCE.recipeNameMap.containsKey(this.chemplant.chemplantModule.recipe)) { - GenericRecipe recipe = (GenericRecipe) ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(this.chemplant.chemplantModule.recipe); + if(this.chemplant.chemplantModule.getRecipe() != null && ChemicalPlantRecipes.INSTANCE.recipeNameMap.containsKey(this.chemplant.chemplantModule.getRecipeName())) { + GenericRecipe recipe = this.chemplant.chemplantModule.getRecipe(); GUIElements.drawHoveringTextRecipe(recipe.print(), mouseX, mouseY, this.fontRendererObj, itemRender, this.width, this.height); } else { this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY); @@ -56,7 +56,7 @@ public class GUIMachineChemicalPlant extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(ChemicalPlantRecipes.INSTANCE, chemplant, chemplant.chemplantModule.recipe, 0, ItemBlueprints.grabPool(chemplant.slots[1]), this); + if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(ChemicalPlantRecipes.INSTANCE, chemplant, chemplant.chemplantModule.getRecipeName(), 0, ItemBlueprints.grabPool(chemplant.slots[1]), this); } @Override @@ -81,7 +81,7 @@ public class GUIMachineChemicalPlant extends GuiInfoContainer { drawTexturedModalRect(guiLeft + 62, guiTop + 126, 176, 61, j, 16); } - GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplant.chemplantModule.recipe); + GenericRecipe recipe = chemplant.chemplantModule.getRecipe(); /// LEFT LED if(chemplant.didProcess) { diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachinePUREX.java b/src/main/java/com/hbm/inventory/gui/GUIMachinePUREX.java index 2ae922c50..b6f48cbeb 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachinePUREX.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachinePUREX.java @@ -44,8 +44,8 @@ public class GUIMachinePUREX extends GuiInfoContainer { this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 61, purex.power, purex.maxPower); if(guiLeft + 7 <= mouseX && guiLeft + 7 + 18 > mouseX && guiTop + 125 < mouseY && guiTop + 125 + 18 >= mouseY) { - if(this.purex.purexModule.recipe != null && PUREXRecipes.INSTANCE.recipeNameMap.containsKey(this.purex.purexModule.recipe)) { - GenericRecipe recipe = (GenericRecipe) PUREXRecipes.INSTANCE.recipeNameMap.get(this.purex.purexModule.recipe); + if(this.purex.purexModule.getRecipe() != null && PUREXRecipes.INSTANCE.recipeNameMap.containsKey(this.purex.purexModule.getRecipe())) { + GenericRecipe recipe = this.purex.purexModule.getRecipe(); GUIElements.drawHoveringTextRecipe(recipe.print(), mouseX, mouseY, this.fontRendererObj, itemRender, this.width, this.height); } else { this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY); @@ -57,7 +57,7 @@ public class GUIMachinePUREX extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(PUREXRecipes.INSTANCE, purex, purex.purexModule.recipe, 0, ItemBlueprints.grabPool(purex.slots[1]), this); + if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(PUREXRecipes.INSTANCE, purex, purex.purexModule.getRecipeName(), 0, ItemBlueprints.grabPool(purex.slots[1]), this); } @Override @@ -82,7 +82,7 @@ public class GUIMachinePUREX extends GuiInfoContainer { drawTexturedModalRect(guiLeft + 62, guiTop + 126, 176, 61, j, 16); } - GenericRecipe recipe = PUREXRecipes.INSTANCE.recipeNameMap.get(purex.purexModule.recipe); + GenericRecipe recipe = purex.purexModule.getRecipe(); /// LEFT LED if(purex.didProcess) { diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachinePlasmaForge.java b/src/main/java/com/hbm/inventory/gui/GUIMachinePlasmaForge.java index 2516072f7..98b9f663c 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachinePlasmaForge.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachinePlasmaForge.java @@ -47,15 +47,15 @@ public class GUIMachinePlasmaForge extends GuiInfoContainer { this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 62, forge.power, forge.maxPower); if(guiLeft + 7 <= mouseX && guiLeft + 7 + 18 > mouseX && guiTop + 80 < mouseY && guiTop + 80 + 18 >= mouseY) { - if(this.forge.plasmaModule.recipe != null && PlasmaForgeRecipes.INSTANCE.recipeNameMap.containsKey(this.forge.plasmaModule.recipe)) { - GenericRecipe recipe = (GenericRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(this.forge.plasmaModule.recipe); + if(this.forge.plasmaModule.getRecipeName() != null && PlasmaForgeRecipes.INSTANCE.recipeNameMap.containsKey(this.forge.plasmaModule.getRecipeName())) { + GenericRecipe recipe = this.forge.plasmaModule.getRecipe(); GUIElements.drawHoveringTextRecipe(recipe.print(), mouseX, mouseY, this.fontRendererObj, itemRender, this.width, this.height); } else { this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY); } } - PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe); + PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) forge.plasmaModule.getRecipe(); if(recipe != null) { drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(forge.plasmaEnergySync) + "TU / " + BobMathUtil.getShortNumber(recipe.ignitionTemp) + "TU"); @@ -102,7 +102,7 @@ public class GUIMachinePlasmaForge extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - if(this.checkClick(x, y, 7, 80, 18, 18)) GUIScreenRecipeSelector.openSelector(PlasmaForgeRecipes.INSTANCE, forge, forge.plasmaModule.recipe, 0, ItemBlueprints.grabPool(forge.slots[1]), this); + if(this.checkClick(x, y, 7, 80, 18, 18)) GUIScreenRecipeSelector.openSelector(PlasmaForgeRecipes.INSTANCE, forge, forge.plasmaModule.getRecipeName(), 0, ItemBlueprints.grabPool(forge.slots[1]), this); } @Override @@ -127,7 +127,7 @@ public class GUIMachinePlasmaForge extends GuiInfoContainer { drawTexturedModalRect(guiLeft + 62, guiTop + 81, 176, 62, j, 16); } - PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe); + PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) forge.plasmaModule.getRecipe(); /// LEFT LED if(forge.didProcess) { diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachinePrecAss.java b/src/main/java/com/hbm/inventory/gui/GUIMachinePrecAss.java index 53d04d6f7..aa5a400cf 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachinePrecAss.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachinePrecAss.java @@ -42,8 +42,8 @@ public class GUIMachinePrecAss extends GuiInfoContainer { this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 61, assembler.power, assembler.maxPower); if(guiLeft + 7 <= mouseX && guiLeft + 7 + 18 > mouseX && guiTop + 125 < mouseY && guiTop + 125 + 18 >= mouseY) { - if(this.assembler.assemblerModule.recipe != null && PrecAssRecipes.INSTANCE.recipeNameMap.containsKey(this.assembler.assemblerModule.recipe)) { - GenericRecipe recipe = (GenericRecipe) PrecAssRecipes.INSTANCE.recipeNameMap.get(this.assembler.assemblerModule.recipe); + if(this.assembler.assemblerModule.getRecipeName() != null && PrecAssRecipes.INSTANCE.recipeNameMap.containsKey(this.assembler.assemblerModule.getRecipeName())) { + GenericRecipe recipe = this.assembler.assemblerModule.getRecipe(); GUIElements.drawHoveringTextRecipe(recipe.print(), mouseX, mouseY, this.fontRendererObj, itemRender, this.width, this.height); } else { this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY); @@ -55,7 +55,7 @@ public class GUIMachinePrecAss extends GuiInfoContainer { protected void mouseClicked(int x, int y, int button) { super.mouseClicked(x, y, button); - if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(PrecAssRecipes.INSTANCE, assembler, assembler.assemblerModule.recipe, 0, ItemBlueprints.grabPool(assembler.slots[1]), this); + if(this.checkClick(x, y, 7, 125, 18, 18)) GUIScreenRecipeSelector.openSelector(PrecAssRecipes.INSTANCE, assembler, assembler.assemblerModule.getRecipeName(), 0, ItemBlueprints.grabPool(assembler.slots[1]), this); } @Override @@ -80,7 +80,7 @@ public class GUIMachinePrecAss extends GuiInfoContainer { drawTexturedModalRect(guiLeft + 62, guiTop + 126, 176, 61, j, 16); } - GenericRecipe recipe = PrecAssRecipes.INSTANCE.recipeNameMap.get(assembler.assemblerModule.recipe); + GenericRecipe recipe = assembler.assemblerModule.getRecipe(); /// LEFT LED if(assembler.didProcess) { diff --git a/src/main/java/com/hbm/inventory/recipes/CrucibleRecipe.java b/src/main/java/com/hbm/inventory/recipes/CrucibleRecipe.java index 65d4fa4b4..4c73a4289 100644 --- a/src/main/java/com/hbm/inventory/recipes/CrucibleRecipe.java +++ b/src/main/java/com/hbm/inventory/recipes/CrucibleRecipe.java @@ -41,8 +41,8 @@ public class CrucibleRecipe extends GenericRecipe { @Override public List print() { List list = new ArrayList(); - list.add(EnumChatFormatting.YELLOW + this.getLocalizedName()); + header(list); input(list); output(list); diff --git a/src/main/java/com/hbm/inventory/recipes/PlasmaForgeRecipe.java b/src/main/java/com/hbm/inventory/recipes/PlasmaForgeRecipe.java index 4637b8bd0..8183f941c 100644 --- a/src/main/java/com/hbm/inventory/recipes/PlasmaForgeRecipe.java +++ b/src/main/java/com/hbm/inventory/recipes/PlasmaForgeRecipe.java @@ -23,8 +23,8 @@ public class PlasmaForgeRecipe extends GenericRecipe { public List print() { List list = new ArrayList(); - list.add(EnumChatFormatting.YELLOW + this.getLocalizedName()); + header(list); autoSwitch(list); duration(list); power(list); diff --git a/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java b/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java index 40ee9bf27..4f8a49eb5 100644 --- a/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java +++ b/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; +import org.lwjgl.input.Keyboard; + import com.hbm.config.GeneralConfig; import com.hbm.inventory.FluidStack; import com.hbm.inventory.RecipesCommon.AStack; @@ -148,8 +150,8 @@ public class GenericRecipe { public List print() { List list = new ArrayList(); - list.add(EnumChatFormatting.YELLOW + this.getLocalizedName()); + header(list); autoSwitch(list); duration(list); power(list); @@ -159,6 +161,11 @@ public class GenericRecipe { return list; } + protected void header(List list) { + list.add(EnumChatFormatting.YELLOW + this.getLocalizedName()); + if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) list.add(EnumChatFormatting.DARK_GRAY + "Internal: " + this.getInternalName()); + } + protected void autoSwitch(List list) { if(this.autoSwitchGroup != null) { String[] lines = I18nUtil.resolveKeyArray("autoswitch", I18nUtil.resolveKey(this.autoSwitchGroup)); diff --git a/src/main/java/com/hbm/module/ParseMSES1Ext1.java b/src/main/java/com/hbm/module/ParseMSES1Ext1.java index db4a3bc48..875c136b0 100644 --- a/src/main/java/com/hbm/module/ParseMSES1Ext1.java +++ b/src/main/java/com/hbm/module/ParseMSES1Ext1.java @@ -120,6 +120,12 @@ public class ParseMSES1Ext1 extends ParseMSES1 { return EnumStatementReturn.OK; } + // writes the total world time to the buffer + if(lower.equals("worldtime")) { + ctx.writeBuffer("" + ctx.world.getTotalWorldTime()); + return EnumStatementReturn.OK; + } + return super.eval(ctx, line); } } diff --git a/src/main/java/com/hbm/module/machine/ModuleMachineBase.java b/src/main/java/com/hbm/module/machine/ModuleMachineBase.java index 311a236fa..d75608786 100644 --- a/src/main/java/com/hbm/module/machine/ModuleMachineBase.java +++ b/src/main/java/com/hbm/module/machine/ModuleMachineBase.java @@ -25,11 +25,12 @@ public abstract class ModuleMachineBase { public FluidTank[] inputTanks; public FluidTank[] outputTanks; // running vars - public String recipe = "null"; + protected String recipe = "null"; public double progress; // return signals public boolean didProcess = false; public boolean markDirty = false; + public boolean restrictedMode = false; public ModuleMachineBase(int index, IEnergyHandlerMK2 battery, ItemStack[] slots) { this.index = index; @@ -114,6 +115,7 @@ public abstract class ModuleMachineBase { } public void process(GenericRecipe recipe, double speed, double power) { + if(this.restrictedMode) speed *= 0.25; // RoR controlled machines have a speed penalty this.battery.setPower(this.battery.getPower() - (power == 1 ? recipe.power : (long) (recipe.power * power))); double step = Math.min(speed / recipe.duration, 1D); // can't do more than one recipe per tick, might look into that later @@ -167,11 +169,20 @@ public abstract class ModuleMachineBase { this.markDirty = true; } + + public String getRecipeName() { + return this.recipe; + } public GenericRecipe getRecipe() { return (GenericRecipe) getRecipeSet().recipeNameMap.get(this.recipe); } + public void setRecipe(String name, boolean ror) { + this.recipe = name; + this.restrictedMode = ror; + } + public abstract GenericRecipes getRecipeSet(); public void update(double speed, double power, boolean extraCondition, ItemStack blueprint) { @@ -232,21 +243,25 @@ public abstract class ModuleMachineBase { public void serialize(ByteBuf buf) { buf.writeDouble(progress); + buf.writeBoolean(restrictedMode); ByteBufUtils.writeUTF8String(buf, recipe); } public void deserialize(ByteBuf buf) { this.progress = buf.readDouble(); + this.restrictedMode = buf.readBoolean(); this.recipe = ByteBufUtils.readUTF8String(buf); } public void readFromNBT(NBTTagCompound nbt) { this.progress = nbt.getDouble("progress" + index); this.recipe = nbt.getString("recipe" + index); + this.restrictedMode = nbt.getBoolean("restrictedMode"); } public void writeToNBT(NBTTagCompound nbt) { nbt.setDouble("progress" + index, progress); nbt.setString("recipe" + index, recipe); + nbt.setBoolean("restrictedMode", restrictedMode); } } diff --git a/src/main/java/com/hbm/render/tileentity/RenderAssemblyFactory.java b/src/main/java/com/hbm/render/tileentity/RenderAssemblyFactory.java index 06cdbf265..1bb80d9f0 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderAssemblyFactory.java +++ b/src/main/java/com/hbm/render/tileentity/RenderAssemblyFactory.java @@ -4,7 +4,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; -import com.hbm.inventory.recipes.AssemblyMachineRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.main.MainRegistry; import com.hbm.main.ResourceManager; @@ -162,7 +161,7 @@ public class RenderAssemblyFactory extends TileEntitySpecialRenderer implements GL11.glRotated(90, 0, 1, 0); GL11.glTranslated(0, 1.0625, 0); - GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assemfac.assemblerModule[i].recipe); + GenericRecipe recipe = assemfac.assemblerModule[i].getRecipe(); if(recipe != null) { ItemStack stack = recipe.getIcon(); stack.stackSize = 1; diff --git a/src/main/java/com/hbm/render/tileentity/RenderAssemblyMachine.java b/src/main/java/com/hbm/render/tileentity/RenderAssemblyMachine.java index 17eba939c..9b7407644 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderAssemblyMachine.java +++ b/src/main/java/com/hbm/render/tileentity/RenderAssemblyMachine.java @@ -4,7 +4,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; -import com.hbm.inventory.recipes.AssemblyMachineRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.main.MainRegistry; import com.hbm.main.ResourceManager; @@ -99,7 +98,7 @@ public class RenderAssemblyMachine extends TileEntitySpecialRenderer implements GL11.glShadeModel(GL11.GL_FLAT); - GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assembler.assemblerModule.recipe); + GenericRecipe recipe = assembler.assemblerModule.getRecipe(); if(recipe != null && MainRegistry.proxy.me().getDistanceSq(tileEntity.xCoord + 0.5, tileEntity.yCoord + 1, tileEntity.zCoord + 0.5) < 35 * 35) { GL11.glRotated(90, 0, 1, 0); diff --git a/src/main/java/com/hbm/render/tileentity/RenderChemicalPlant.java b/src/main/java/com/hbm/render/tileentity/RenderChemicalPlant.java index bd7657a69..4581d0475 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderChemicalPlant.java +++ b/src/main/java/com/hbm/render/tileentity/RenderChemicalPlant.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; import com.hbm.inventory.FluidStack; -import com.hbm.inventory.recipes.ChemicalPlantRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.main.ResourceManager; import com.hbm.render.item.ItemRenderBase; @@ -39,7 +38,7 @@ public class RenderChemicalPlant extends TileEntitySpecialRenderer implements II TileEntityMachineChemicalPlant chemplant = (TileEntityMachineChemicalPlant) tileEntity; float anim = chemplant.prevAnim + (chemplant.anim - chemplant.prevAnim) * interp; - GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplant.chemplantModule.recipe); + GenericRecipe recipe = chemplant.chemplantModule.getRecipe(); bindTexture(ResourceManager.chemical_plant_tex); ResourceManager.chemical_plant.renderPart("Base"); diff --git a/src/main/java/com/hbm/render/tileentity/RenderFusionPlasmaForge.java b/src/main/java/com/hbm/render/tileentity/RenderFusionPlasmaForge.java index 53cceadc8..9f50fc801 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderFusionPlasmaForge.java +++ b/src/main/java/com/hbm/render/tileentity/RenderFusionPlasmaForge.java @@ -5,7 +5,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; import com.hbm.inventory.fluid.Fluids; -import com.hbm.inventory.recipes.PlasmaForgeRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.main.MainRegistry; import com.hbm.main.ResourceManager; @@ -62,7 +61,7 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement bindTexture(ResourceManager.fusion_plasma_forge_tex); ResourceManager.fusion_plasma_forge.renderPart("Body"); - GenericRecipe recipe = PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe); + GenericRecipe recipe = forge.plasmaModule.getRecipe(); renderPlasma(forge); renderItem(forge, recipe, interp); diff --git a/src/main/java/com/hbm/render/tileentity/RenderPrecAss.java b/src/main/java/com/hbm/render/tileentity/RenderPrecAss.java index de84b54a4..e7a6cc2b3 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderPrecAss.java +++ b/src/main/java/com/hbm/render/tileentity/RenderPrecAss.java @@ -4,7 +4,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; -import com.hbm.inventory.recipes.PrecAssRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.main.MainRegistry; import com.hbm.main.ResourceManager; @@ -71,7 +70,7 @@ public class RenderPrecAss extends TileEntitySpecialRenderer implements IItemRen GL11.glShadeModel(GL11.GL_FLAT); - GenericRecipe recipe = PrecAssRecipes.INSTANCE.recipeNameMap.get(assembler.assemblerModule.recipe); + GenericRecipe recipe = assembler.assemblerModule.getRecipe(); if(recipe != null && MainRegistry.proxy.me().getDistanceSq(tileEntity.xCoord + 0.5, tileEntity.yCoord + 1, tileEntity.zCoord + 0.5) < 35 * 35) { GL11.glRotated(90, 0, 1, 0); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyFactory.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyFactory.java index 20b1e4a33..2324ba300 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyFactory.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyFactory.java @@ -12,7 +12,6 @@ import com.hbm.inventory.container.ContainerMachineAssemblyFactory; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachineAssemblyFactory; -import com.hbm.inventory.recipes.AssemblyMachineRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMachineUpgrade; @@ -158,7 +157,7 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl long nextMaxPower = 0; for(int i = 0; i < 4; i++) { - GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assemblerModule[i].recipe); + GenericRecipe recipe = assemblerModule[i].getRecipe(); if(recipe != null) { nextMaxPower += recipe.power * 100; } @@ -374,7 +373,7 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl int index = data.getInteger("index"); String selection = data.getString("selection"); if(index >= 0 && index < 4) { - this.assemblerModule[index].recipe = selection; + this.assemblerModule[index].setRecipe(selection, false); this.markChanged(); } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyMachine.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyMachine.java index 721cd9031..0592ad79e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyMachine.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssemblyMachine.java @@ -11,7 +11,6 @@ import com.hbm.inventory.container.ContainerMachineAssemblyMachine; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachineAssemblyMachine; -import com.hbm.inventory.recipes.AssemblyMachineRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMachineUpgrade; @@ -30,6 +29,8 @@ import com.hbm.util.i18n.I18nUtil; import api.hbm.energymk2.IEnergyReceiverMK2; import api.hbm.fluidmk2.IFluidStandardTransceiverMK2; +import api.hbm.redstoneoverradio.IRORInteractive; +import api.hbm.redstoneoverradio.IRORValueProvider; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import io.netty.buffer.ByteBuf; @@ -41,7 +42,7 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; -public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider { +public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiverMK2, IUpgradeInfoProvider, IControlReceiver, IGUIProvider, IRORValueProvider, IRORInteractive { public FluidTank inputTank; public FluidTank outputTank; @@ -88,7 +89,7 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl if(!worldObj.isRemote) { - GenericRecipe recipe = AssemblyMachineRecipes.INSTANCE.recipeNameMap.get(assemblerModule.recipe); + GenericRecipe recipe = assemblerModule.getRecipe(); if(recipe != null) { this.maxPower = recipe.power * 100; } @@ -303,7 +304,7 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl int index = data.getInteger("index"); String selection = data.getString("selection"); if(index == 0) { - this.assemblerModule.recipe = selection; + this.assemblerModule.setRecipe(selection, false); this.markChanged(); } } @@ -482,4 +483,34 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl }; } } + + @Override + public String[] getFunctionInfo() { + return new String[] { + PREFIX_VALUE + "progress", + PREFIX_VALUE + "recipe", + PREFIX_VALUE + "active", + PREFIX_FUNCTION + "setrecipe" + NAME_SEPARATOR + "name", + }; + } + + @Override + public String provideRORValue(String name) { + if("progress".equals(name)) return "" + (int) Math.round(this.assemblerModule.progress * 100); + if("recipe".equals(name)) return this.assemblerModule.getRecipeName(); + if("active".equals(name)) return "" + (this.didProcess ? 1 : 0); + return null; + } + + @Override + public String runRORFunction(String name, String[] params) { + + if("setrecipe".equals(name) && params.length == 1) { + this.assemblerModule.setRecipe(params[0], true); + this.markChanged(); + return null; + } + + return null; + } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalFactory.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalFactory.java index 8f0e8a905..2f1c80eb4 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalFactory.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalFactory.java @@ -10,7 +10,6 @@ import com.hbm.inventory.container.ContainerMachineChemicalFactory; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachineChemicalFactory; -import com.hbm.inventory.recipes.ChemicalPlantRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMachineUpgrade; @@ -158,7 +157,7 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl long nextMaxPower = 0; for(int i = 0; i < 4; i++) { - GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplantModule[i].recipe); + GenericRecipe recipe = chemplantModule[i].getRecipe(); if(recipe != null) { nextMaxPower += recipe.power * 100; } @@ -400,7 +399,7 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl int index = data.getInteger("index"); String selection = data.getString("selection"); if(index >= 0 && index < 4) { - this.chemplantModule[index].recipe = selection; + this.chemplantModule[index].setRecipe(selection, false); this.markChanged(); } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalPlant.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalPlant.java index b4c730928..50e779f1c 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalPlant.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemicalPlant.java @@ -10,7 +10,6 @@ import com.hbm.inventory.container.ContainerMachineChemicalPlant; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachineChemicalPlant; -import com.hbm.inventory.recipes.ChemicalPlantRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMachineUpgrade; @@ -86,7 +85,7 @@ public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implem if(!worldObj.isRemote) { - GenericRecipe recipe = ChemicalPlantRecipes.INSTANCE.recipeNameMap.get(chemplantModule.recipe); + GenericRecipe recipe = chemplantModule.getRecipe(); if(recipe != null) { this.maxPower = recipe.power * 100; } @@ -278,7 +277,7 @@ public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implem int index = data.getInteger("index"); String selection = data.getString("selection"); if(index == 0) { - this.chemplantModule.recipe = selection; + this.chemplantModule.setRecipe(selection, false); this.markChanged(); } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePUREX.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePUREX.java index 0aca4f5b6..6f20e2e69 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePUREX.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePUREX.java @@ -10,7 +10,6 @@ import com.hbm.inventory.container.ContainerMachinePUREX; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachinePUREX; -import com.hbm.inventory.recipes.PUREXRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMachineUpgrade; @@ -80,7 +79,7 @@ public class TileEntityMachinePUREX extends TileEntityMachineBase implements IEn if(!worldObj.isRemote) { - GenericRecipe recipe = PUREXRecipes.INSTANCE.recipeNameMap.get(purexModule.recipe); + GenericRecipe recipe = purexModule.getRecipe(); if(recipe != null) { this.maxPower = recipe.power * 100; } @@ -235,7 +234,7 @@ public class TileEntityMachinePUREX extends TileEntityMachineBase implements IEn int index = data.getInteger("index"); String selection = data.getString("selection"); if(index == 0) { - this.purexModule.recipe = selection; + this.purexModule.setRecipe(selection, false); this.markChanged(); } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePrecAss.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePrecAss.java index b8429c2e5..c441bff3e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePrecAss.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachinePrecAss.java @@ -10,7 +10,6 @@ import com.hbm.inventory.container.ContainerMachinePrecAss; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachinePrecAss; -import com.hbm.inventory.recipes.PrecAssRecipes; import com.hbm.inventory.recipes.loader.GenericRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMachineUpgrade; @@ -93,7 +92,7 @@ public class TileEntityMachinePrecAss extends TileEntityMachineBase implements I if(!worldObj.isRemote) { - GenericRecipe recipe = PrecAssRecipes.INSTANCE.recipeNameMap.get(assemblerModule.recipe); + GenericRecipe recipe = assemblerModule.getRecipe(); if(recipe != null) { this.maxPower = recipe.power * 100; } @@ -352,7 +351,7 @@ public class TileEntityMachinePrecAss extends TileEntityMachineBase implements I int index = data.getInteger("index"); String selection = data.getString("selection"); if(index == 0) { - this.assemblerModule.recipe = selection; + this.assemblerModule.setRecipe(selection, false); this.markChanged(); } } diff --git a/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionPlasmaForge.java b/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionPlasmaForge.java index 9d8cf978c..3ac9468d1 100644 --- a/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionPlasmaForge.java +++ b/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionPlasmaForge.java @@ -16,7 +16,6 @@ import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.gui.GUIMachinePlasmaForge; import com.hbm.inventory.recipes.PlasmaForgeRecipe; -import com.hbm.inventory.recipes.PlasmaForgeRecipes; import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.main.MainRegistry; @@ -156,7 +155,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement if(receiverNode != null && receiverNode.hasValidNet()) receiverNode.net.addReceiver(this); if(providerNode != null && providerNode.hasValidNet()) providerNode.net.addProvider(this); // technically unused, but good to have when we do something else with the plasma nets - PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(plasmaModule.recipe); + PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) plasmaModule.getRecipe(); if(recipe != null) this.maxPower = recipe.power * 100; this.maxPower = BobMathUtil.max(this.power, this.maxPower, 100_000); @@ -364,7 +363,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement int index = data.getInteger("index"); String selection = data.getString("selection"); if(index == 0) { - this.plasmaModule.recipe = selection; + this.plasmaModule.setRecipe(selection, false); this.markChanged(); } } diff --git a/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionTorus.java b/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionTorus.java index 9208fab1f..b278623fe 100644 --- a/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionTorus.java +++ b/src/main/java/com/hbm/tileentity/machine/fusion/TileEntityFusionTorus.java @@ -473,7 +473,7 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP int index = data.getInteger("index"); String selection = data.getString("selection"); if(index == 0) { - this.fusionModule.recipe = selection; + this.fusionModule.setRecipe(selection, false); this.markChanged(); } } diff --git a/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageExporter.java b/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageExporter.java index 2c01aff94..b639fbb56 100644 --- a/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageExporter.java +++ b/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageExporter.java @@ -4,7 +4,9 @@ package com.hbm.tileentity.network.pneumatic; import com.hbm.interfaces.IControlReceiver; import com.hbm.inventory.container.ContainerPneumoStorageExporter; import com.hbm.inventory.gui.GUIPneumoStorageExporter; +import com.hbm.tileentity.network.RTTYSystem; +import api.hbm.ntl.StackCache.CacheSlot; import api.hbm.redstoneoverradio.IRORInteractive; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; @@ -20,8 +22,8 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB public boolean rorConfiguredMode = false; /** What strategy to use for handling request filters */ public int requestMode = 0; - /** Item ID and meta pairs for RoR controlled filters */ - public short[][] rorFilters = new short[9][2]; + /** Item ID and meta pairs with amount for RoR controlled filters */ + public short[][] rorFilters = new short[9][3]; /** Each slot individually tries to pull as much as it can of the configured item */ public static final int MODE_AS_MUCH_AS_POSSIBLE = 0; @@ -47,6 +49,23 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB this.networkPackNT(15); } } + + public void doRequest(boolean force) { + + } + + public void requestSlot(int slot, boolean force) { + + } + + public long getAvailability(int item, int meta) { + if(this.cache == null || this.cache.hasExpired) return 0; + long hash = this.cache.getStackIdentity(item, meta, null); + if(hash == this.cache.getNullIdentity()) return 0; + CacheSlot slot = this.cache.cacheSlots.get(hash); + if(slot == null) return 0; + return slot.stacksize; + } @Override public void serialize(ByteBuf buf) { @@ -57,6 +76,7 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB for(int i = 0; i < 9; i++) { buf.writeShort(rorFilters[i][0]); buf.writeShort(rorFilters[i][1]); + buf.writeShort(rorFilters[i][2]); } } @@ -69,6 +89,7 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB for(int i = 0; i < 9; i++) { rorFilters[i][0] = buf.readShort(); rorFilters[i][1] = buf.readShort(); + rorFilters[i][2] = buf.readShort(); } } @@ -96,7 +117,7 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB public String[] getFunctionInfo() { return new String[] { PREFIX_FUNCTION + "setfilter" + NAME_SEPARATOR + "slot" + PARAM_SEPARATOR + "itemid" + PARAM_SEPARATOR + "itemmeta" + PARAM_SEPARATOR + "amount", - PREFIX_FUNCTION + "setcontinuous" + NAME_SEPARATOR + "slot" + PARAM_SEPARATOR + "itemid" + PARAM_SEPARATOR + "itemmeta" + PARAM_SEPARATOR + "amount", + PREFIX_FUNCTION + "setcontinuous" + NAME_SEPARATOR + "on/off", PREFIX_FUNCTION + "request", PREFIX_FUNCTION + "requestslot" + NAME_SEPARATOR + "slot", PREFIX_FUNCTION + "checkavailability" + NAME_SEPARATOR + "itemid" + PARAM_SEPARATOR + "itemmeta" + PARAM_SEPARATOR + "returnchannel", @@ -105,6 +126,47 @@ public class TileEntityPneumoStorageExporter extends TileEntityPneumaticMachineB @Override public String runRORFunction(String name, String[] params) { + + if("setfilter".equals(name) && params.length == 4) { + int slot = IRORInteractive.parseInt(params[0], 1, 9) - 1; + int itemId = IRORInteractive.parseInt(params[1], 0, Short.MAX_VALUE); + int meta = IRORInteractive.parseInt(params[2], 0, Short.MAX_VALUE); + int amount = IRORInteractive.parseInt(params[3], 1, 64); + + this.rorFilters[slot][0] = (short) itemId; + this.rorFilters[slot][1] = (short) meta; + this.rorFilters[slot][2] = (short) amount; + this.markChanged(); + return null; + } + + if("setcontinuous".equals(name) && params.length == 1) { + if("on".equals(params[0])) this.continuousRequest = true; + if("off".equals(params[0])) this.continuousRequest = false; + this.markChanged(); + return null; + } + + if("request".equals(name)) { + this.doRequest(true); + return null; + } + + if("requestslot".equals(name) && params.length == 1) { + int slot = IRORInteractive.parseInt(params[0], 1, 9) - 1; + this.requestSlot(slot, true); + return null; + } + + if("checkavailability".equals(name) && params.length == 3) { + int itemId = IRORInteractive.parseInt(params[0], 0, Short.MAX_VALUE); + int meta = IRORInteractive.parseInt(params[1], 0, Short.MAX_VALUE); + String ret = params[2]; + long availability = this.getAvailability(itemId, meta); + RTTYSystem.broadcast(worldObj, ret, availability + ""); + return null; + } + return null; } } diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_chemplant.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_chemplant.png index 3ce1bc32c7c7bc336caa829c6559d5caf3a9c325..b5435bfee38adf0d566ca4428fd6868d169fc1a0 100644 GIT binary patch literal 3643 zcmbtXXH-+!7QP83AVX+2YCto9B7HHWB_kOJe=!Je{Z{4|>z$3Brc}nF*>L8tkBU^fDad3#fO&_crs|>Tg$Zh6sIC92) zUX4Uu3!0&qhpuf!kQ!?k)c%ICgz$@g^AzEQol7}Vw!Re-ooA}IoLwfc;;JetZmvFa zBlQvBs>KaqVH--Fb^_0iUF@M)+s^_u-oc}{yBII)XqnojpI5%m`R zv@trO8;2NN)Jw;NWOg;Rw!RzlqNat@dBwdodGxz+QPmp6I>&N}Hpgnq4{Au@^-Xj# zo8o$M7t2?z<>B%1IltcIqFagp_{w*N!T2;uTN@4N#rflz6Mck>xOyA%XMs9w=mq6z$TOibsxIti22RJC7<6D~4E3-hkJdIzt&t6G?Q~ z+}xMfG@7Z=1QHSQX6^R_yy@O+a+}>H(-pvNfPlWR@Ud4aD|DyBgHW=(VUWJ%HBC?7 znosa2Y+rny5;ta+g)8Ah^v(h^?emW4OYl>yUyJ2&4Wilevpvn6S_L*Pi_Su-fLe@} zhnIc%SlQ<|3&o6QJ-V{zjOAg&IWJjxXPTav=u5k-7?BK&e}ZhX#@cx4nbRY`PsYlC zpYfZv0X6cezx|cG1PitOnG5cPitAnIUi3P;+4{P<9w$qU1YWvz9!NdSKmHZ0wZBwJ9{ zKMUA#3`>1hBr2(+2qm}`0-T7&$XUS*`Lqd_z%V09#Jk@}^b-BwSX!7YAxu-){>IW9 zI1{qyWhR-=pTLGA6p4>=nOjo$jm-aV%@rX^YHD(6z|@Teo*&q`t-#GjK~mCdUV&n> zK@=7HTq#U39GctZ{c|mEZO6O6sB>SeRDPMaTB|822A3xO8 zydt2yu>Tp_JgZbAk4am#*p9oMr2{Gb{Jhu0sj}AhLJPS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