mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
more plasma forge crap
This commit is contained in:
parent
f7c0cd130a
commit
6caea5ecc4
@ -6,6 +6,9 @@
|
|||||||
* This allows plasma forges to be chained, or unused residue energy to be used in turbines
|
* This allows plasma forges to be chained, or unused residue energy to be used in turbines
|
||||||
* Parts that interact with the fusion reactor directly, like the collector chambers, are not compatible
|
* Parts that interact with the fusion reactor directly, like the collector chambers, are not compatible
|
||||||
* Like all assembler-type machines, features custom animations (i spent a lot of time on those, please look at them for prolonged periods of time, ideally without blinking)
|
* Like all assembler-type machines, features custom animations (i spent a lot of time on those, please look at them for prolonged periods of time, ideally without blinking)
|
||||||
|
* Base production rates for plasma forge exclusive recipes are very slow
|
||||||
|
* Does not accept upgrades, however, can use up otherwise useless fission fragments and unstable isotopes to gain a temporary x4 speed bonus with no penalty
|
||||||
|
* Can also assemble fusion reactor vessels, which are cheaper but need quantum circuits
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
||||||
@ -17,6 +20,7 @@
|
|||||||
* The DFC parts are now made in the plasma forge, with the recipes being more expensive
|
* The DFC parts are now made in the plasma forge, with the recipes being more expensive
|
||||||
* The restrictions for firing Folly (using the scope, waiting for the startup) no longer apply to NPCs (which can never fulfill them anyway), allowing them to actually use it
|
* The restrictions for firing Folly (using the scope, waiting for the startup) no longer apply to NPCs (which can never fulfill them anyway), allowing them to actually use it
|
||||||
* The plinking sound played when a drill cannot break a block now only plays once for the entire AoE instead of once for every single block that couldn't be broken
|
* The plinking sound played when a drill cannot break a block now only plays once for the entire AoE instead of once for every single block that couldn't be broken
|
||||||
|
* Fluid barrels now have a sideways connector when hooked up to pipes, bridging the two pixel gap
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed size 15 dual kerosene thruster not rendering at all
|
* Fixed size 15 dual kerosene thruster not rendering at all
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package com.hbm.inventory.gui;
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
|
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
|
||||||
@ -18,6 +21,7 @@ import net.minecraft.client.renderer.OpenGlHelper;
|
|||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
@ -58,6 +62,38 @@ public class GUIMachinePlasmaForge extends GuiInfoContainer {
|
|||||||
} else {
|
} else {
|
||||||
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, "0TU / 0TU");
|
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, "0TU / 0TU");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.isMouseOverSlot(this.inventorySlots.getSlot(2), mouseX, mouseY) && forge.slots[2] == null && this.mc.thePlayer.inventory.getItemStack() == null) {
|
||||||
|
|
||||||
|
List<ItemStack> list = new ArrayList();
|
||||||
|
forge.boosters.forEach((pair) -> list.addAll(pair.getKey().extractForNEI()));
|
||||||
|
List<Object[]> lines = new ArrayList();
|
||||||
|
ItemStack selected = list.get(0);
|
||||||
|
|
||||||
|
// ...i should really make a util for this
|
||||||
|
if(list.size() > 1) {
|
||||||
|
int cycle = (int) ((System.currentTimeMillis() % (1000 * list.size())) / 1000);
|
||||||
|
selected = ((ItemStack) list.get(cycle)).copy();
|
||||||
|
selected.stackSize = 0;
|
||||||
|
list.set(cycle, selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list.size() < 10) {
|
||||||
|
lines.add(list.toArray());
|
||||||
|
} else if(list.size() < 24) {
|
||||||
|
lines.add(list.subList(0, list.size() / 2).toArray());
|
||||||
|
lines.add(list.subList(list.size() / 2, list.size()).toArray());
|
||||||
|
} else {
|
||||||
|
int bound0 = (int) Math.ceil(list.size() / 3D);
|
||||||
|
int bound1 = (int) Math.ceil(list.size() / 3D * 2D);
|
||||||
|
lines.add(list.subList(0, bound0).toArray());
|
||||||
|
lines.add(list.subList(bound0, bound1).toArray());
|
||||||
|
lines.add(list.subList(bound1, list.size()).toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
lines.add(new Object[] {I18nUtil.resolveKey(selected.getDisplayName())});
|
||||||
|
this.drawStackText(lines, mouseX, mouseY, this.fontRendererObj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -106,7 +142,7 @@ public class GUIMachinePlasmaForge extends GuiInfoContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
double inputGauge = recipe == null ? 0 : Math.min(((double) forge.plasmaEnergySync / (double) recipe.ignitionTemp), 1.5) / 1.5D;
|
double inputGauge = recipe == null ? 0 : Math.min(((double) forge.plasmaEnergySync / (double) recipe.ignitionTemp), 1.5) / 1.5D;
|
||||||
double boosterGauge = 0;
|
double boosterGauge = forge.maxBooster <= 0 ? 0 : (double) forge.booster / (double) forge.maxBooster;
|
||||||
|
|
||||||
// input energy
|
// input energy
|
||||||
GaugeUtil.drawSmoothGauge(guiLeft + 34, guiTop + 124, this.zLevel, inputGauge, 5, 2, 1, 0xA00000);
|
GaugeUtil.drawSmoothGauge(guiLeft + 34, guiTop + 124, this.zLevel, inputGauge, 5, 2, 1, 0xA00000);
|
||||||
|
|||||||
@ -99,52 +99,68 @@ public class PlasmaForgeRecipes extends GenericRecipes<PlasmaForgeRecipe> {
|
|||||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateCast(), 2))
|
.inputItems(new OreDictStack(OSMIRIDIUM.plateCast(), 2))
|
||||||
.inputFluids(new FluidStack(Fluids.REFORMGAS, 16_000)).setGroup(autoPlate, this));
|
.inputFluids(new FluidStack(Fluids.REFORMGAS, 16_000)).setGroup(autoPlate, this));
|
||||||
|
|
||||||
|
// Fusion
|
||||||
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.fusionvessel").setInputEnergy(3_000_000).setup(1_200, 2_000_000).outputItems(new ItemStack(ModBlocks.fusion_torus))
|
||||||
|
.inputItems(new ComparableStack(ModBlocks.fusion_component, 64, 0),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 0),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 0),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 0),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 0),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 0),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 3),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 3),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 3),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 2),
|
||||||
|
new ComparableStack(ModBlocks.fusion_component, 64, 2),
|
||||||
|
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CHIP_QUANTUM))
|
||||||
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
|
|
||||||
// ICF
|
// ICF
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcell").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CELL.ordinal()))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcell").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CELL.ordinal()))
|
||||||
.inputItems(new ComparableStack(ModItems.ingot_cft, 2), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new ComparableStack(ModBlocks.glass_quartz, 16))
|
.inputItems(new ComparableStack(ModItems.ingot_cft, 2), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new ComparableStack(ModBlocks.glass_quartz, 16))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.ingot_cft, 8), new ComparableStack(ModBlocks.glass_quartz, 16))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.ingot_cft, 8), new ComparableStack(ModBlocks.glass_quartz, 16))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfemitter").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.EMITTER.ordinal()))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfemitter").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.EMITTER.ordinal()))
|
||||||
.inputItems(new OreDictStack(W.plateWelded(), 4), new OreDictStack(MAGTUNG.wireDense(), 16))
|
.inputItems(new OreDictStack(W.plateWelded(), 4), new OreDictStack(MAGTUNG.wireDense(), 16))
|
||||||
.inputItemsEx(new OreDictStack(W.plateWelded(), 8), new OreDictStack(MAGTUNG.wireDense(), 16))
|
.inputItemsEx(new OreDictStack(W.plateWelded(), 8), new OreDictStack(MAGTUNG.wireDense(), 16))
|
||||||
.inputFluids(new FluidStack(Fluids.XENON, 16_000))
|
.inputFluids(new FluidStack(Fluids.XENON, 16_000))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcapacitor").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CAPACITOR.ordinal()))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcapacitor").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CAPACITOR.ordinal()))
|
||||||
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 1), new OreDictStack(ND.wireDense(), 16), new OreDictStack(SBD.wireDense(), 2))
|
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 1), new OreDictStack(ND.wireDense(), 16), new OreDictStack(SBD.wireDense(), 2))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.FERRO_PLATING), new OreDictStack(ND.wireDense(), 16), new OreDictStack(SBD.wireDense(), 2))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.FERRO_PLATING), new OreDictStack(ND.wireDense(), 16), new OreDictStack(SBD.wireDense(), 2))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfturbo").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.TURBO.ordinal()))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfturbo").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.TURBO.ordinal()))
|
||||||
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new OreDictStack(DNT.wireDense(), 4), new OreDictStack(SBD.wireDense(), 4))
|
.inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new OreDictStack(DNT.wireDense(), 4), new OreDictStack(SBD.wireDense(), 4))
|
||||||
.inputItemsEx(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(DNT.wireDense(), 8), new OreDictStack(SBD.wireDense(), 4))
|
.inputItemsEx(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(DNT.wireDense(), 8), new OreDictStack(SBD.wireDense(), 4))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcasing").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CASING.ordinal()))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcasing").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.CASING.ordinal()))
|
||||||
.inputItems(new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16))
|
.inputItems(new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfport").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.PORT.ordinal()))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfport").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.PORT.ordinal()))
|
||||||
.inputItems(new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ND.wireDense(), 16))
|
.inputItems(new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ND.wireDense(), 16))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ND.wireDense(), 16))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ND.wireDense(), 16))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcontroller").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_controller, 1))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcontroller").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_controller, 1))
|
||||||
.inputItems(new ComparableStack(ModItems.ingot_cft, 16), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID))
|
.inputItems(new ComparableStack(ModItems.ingot_cft, 16), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.ingot_cft, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.BISMOID), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.COMPUTER))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.ingot_cft, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.BISMOID), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.COMPUTER))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfscaffold").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_component, 1, 0))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfscaffold").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_component, 1, 0))
|
||||||
.inputItems(new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(TI.plateWelded(), 2))
|
.inputItems(new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(TI.plateWelded(), 2))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfvessel").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_component, 1, 1))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfvessel").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_component, 1, 1))
|
||||||
.inputItems(new ComparableStack(ModItems.ingot_cft, 1), new OreDictStack(CMB.plateCast(), 1), new OreDictStack(W.plateWelded(), 2))
|
.inputItems(new ComparableStack(ModItems.ingot_cft, 1), new OreDictStack(CMB.plateCast(), 1), new OreDictStack(W.plateWelded(), 2))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfstructural").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_component, 1, 3))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfstructural").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.icf_component, 1, 3))
|
||||||
.inputItems(new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(CU.plateWelded(), 2), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 1))
|
.inputItems(new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(CU.plateWelded(), 2), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 1))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(STEEL.plateWelded(), 8))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(STEEL.plateWelded(), 8))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcore").setInputEnergy(1_000_000).setup(1_200, 10_000_000).outputItems(new ItemStack(ModBlocks.struct_icf_core, 1))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfcore").setInputEnergy(1_000_000).setup(3_000, 10_000_000).outputItems(new ItemStack(ModBlocks.struct_icf_core, 1))
|
||||||
.inputItems(new OreDictStack(CMB.plateWelded(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 16), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 16), new OreDictStack(SBD.wireDense(), 32), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.BISMOID), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.QUANTUM))
|
.inputItems(new OreDictStack(CMB.plateWelded(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 16), new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 16), new OreDictStack(SBD.wireDense(), 32), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.BISMOID), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.QUANTUM))
|
||||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(CMB.plateWelded(), 16), new OreDictStack(SBD.wireDense(), 32), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.QUANTUM), new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.COMPUTER))
|
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(CMB.plateWelded(), 16), new OreDictStack(SBD.wireDense(), 32), new ComparableStack(ModItems.circuit, 32, EnumCircuitType.QUANTUM), new ComparableStack(ModItems.item_expensive, 16, EnumExpensiveType.COMPUTER))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfpress").setInputEnergy(1_000_000).setup(200, 10_000_000).outputItems(new ItemStack(ModBlocks.machine_icf_press, 1))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.icfpress").setInputEnergy(1_000_000).setup(800, 10_000_000).outputItems(new ItemStack(ModBlocks.machine_icf_press, 1))
|
||||||
.inputItems(new OreDictStack(GOLD.plateCast(), 8), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID))
|
.inputItems(new OreDictStack(GOLD.plateCast(), 8), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID))
|
||||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||||
|
|
||||||
@ -164,7 +180,7 @@ public class PlasmaForgeRecipes extends GenericRecipes<PlasmaForgeRecipe> {
|
|||||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||||
new ComparableStack(ModItems.fragment_meteorite, 64)));
|
new ComparableStack(ModItems.fragment_meteorite, 64)));
|
||||||
|
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("ass.fensusan").setInputEnergy(50_000_000).setup(1_200, 50_000_000).outputItems(new ItemStack(ModBlocks.machine_battery_redd, 1))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("ass.fensusan").setInputEnergy(50_000_000).setup(6_000, 50_000_000).outputItems(new ItemStack(ModBlocks.machine_battery_redd, 1))
|
||||||
.inputItems(new ComparableStack(ModItems.ingot_electronium, 64),
|
.inputItems(new ComparableStack(ModItems.ingot_electronium, 64),
|
||||||
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
|
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
|
||||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||||
@ -190,7 +206,7 @@ public class PlasmaForgeRecipes extends GenericRecipes<PlasmaForgeRecipe> {
|
|||||||
new ComparableStack(ModItems.ingot_cft, 64),
|
new ComparableStack(ModItems.ingot_cft, 64),
|
||||||
new ComparableStack(ModItems.ingot_cft, 64)));
|
new ComparableStack(ModItems.ingot_cft, 64)));
|
||||||
|
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.gerald").setInputEnergy(25_000_000).setup(6_000, 50_000_000).outputItems(new ItemStack(ModItems.sat_gerald, 1))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.gerald").setInputEnergy(25_000_000).setup(12_000, 50_000_000).outputItems(new ItemStack(ModItems.sat_gerald, 1))
|
||||||
.inputItems(new OreDictStack(SBD.plateCast(), 64),
|
.inputItems(new OreDictStack(SBD.plateCast(), 64),
|
||||||
new OreDictStack(SBD.plateCast(), 64),
|
new OreDictStack(SBD.plateCast(), 64),
|
||||||
new OreDictStack(BSCCO.wireDense(), 64),
|
new OreDictStack(BSCCO.wireDense(), 64),
|
||||||
@ -216,15 +232,15 @@ public class PlasmaForgeRecipes extends GenericRecipes<PlasmaForgeRecipe> {
|
|||||||
new ComparableStack(ModItems.coin_ufo, 1)).setPools(PlasmaForgeRecipes.POOL_PREFIX_DISCOVER + "gerald"));
|
new ComparableStack(ModItems.coin_ufo, 1)).setPools(PlasmaForgeRecipes.POOL_PREFIX_DISCOVER + "gerald"));
|
||||||
|
|
||||||
// really, really boring fucking temp recipes
|
// really, really boring fucking temp recipes
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfccore").setInputEnergy(50_000_000).setup(1_200, 100_000_000).outputItems(new ItemStack(ModBlocks.dfc_core)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 12_000))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfccore").setInputEnergy(50_000_000).setup(12_000, 100_000_000).outputItems(new ItemStack(ModBlocks.dfc_core)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 12_000))
|
||||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(DNT.wireDense(), 16), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CONTROLLER_QUANTUM), new ComparableStack(ModItems.singularity_spark), new ComparableStack(ModItems.powder_chlorophyte, 64)));
|
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(DNT.wireDense(), 16), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CONTROLLER_QUANTUM), new ComparableStack(ModItems.singularity_spark), new ComparableStack(ModItems.powder_chlorophyte, 64)));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcemitter").setInputEnergy(50_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_emitter)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcemitter").setInputEnergy(50_000_000).setup(1_200, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_emitter)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
||||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(STAR.wireDense(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_QUANTUM)));
|
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(STAR.wireDense(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_QUANTUM)));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcreceiver").setInputEnergy(50_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_receiver)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcreceiver").setInputEnergy(50_000_000).setup(1_200, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_receiver)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
||||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(STAR.plateCast(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_QUANTUM)));
|
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(STAR.plateCast(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_QUANTUM)));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcinjector").setInputEnergy(50_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_injector)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcinjector").setInputEnergy(50_000_000).setup(1_200, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_injector)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
||||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(BIGMT.plateCast(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CONTROLLER_ADVANCED)));
|
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(BIGMT.plateCast(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CONTROLLER_ADVANCED)));
|
||||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcstabilizer").setInputEnergy(50_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_stabilizer)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.dfcstabilizer").setInputEnergy(50_000_000).setup(1_200, 10_000_000).outputItems(new ItemStack(ModBlocks.dfc_stabilizer)).inputFluids(new FluidStack(Fluids.STELLAR_FLUX, 4_000))
|
||||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(SBD.wireDense(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_QUANTUM)));
|
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(SBD.wireDense(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_QUANTUM)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,8 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
|||||||
GL11.glRotated(jet[2], 0, 0, 1);
|
GL11.glRotated(jet[2], 0, 0, 1);
|
||||||
GL11.glTranslated(-1.5, -3.75, 0);
|
GL11.glTranslated(-1.5, -3.75, 0);
|
||||||
ResourceManager.fusion_plasma_forge.renderPart("Jet");
|
ResourceManager.fusion_plasma_forge.renderPart("Jet");
|
||||||
if(forge.didProcess && forge.armJet.angles[2] == forge.armJet.prevAngles[2]) renderJet(forge);
|
// the forge needs to be active and the jet arm needs to not move and not be in base position
|
||||||
|
if(forge.didProcess && forge.armJet.angles[2] == forge.armJet.prevAngles[2] && forge.armJet.angles[2] != 0) renderJet(forge);
|
||||||
} GL11.glPopMatrix();
|
} GL11.glPopMatrix();
|
||||||
} GL11.glPopMatrix();
|
} GL11.glPopMatrix();
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,16 @@
|
|||||||
package com.hbm.tileentity.machine.fusion;
|
package com.hbm.tileentity.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import static com.hbm.inventory.OreDictManager.*;
|
||||||
|
|
||||||
import com.hbm.interfaces.IControlReceiver;
|
import com.hbm.interfaces.IControlReceiver;
|
||||||
|
import com.hbm.inventory.RecipesCommon.AStack;
|
||||||
|
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||||
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
|
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
@ -21,6 +27,7 @@ import com.hbm.uninos.INetworkProvider;
|
|||||||
import com.hbm.uninos.UniNodespace;
|
import com.hbm.uninos.UniNodespace;
|
||||||
import com.hbm.uninos.networkproviders.PlasmaNetworkProvider;
|
import com.hbm.uninos.networkproviders.PlasmaNetworkProvider;
|
||||||
import com.hbm.util.BobMathUtil;
|
import com.hbm.util.BobMathUtil;
|
||||||
|
import com.hbm.util.Tuple.Pair;
|
||||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
@ -54,6 +61,9 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
protected GenNode receiverNode;
|
protected GenNode receiverNode;
|
||||||
protected GenNode providerNode;
|
protected GenNode providerNode;
|
||||||
|
|
||||||
|
public int booster;
|
||||||
|
public int maxBooster;
|
||||||
|
|
||||||
public int timeOffset = -1;
|
public int timeOffset = -1;
|
||||||
|
|
||||||
public ModuleMachinePlasma plasmaModule;
|
public ModuleMachinePlasma plasmaModule;
|
||||||
@ -67,6 +77,31 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
public ForgeArm armStriker;
|
public ForgeArm armStriker;
|
||||||
public ForgeArm armJet;
|
public ForgeArm armJet;
|
||||||
|
|
||||||
|
public static List<Pair<AStack, Integer>> boosters = new ArrayList();
|
||||||
|
|
||||||
|
static {
|
||||||
|
boosters.add(new Pair(new OreDictStack(CO60.nugget()), 20));
|
||||||
|
boosters.add(new Pair(new OreDictStack(CO60.billet()), 120));
|
||||||
|
boosters.add(new Pair(new OreDictStack(CO60.ingot()), 200));
|
||||||
|
boosters.add(new Pair(new OreDictStack(CO60.dust()), 200));
|
||||||
|
boosters.add(new Pair(new OreDictStack(SR90.nugget()), 40));
|
||||||
|
boosters.add(new Pair(new OreDictStack(SR90.dustTiny()), 40));
|
||||||
|
boosters.add(new Pair(new OreDictStack(SR90.billet()), 240));
|
||||||
|
boosters.add(new Pair(new OreDictStack(SR90.ingot()), 400));
|
||||||
|
boosters.add(new Pair(new OreDictStack(SR90.dust()), 400));
|
||||||
|
boosters.add(new Pair(new OreDictStack(AU198.nugget()), 60));
|
||||||
|
boosters.add(new Pair(new OreDictStack(AU198.billet()), 360));
|
||||||
|
boosters.add(new Pair(new OreDictStack(AU198.ingot()), 600));
|
||||||
|
boosters.add(new Pair(new OreDictStack(AU198.dust()), 600));
|
||||||
|
boosters.add(new Pair(new OreDictStack(I131.dustTiny()), 60));
|
||||||
|
boosters.add(new Pair(new OreDictStack(I131.dust()), 600));
|
||||||
|
boosters.add(new Pair(new OreDictStack(XE135.dustTiny()), 60));
|
||||||
|
boosters.add(new Pair(new OreDictStack(XE135.dust()), 600));
|
||||||
|
boosters.add(new Pair(new OreDictStack(CS137.dustTiny()), 50));
|
||||||
|
boosters.add(new Pair(new OreDictStack(CS137.dust()), 500));
|
||||||
|
boosters.add(new Pair(new OreDictStack(AT209.dust()), 1_200));
|
||||||
|
}
|
||||||
|
|
||||||
public TileEntityFusionPlasmaForge() {
|
public TileEntityFusionPlasmaForge() {
|
||||||
super(16);
|
super(16);
|
||||||
this.inputTank = new FluidTank(Fluids.NONE, 16_000);
|
this.inputTank = new FluidTank(Fluids.NONE, 16_000);
|
||||||
@ -102,6 +137,16 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
this.plasmaEnergySync = this.plasmaEnergy;
|
this.plasmaEnergySync = this.plasmaEnergy;
|
||||||
this.plasmaEnergy = 0;
|
this.plasmaEnergy = 0;
|
||||||
|
|
||||||
|
if(booster <= 0 && slots[2] != null) {
|
||||||
|
for(Pair<AStack, Integer> booster : boosters) {
|
||||||
|
if(booster.getKey().matchesRecipe(slots[2], true)) {
|
||||||
|
this.maxBooster = this.booster = booster.getValue();
|
||||||
|
this.decrStackSize(2, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ForgeDirection rot = ForgeDirection.getOrientation(this.getBlockMetadata() - 10).getRotation(ForgeDirection.UP);
|
ForgeDirection rot = ForgeDirection.getOrientation(this.getBlockMetadata() - 10).getRotation(ForgeDirection.UP);
|
||||||
if(receiverNode == null || receiverNode.expired) receiverNode = this.createNode(PlasmaNetworkProvider.THE_PROVIDER, rot);
|
if(receiverNode == null || receiverNode.expired) receiverNode = this.createNode(PlasmaNetworkProvider.THE_PROVIDER, rot);
|
||||||
if(providerNode == null || providerNode.expired) providerNode = this.createNode(PlasmaNetworkProvider.THE_PROVIDER, rot.getOpposite());
|
if(providerNode == null || providerNode.expired) providerNode = this.createNode(PlasmaNetworkProvider.THE_PROVIDER, rot.getOpposite());
|
||||||
@ -120,7 +165,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
if(inputTank.getTankType() != Fluids.NONE) this.trySubscribe(inputTank.getTankType(), worldObj, pos);
|
if(inputTank.getTankType() != Fluids.NONE) this.trySubscribe(inputTank.getTankType(), worldObj, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
double speed = 1D;
|
double speed = booster > 0 ? 4D : 1D;
|
||||||
double pow = 1D;
|
double pow = 1D;
|
||||||
|
|
||||||
boolean ignition = recipe != null ? recipe.ignitionTemp <= this.plasmaEnergySync : true;
|
boolean ignition = recipe != null ? recipe.ignitionTemp <= this.plasmaEnergySync : true;
|
||||||
@ -141,6 +186,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.didProcess && this.booster > 0) this.booster--;
|
||||||
this.neutronEnergy = 0D;
|
this.neutronEnergy = 0D;
|
||||||
|
|
||||||
this.networkPackNT(100);
|
this.networkPackNT(100);
|
||||||
@ -220,6 +266,8 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
buf.writeLong(power);
|
buf.writeLong(power);
|
||||||
buf.writeLong(maxPower);
|
buf.writeLong(maxPower);
|
||||||
buf.writeBoolean(didProcess);
|
buf.writeBoolean(didProcess);
|
||||||
|
buf.writeInt(booster);
|
||||||
|
buf.writeInt(maxBooster);
|
||||||
this.plasmaModule.serialize(buf);
|
this.plasmaModule.serialize(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,6 +282,8 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
this.power = buf.readLong();
|
this.power = buf.readLong();
|
||||||
this.maxPower = buf.readLong();
|
this.maxPower = buf.readLong();
|
||||||
this.didProcess = buf.readBoolean();
|
this.didProcess = buf.readBoolean();
|
||||||
|
this.booster = buf.readInt();
|
||||||
|
this.maxBooster = buf.readInt();
|
||||||
this.plasmaModule.deserialize(buf);
|
this.plasmaModule.deserialize(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,6 +293,8 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
this.inputTank.readFromNBT(nbt, "i");
|
this.inputTank.readFromNBT(nbt, "i");
|
||||||
this.power = nbt.getLong("power");
|
this.power = nbt.getLong("power");
|
||||||
this.maxPower = nbt.getLong("maxPower");
|
this.maxPower = nbt.getLong("maxPower");
|
||||||
|
this.booster = nbt.getInteger("booster");
|
||||||
|
this.maxBooster = nbt.getInteger("maxBooster");
|
||||||
this.plasmaModule.readFromNBT(nbt);
|
this.plasmaModule.readFromNBT(nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,6 +304,8 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
this.inputTank.writeToNBT(nbt, "i");
|
this.inputTank.writeToNBT(nbt, "i");
|
||||||
nbt.setLong("power", power);
|
nbt.setLong("power", power);
|
||||||
nbt.setLong("maxPower", maxPower);
|
nbt.setLong("maxPower", maxPower);
|
||||||
|
nbt.setInteger("booster", booster);
|
||||||
|
nbt.setInteger("maxBooster", maxBooster);
|
||||||
this.plasmaModule.writeToNBT(nbt);
|
this.plasmaModule.writeToNBT(nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,8 +313,12 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||||
if(slot == 0) return true; // battery
|
if(slot == 0) return true; // battery
|
||||||
if(slot == 1 && stack.getItem() == ModItems.blueprints) return true;
|
if(slot == 1 && stack.getItem() == ModItems.blueprints) return true;
|
||||||
// TODO booster material
|
|
||||||
if(this.plasmaModule.isItemValid(slot, stack)) return true; // recipe input crap
|
if(this.plasmaModule.isItemValid(slot, stack)) return true; // recipe input crap
|
||||||
|
if(slot == 2) {
|
||||||
|
for(Pair<AStack, Integer> booster : boosters) { // booster isotopes
|
||||||
|
if(booster.getKey().matchesRecipe(stack, true)) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,7 +441,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
|
|
||||||
public static enum ForgeArmType {
|
public static enum ForgeArmType {
|
||||||
STRIKER(STRIKER_STATE_MACHINE, 6), // pivot to lower arm, lower arm to upper arm, upper arm to mount, mount to strikers, striker 1, striker 2
|
STRIKER(STRIKER_STATE_MACHINE, 6), // pivot to lower arm, lower arm to upper arm, upper arm to mount, mount to strikers, striker 1, striker 2
|
||||||
JET(JET_STATE_MACHINE, 4); // pivot to lower arm, lower arm to upper arm, upper arm to jet, jet
|
JET(JET_STATE_MACHINE, 4); // pivot to lower arm, lower arm to upper arm, upper arm to jet, jet (unused, actual jet is handled via other conditions)
|
||||||
|
|
||||||
protected final int angleCount;
|
protected final int angleCount;
|
||||||
protected final Consumer<ForgeArm> stateMachine;
|
protected final Consumer<ForgeArm> stateMachine;
|
||||||
@ -423,7 +481,10 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
|
|
||||||
public static Consumer<ForgeArm> STRIKER_STATE_MACHINE = (arm) -> {
|
public static Consumer<ForgeArm> STRIKER_STATE_MACHINE = (arm) -> {
|
||||||
|
|
||||||
if(!arm.didProcess()) arm.state = ForgeArmState.RETIRE;
|
if(!arm.didProcess()) {
|
||||||
|
arm.state = ForgeArmState.RETIRE;
|
||||||
|
arm.actionDelay = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch(arm.state) {
|
switch(arm.state) {
|
||||||
case REPOSITION: {
|
case REPOSITION: {
|
||||||
@ -477,6 +538,7 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// experimental bit to make the dual pivots reset between repositions for more movement, looked way too janky
|
||||||
/*if(arm.state == ForgeArmState.REPOSITION || arm.state == ForgeArmState.RETIRE) {
|
/*if(arm.state == ForgeArmState.REPOSITION || arm.state == ForgeArmState.RETIRE) {
|
||||||
arm.targetAngles[3] = 0;
|
arm.targetAngles[3] = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -487,12 +549,15 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
|||||||
@SuppressWarnings("incomplete-switch") // shut up
|
@SuppressWarnings("incomplete-switch") // shut up
|
||||||
public static Consumer<ForgeArm> JET_STATE_MACHINE = (arm) -> {
|
public static Consumer<ForgeArm> JET_STATE_MACHINE = (arm) -> {
|
||||||
|
|
||||||
if(!arm.didProcess()) arm.state = ForgeArmState.RETIRE;
|
if(!arm.didProcess()) {
|
||||||
|
arm.state = ForgeArmState.RETIRE;
|
||||||
|
arm.actionDelay = 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch(arm.state) {
|
switch(arm.state) {
|
||||||
case REPOSITION: {
|
case REPOSITION: {
|
||||||
if(arm.move()) {
|
if(arm.move()) {
|
||||||
arm.actionDelay = 20;
|
arm.actionDelay = 20 + rand.nextInt(3) * 10;
|
||||||
arm.state = ForgeArmState.REPOSITION;
|
arm.state = ForgeArmState.REPOSITION;
|
||||||
choosePosition(arm, jetPositions);
|
choosePosition(arm, jetPositions);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user