Compare commits
10 Commits
59d5db4f66
...
6498777602
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6498777602 | ||
|
|
399f51097d | ||
|
|
6c68778fd0 | ||
|
|
da0d355565 | ||
|
|
94d37e3910 | ||
|
|
f50f93ec6c | ||
|
|
25271de81c | ||
|
|
24f53f4997 | ||
|
|
274aaede2b | ||
|
|
abe6efc52e |
15
changelog
@ -1,6 +1,19 @@
|
||||
## Added
|
||||
* Plasma forge
|
||||
* Plasma-powered assembly machine
|
||||
* Used to produce lategame items that until now were regular assembler recipes
|
||||
|
||||
## Changed
|
||||
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
||||
* Hoppers and buckets can now be made out of steel
|
||||
* RoR gauges now show the lowest and highest configured value on the actual gauge
|
||||
* The steel sword now looks like a medival broad sword with the appropriate scale
|
||||
* All remaining items have been removed from the template folder, siren tracks and plate stamps are now made in the anvil
|
||||
* Gerald assembly now requires stellar flux
|
||||
* 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
|
||||
|
||||
## Fixed
|
||||
* Fixed size 15 dual kerosene thruster not rendering at all
|
||||
* Fixed size 15 dual kerosene thruster not rendering at all
|
||||
* Fixed HUD/jetpack toggle popup not working at all on multiplayer servers
|
||||
* Fixed assembly machine NEI handler not being able to handle all thirteen inputs at once
|
||||
* Fixed RBMK fuel channels playing the meltdown sound when broken while hot with meltdowns disabled
|
||||
@ -8,15 +8,7 @@ import com.hbm.blocks.generic.*;
|
||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||
import com.hbm.blocks.machine.*;
|
||||
import com.hbm.blocks.machine.albion.*;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionBoiler;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionBreeder;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionCollector;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionCoupler;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionKlystron;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionKlystronCreative;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionMHDT;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionPlasmaForge;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
|
||||
import com.hbm.blocks.machine.fusion.*;
|
||||
import com.hbm.blocks.machine.pile.*;
|
||||
import com.hbm.blocks.machine.rbmk.*;
|
||||
import com.hbm.blocks.network.*;
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
package com.hbm.blocks.machine.fusion;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineFusionPlasmaForge extends BlockDummyable {
|
||||
|
||||
@ -16,16 +19,20 @@ public class MachineFusionPlasmaForge extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityFusionPlasmaForge();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] { 4, 0, 5, 5, 5, 5 };
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] { 4, 0, 5, 5, 5, 5 }; }
|
||||
@Override public int getOffset() { return 5; }
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 5;
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,12 +5,15 @@ import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.items.armor.ItemModShield;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.PlayerInformPacket;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -86,9 +89,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
this.enableBackpack = !this.enableBackpack;
|
||||
|
||||
if(this.enableBackpack)
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Jetpack ON", MainRegistry.proxy.ID_JETPACK, 1000), (EntityPlayerMP) player);
|
||||
else
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.RED + "Jetpack OFF", MainRegistry.proxy.ID_JETPACK, 1000), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
if (key == EnumKeybind.TOGGLE_MAGNET){
|
||||
@ -96,9 +99,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
this.enableMagnet = !this.enableMagnet;
|
||||
|
||||
if(this.enableMagnet)
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET, 1000), (EntityPlayerMP) player);
|
||||
else
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "Magnet OFF", MainRegistry.proxy.ID_MAGNET);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "Magnet ON", MainRegistry.proxy.ID_MAGNET, 1000), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
if(key == EnumKeybind.TOGGLE_HEAD) {
|
||||
@ -107,9 +110,9 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
this.enableHUD = !this.enableHUD;
|
||||
|
||||
if(this.enableHUD)
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD, 1000), (EntityPlayerMP) player);
|
||||
else
|
||||
MainRegistry.proxy.displayTooltip(EnumChatFormatting.RED + "HUD OFF", MainRegistry.proxy.ID_HUD);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(EnumChatFormatting.GREEN + "HUD ON", MainRegistry.proxy.ID_HUD, 1000), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,9 @@ package com.hbm.handler.nei;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.recipes.AssemblyMachineRecipes;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipes;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class AssemblyMachineRecipeHandler extends NEIGenericRecipeHandler {
|
||||
|
||||
@ -10,9 +13,20 @@ public class AssemblyMachineRecipeHandler extends NEIGenericRecipeHandler {
|
||||
super(ModBlocks.machine_assembly_machine.getLocalizedName(), AssemblyMachineRecipes.INSTANCE, ModBlocks.machine_assembly_machine);
|
||||
}
|
||||
|
||||
public AssemblyMachineRecipeHandler(String displayName, GenericRecipes recipeSet, Block... machines) { super(displayName, recipeSet, machines); }
|
||||
|
||||
@Override public String getRecipeID() { return "ntmAssemblyMachine"; }
|
||||
|
||||
@Override public int getInputXOffset(GenericRecipe recipe, int inputCount) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
|
||||
@Override public int getOutputXOffset(GenericRecipe recipe, int outputCount) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
|
||||
@Override public int getMachineXOffset(GenericRecipe recipe) { return recipe.inputItem != null && recipe.inputItem.length > 9 ? 18 : 0; }
|
||||
@Override public int getInputXOffset(GenericRecipe recipe, int inputCount) { return inputCount > 12 ? -9 : inputCount > 9 ? 18 : 0; }
|
||||
@Override public int getOutputXOffset(GenericRecipe recipe, int outputCount) { return getOffset(recipe); }
|
||||
@Override public int getMachineXOffset(GenericRecipe recipe) { return getOffset(recipe); }
|
||||
|
||||
public int getOffset(GenericRecipe recipe) {
|
||||
int length = 0;
|
||||
if(recipe.inputItem != null) length += recipe.inputItem.length;
|
||||
if(recipe.inputFluid != null) length += recipe.inputFluid.length;
|
||||
if(length > 12) return 27;
|
||||
if(length > 9) return 18;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
|
||||
|
||||
public class PlasmaForgeRecipeHandler extends AssemblyMachineRecipeHandler {
|
||||
|
||||
public PlasmaForgeRecipeHandler() {
|
||||
super(ModBlocks.fusion_plasma_forge.getLocalizedName(), PlasmaForgeRecipes.INSTANCE, ModBlocks.fusion_plasma_forge);
|
||||
}
|
||||
|
||||
@Override public String getRecipeID() { return "ntmPlasmaForge"; }
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotNonRetarded;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerMachinePlasmaForge extends ContainerBase {
|
||||
|
||||
public ContainerMachinePlasmaForge(InventoryPlayer invPlayer, IInventory assembler) {
|
||||
super(invPlayer, assembler);
|
||||
|
||||
// Battery
|
||||
this.addSlotToContainer(new SlotNonRetarded(assembler, 0, 152, 82));
|
||||
// Schematic
|
||||
this.addSlotToContainer(new SlotNonRetarded(assembler, 1, 35, 81));
|
||||
// Booster
|
||||
this.addSlotToContainer(new SlotNonRetarded(assembler, 2, 98, 116));
|
||||
// Input
|
||||
this.addSlots(assembler, 3, 8, 18, 3, 4);
|
||||
// Output
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, assembler, 15, 116, 36));
|
||||
|
||||
this.playerInv(invPlayer, 8, 162);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack slotOriginal = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack slotStack = slot.getStack();
|
||||
slotOriginal = slotStack.copy();
|
||||
|
||||
if(index <= tile.getSizeInventory() - 1) {
|
||||
SlotCraftingOutput.checkAchievements(player, slotStack);
|
||||
if(!this.mergeItemStack(slotStack, tile.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(slotOriginal.getItem() instanceof IBatteryItem || slotOriginal.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(slotStack, 0, 1, false)) return null;
|
||||
} else if(slotOriginal.getItem() == ModItems.blueprints) {
|
||||
if(!this.mergeItemStack(slotStack, 1, 2, false)) return null;
|
||||
} else {
|
||||
if(!InventoryUtil.mergeItemStack(this.inventorySlots, slotStack, 2, 15, false)) return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(slotStack.stackSize == 0) {
|
||||
slot.putStack(null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
|
||||
slot.onPickupFromSlot(player, slotStack);
|
||||
}
|
||||
|
||||
return slotOriginal;
|
||||
}
|
||||
}
|
||||
140
src/main/java/com/hbm/inventory/gui/GUIMachinePlasmaForge.java
Normal file
@ -0,0 +1,140 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
|
||||
import com.hbm.inventory.recipes.PlasmaForgeRecipe;
|
||||
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.items.machine.ItemBlueprints;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.util.GaugeUtil;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachinePlasmaForge extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/reactors/gui_fusion_plasmaforge.png");
|
||||
private TileEntityFusionPlasmaForge forge;
|
||||
|
||||
public GUIMachinePlasmaForge(InventoryPlayer invPlayer, TileEntityFusionPlasmaForge tedf) {
|
||||
super(new ContainerMachinePlasmaForge(invPlayer, tedf));
|
||||
forge = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 244;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
forge.inputTank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 18, 16, 52);
|
||||
|
||||
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);
|
||||
this.func_146283_a(recipe.print(), mouseX, mouseY);
|
||||
} else {
|
||||
this.drawCreativeTabHoveringText(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("gui.recipe.setRecipe"), mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe);
|
||||
|
||||
if(recipe != null) {
|
||||
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(forge.plasmaEnergySync) + "KyU / " + BobMathUtil.getShortNumber(recipe.ignitionTemp) + "KyU");
|
||||
} else {
|
||||
drawCustomInfoStat(mouseX, mouseY, guiLeft + 25, guiTop + 115, 18, 18, mouseX, mouseY, "0TU / 0TU");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.forge.hasCustomInventoryName() ? this.forge.getInventoryName() : I18n.format(this.forge.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, 70 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int p = (int) (forge.power * 61 / forge.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 152, guiTop + 80 - p, 176, 62 - p, 16, p);
|
||||
|
||||
if(forge.plasmaModule.progress > 0) {
|
||||
int j = (int) Math.ceil(70 * forge.plasmaModule.progress);
|
||||
drawTexturedModalRect(guiLeft + 62, guiTop + 81, 176, 62, j, 16);
|
||||
}
|
||||
|
||||
PlasmaForgeRecipe recipe = (PlasmaForgeRecipe) PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(forge.plasmaModule.recipe);
|
||||
|
||||
/// LEFT LED
|
||||
if(forge.didProcess) {
|
||||
drawTexturedModalRect(guiLeft + 51, guiTop + 76, 195, 0, 3, 6);
|
||||
} else if(recipe != null) {
|
||||
drawTexturedModalRect(guiLeft + 51, guiTop + 76, 192, 0, 3, 6);
|
||||
}
|
||||
|
||||
/// RIGHT LED
|
||||
if(forge.didProcess) {
|
||||
drawTexturedModalRect(guiLeft + 56, guiTop + 76, 195, 0, 3, 6);
|
||||
} else if(recipe != null && forge.power >= recipe.power) {
|
||||
drawTexturedModalRect(guiLeft + 56, guiTop + 76, 192, 0, 3, 6);
|
||||
}
|
||||
|
||||
double inputGauge = recipe == null ? 0 : Math.min(((double) forge.plasmaEnergySync / (double) recipe.ignitionTemp), 1.5) / 1.5D;
|
||||
double boosterGauge = 0;
|
||||
|
||||
// input energy
|
||||
GaugeUtil.drawSmoothGauge(guiLeft + 34, guiTop + 124, this.zLevel, inputGauge, 5, 2, 1, 0xA00000);
|
||||
// output genergy
|
||||
GaugeUtil.drawSmoothGauge(guiLeft + 70, guiTop + 124, this.zLevel, boosterGauge, 5, 2, 1, 0xA00000);
|
||||
|
||||
this.renderItem(recipe != null ? recipe.getIcon() : TEMPLATE_FOLDER, 8, 81);
|
||||
|
||||
if(recipe != null && recipe.inputItem != null) {
|
||||
for(int i = 0; i < recipe.inputItem.length; i++) {
|
||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(forge.plasmaModule.inputSlots[i]);
|
||||
if(!slot.getHasStack()) this.renderItem(recipe.inputItem[i].extractForCyclingDisplay(20), slot.xDisplayPosition, slot.yDisplayPosition, 10F);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.5F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
this.zLevel = 300F;
|
||||
for(int i = 0; i < recipe.inputItem.length; i++) {
|
||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(forge.plasmaModule.inputSlots[i]);
|
||||
if(!slot.getHasStack()) drawTexturedModalRect(guiLeft + slot.xDisplayPosition, guiTop + slot.yDisplayPosition, slot.xDisplayPosition, slot.yDisplayPosition, 16, 16);
|
||||
}
|
||||
this.zLevel = 0F;
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
forge.inputTank.renderTank(guiLeft + 80, guiTop + 70, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -12,9 +12,6 @@ import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.inventory.recipes.CrucibleRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemCassette;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -56,17 +53,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
|
||||
this.isJournal = item != ModItems.template_folder;
|
||||
|
||||
if(!this.isJournal) {
|
||||
// Stamps
|
||||
for(ItemStack i : ItemStamp.stamps.get(StampType.PLATE)) allStacks.add(i.copy());
|
||||
for(ItemStack i : ItemStamp.stamps.get(StampType.WIRE)) allStacks.add(i.copy());
|
||||
for(ItemStack i : ItemStamp.stamps.get(StampType.CIRCUIT)) allStacks.add(i.copy());
|
||||
|
||||
// Tracks
|
||||
for(int i = 1; i < ItemCassette.TrackType.values().length; i++) {
|
||||
allStacks.add(new ItemStack(ModItems.siren_track, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!this.isJournal) {
|
||||
|
||||
|
||||
@ -140,7 +140,7 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setAutogen(WIRE, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x82A59C, 0x06281E, 0x42665C).setAutogen(BOLT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setAutogen(DUST, CASTPLATE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, STOCK, GRIP).m();
|
||||
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setAutogen(DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setAutogen(DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setAutogen(CASTPLATE, HEAVYBARREL, HEAVYRECEIVER).m();
|
||||
public static final NTMMaterial MAT_TCALLOY = makeSmeltable(_AS + 6, TCALLOY, 0xD4D6D6, 0x323D3D, 0x9CA6A6).setAutogen(DUST, CASTPLATE, WELDEDPLATE, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER).m();
|
||||
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setAutogen(CASTPLATE, WELDEDPLATE, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER).m();
|
||||
|
||||
@ -8,7 +8,6 @@ import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockCap.EnumCapBlock;
|
||||
import com.hbm.blocks.machine.BlockICFLaserComponent.EnumICFPart;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
@ -83,10 +82,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
.inputItems(new OreDictStack(DESH.ingot(), 4), new OreDictStack(ANY_PLASTIC.dust(), 2), new OreDictStack(DURA.ingot(), 1)));
|
||||
this.register(new GenericRecipe("ass.platebismuth").setup(200, 100).outputItems(new ItemStack(ModItems.plate_bismuth, 1))
|
||||
.inputItems(new ComparableStack(ModItems.nugget_bismuth, 2), new OreDictStack(U238.billet(), 2), new OreDictStack(NB.dust(), 1)));
|
||||
this.register(new GenericRecipe("ass.plateeuphemium").setup(600, 100).outputItems(new ItemStack(ModItems.plate_euphemium, 1))
|
||||
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new OreDictStack(OSMIRIDIUM.ingot())));
|
||||
this.register(new GenericRecipe("ass.platednt").setup(600, 100).outputItems(new ItemStack(ModItems.plate_dineutronium, 4))
|
||||
.inputItems(new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)));
|
||||
|
||||
// expensive parts
|
||||
this.register(new GenericRecipe("ass.exsteelplating").setup(200, 400).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.STEEL_PLATING.ordinal()))
|
||||
@ -424,32 +419,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CHIP_QUANTUM))
|
||||
.inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 8_000))
|
||||
.outputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 8_000)));
|
||||
|
||||
this.register(new GenericRecipe("ass.fensusan").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.machine_battery_redd, 1))
|
||||
.inputItems(new ComparableStack(ModItems.ingot_electronium, 64),
|
||||
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
|
||||
new OreDictStack(CMB.plateCast(), 32),
|
||||
new OreDictStack(MAGTUNG.wireDense(), 32),
|
||||
new ComparableStack(ModItems.plate_dineutronium, 64),
|
||||
new ComparableStack(ModItems.powder_magic, 64),
|
||||
new ComparableStack(ModItems.ingot_u238m2),
|
||||
new ComparableStack(ModItems.ingot_cft, 64),
|
||||
new ComparableStack(ModItems.ingot_cft, 64))
|
||||
.inputItemsEx(new ComparableStack(ModItems.ingot_electronium, 64),
|
||||
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.FERRO_PLATING),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
|
||||
new OreDictStack(CMB.plateCast(), 64),
|
||||
new ComparableStack(ModItems.ingot_u238m2),
|
||||
new ComparableStack(ModItems.ingot_cft, 64),
|
||||
new ComparableStack(ModItems.ingot_cft, 64)));
|
||||
|
||||
// fluid tanks
|
||||
this.register(new GenericRecipe("ass.tank").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_fluidtank, 1))
|
||||
@ -603,55 +572,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 6, EnumExpensiveType.LEAD_PLATING), new OreDictStack(ANY_RESISTANTALLOY.plateWelded()))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "tcalloy"));
|
||||
|
||||
// ICF
|
||||
this.register(new GenericRecipe("ass.icfcell").setup(200, 100).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))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.ingot_cft, 8), new ComparableStack(ModBlocks.glass_quartz, 16))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfemitter").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_laser_component, 1, EnumICFPart.EMITTER.ordinal()))
|
||||
.inputItems(new OreDictStack(W.plateWelded(), 4), new OreDictStack(MAGTUNG.wireDense(), 16))
|
||||
.inputItemsEx(new OreDictStack(W.plateWelded(), 8), new OreDictStack(MAGTUNG.wireDense(), 16))
|
||||
.inputFluids(new FluidStack(Fluids.XENON, 16_000))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfcapacitor").setup(200, 100).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))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.FERRO_PLATING), new OreDictStack(ND.wireDense(), 16), new OreDictStack(SBD.wireDense(), 2))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfturbo").setup(200, 100).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))
|
||||
.inputItemsEx(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(DNT.wireDense(), 8), new OreDictStack(SBD.wireDense(), 4))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfcasing").setup(200, 100).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))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(BIGMT.plateCast(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfport").setup(200, 100).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))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ND.wireDense(), 16))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfcontroller").setup(200, 100).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))
|
||||
.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(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfscaffold").setup(200, 100).outputItems(new ItemStack(ModBlocks.icf_component, 1, 0))
|
||||
.inputItems(new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(TI.plateWelded(), 2))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfvessel").setup(200, 100).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))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfstructural").setup(200, 100).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))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(STEEL.plateWelded(), 8))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfcore").setup(1_200, 100).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))
|
||||
.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(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
this.register(new GenericRecipe("ass.icfpress").setup(200, 100).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))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
|
||||
// upgrades
|
||||
if(no528) {
|
||||
this.register(new GenericRecipe("ass.overdrive1").setup(200, 100).outputItems(new ItemStack(ModItems.upgrade_overdrive_1, 1))
|
||||
@ -982,22 +902,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
.inputItems(new ComparableStack(ModItems.seg_15, 1), new OreDictStack(WEAPONSTEEL.plate(), 32), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 8), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 16), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER))
|
||||
.setPools528(GenericRecipes.POOL_PREFIX_528 + "controller"));
|
||||
|
||||
// weapons
|
||||
this.register(new GenericRecipe("ass.schrabhammer").setup(6_000, 100).outputItems(new ItemStack(ModItems.schrabidium_hammer, 1))
|
||||
.inputItems(
|
||||
new OreDictStack(SA326.block(), 35),
|
||||
new ComparableStack(ModItems.billet_yharonite, 64),
|
||||
new ComparableStack(ModItems.billet_yharonite, 64),
|
||||
new ComparableStack(ModItems.coin_ufo, 1),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64)));
|
||||
|
||||
// ammo
|
||||
this.register(new GenericRecipe("ass.50bmgsm").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_standard, 6, EnumAmmo.BMG50_SM.ordinal()))
|
||||
.inputItems(new ComparableStack(ModItems.casing, 1, EnumCasingType.LARGE_STEEL), new OreDictStack(ANY_SMOKELESS.dust(), 6), new OreDictStack(STAR.ingot(), 3))
|
||||
@ -1102,30 +1006,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
new ComparableStack(ModItems.thruster_small, 1),
|
||||
new ComparableStack(ModItems.photo_panel, 12),
|
||||
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LITHIUM)));
|
||||
this.register(new GenericRecipe("ass.gerald").setup(6_000, 100).outputItems(new ItemStack(ModItems.sat_gerald, 1))
|
||||
.inputItems(new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new ComparableStack(ModBlocks.det_nuke, 64),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
|
||||
new ComparableStack(ModItems.coin_ufo, 1))
|
||||
.inputItemsEx(new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new ComparableStack(ModBlocks.det_nuke, 64),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.COMPUTER),
|
||||
new ComparableStack(ModItems.coin_ufo, 1)).setPools(GenericRecipes.POOL_PREFIX_DISCOVER + "gerald"));
|
||||
|
||||
this.register(new GenericRecipe("ass.emptypackage").setup(40, 100).outputItems(new ItemStack(ModItems.fluid_pack_empty, 1))
|
||||
.inputItems(new OreDictStack(TI.plate(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 2)));
|
||||
@ -1154,7 +1034,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
new ComparableStack(ModItems.motor_bismuth, 3)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class PlasmaForgeRecipe extends GenericRecipe {
|
||||
|
||||
// minimum plasma energy to perform the recipe
|
||||
public long ignitionTemp;
|
||||
|
||||
public PlasmaForgeRecipe(String name) { super(name); }
|
||||
|
||||
public PlasmaForgeRecipe setInputEnergy(long ignitionTemp) { this.ignitionTemp = ignitionTemp; return this; }
|
||||
|
||||
public List<String> print() {
|
||||
List<String> list = new ArrayList();
|
||||
list.add(EnumChatFormatting.YELLOW + this.getLocalizedName());
|
||||
|
||||
duration(list);
|
||||
power(list);
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKey("gui.recipe.fusionIn") + ": " + BobMathUtil.getShortNumber(ignitionTemp) + "TU/t");
|
||||
input(list);
|
||||
output(list);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
206
src/main/java/com/hbm/inventory/recipes/PlasmaForgeRecipes.java
Normal file
@ -0,0 +1,206 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.BlockICFLaserComponent.EnumICFPart;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumExpensiveType;
|
||||
import com.hbm.items.ItemGenericPart.EnumPartType;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
|
||||
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class PlasmaForgeRecipes extends GenericRecipes<PlasmaForgeRecipe> {
|
||||
|
||||
public static final PlasmaForgeRecipes INSTANCE = new PlasmaForgeRecipes();
|
||||
|
||||
@Override public int inputItemLimit() { return 12; }
|
||||
@Override public int inputFluidLimit() { return 1; }
|
||||
@Override public int outputItemLimit() { return 1; }
|
||||
@Override public int outputFluidLimit() { return 0; }
|
||||
|
||||
@Override public String getFileName() { return "hbmPlasmaForge.json"; }
|
||||
@Override public PlasmaForgeRecipe instantiateRecipe(String name) { return new PlasmaForgeRecipe(name); }
|
||||
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
// Plates
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.plateeuphemium").setInputEnergy(1_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModItems.plate_euphemium, 1))
|
||||
.inputItems(new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 3), new OreDictStack(BI.dust(), 1), new OreDictStack(VOLCANIC.gem(), 1), new OreDictStack(OSMIRIDIUM.ingot())));
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.platednt").setInputEnergy(1_000_000).setup(600, 10_000_000).outputItems(new ItemStack(ModItems.plate_dineutronium, 4))
|
||||
.inputItems(new OreDictStack(DNT.ingot(), 4), new ComparableStack(ModItems.powder_spark_mix, 2), new OreDictStack(DESH.ingot(), 1)));
|
||||
|
||||
// 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()))
|
||||
.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))
|
||||
.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()))
|
||||
.inputItems(new OreDictStack(W.plateWelded(), 4), new OreDictStack(MAGTUNG.wireDense(), 16))
|
||||
.inputItemsEx(new OreDictStack(W.plateWelded(), 8), new OreDictStack(MAGTUNG.wireDense(), 16))
|
||||
.inputFluids(new FluidStack(Fluids.XENON, 16_000))
|
||||
.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()))
|
||||
.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))
|
||||
.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()))
|
||||
.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))
|
||||
.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()))
|
||||
.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))
|
||||
.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()))
|
||||
.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))
|
||||
.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))
|
||||
.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))
|
||||
.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))
|
||||
.inputItems(new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(TI.plateWelded(), 2))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING))
|
||||
.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))
|
||||
.inputItems(new ComparableStack(ModItems.ingot_cft, 1), new OreDictStack(CMB.plateCast(), 1), new OreDictStack(W.plateWelded(), 2))
|
||||
.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))
|
||||
.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))
|
||||
.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))
|
||||
.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))
|
||||
.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))
|
||||
.inputItems(new OreDictStack(GOLD.plateCast(), 8), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID))
|
||||
.setPools528(PlasmaForgeRecipes.POOL_PREFIX_528 + "chlorophyte"));
|
||||
|
||||
// weapons
|
||||
this.register((PlasmaForgeRecipe) new PlasmaForgeRecipe("plsm.schrabhammer").setInputEnergy(25_000_000).setup(6_000, 10_000_000).outputItems(new ItemStack(ModItems.schrabidium_hammer, 1))
|
||||
.inputItems(
|
||||
new OreDictStack(SA326.block(), 35),
|
||||
new ComparableStack(ModItems.billet_yharonite, 64),
|
||||
new ComparableStack(ModItems.billet_yharonite, 64),
|
||||
new ComparableStack(ModItems.coin_ufo, 1),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
new ComparableStack(ModItems.fragment_meteorite, 64),
|
||||
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))
|
||||
.inputItems(new ComparableStack(ModItems.ingot_electronium, 64),
|
||||
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
|
||||
new OreDictStack(CMB.plateCast(), 32),
|
||||
new OreDictStack(MAGTUNG.wireDense(), 32),
|
||||
new ComparableStack(ModItems.plate_dineutronium, 64),
|
||||
new ComparableStack(ModItems.powder_magic, 64),
|
||||
new ComparableStack(ModItems.ingot_u238m2),
|
||||
new ComparableStack(ModItems.ingot_cft, 64),
|
||||
new ComparableStack(ModItems.ingot_cft, 64))
|
||||
.inputItemsEx(new ComparableStack(ModItems.ingot_electronium, 64),
|
||||
new ComparableStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.FERRO_PLATING),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(OSMIRIDIUM.plateWelded(), 64),
|
||||
new OreDictStack(ANY_BISMOIDBRONZE.plateCast(), 64),
|
||||
new OreDictStack(CMB.plateCast(), 64),
|
||||
new ComparableStack(ModItems.ingot_u238m2),
|
||||
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))
|
||||
.inputItems(new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new ComparableStack(ModBlocks.det_nuke, 64),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
|
||||
new ComparableStack(ModItems.coin_ufo, 1))
|
||||
.inputItemsEx(new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new ComparableStack(ModBlocks.det_nuke, 64),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.COMPUTER),
|
||||
new ComparableStack(ModItems.coin_ufo, 1)).setPools(PlasmaForgeRecipes.POOL_PREFIX_DISCOVER + "gerald"));
|
||||
|
||||
// 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))
|
||||
.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))
|
||||
.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))
|
||||
.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))
|
||||
.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))
|
||||
.inputItems(new OreDictStack(OSMIRIDIUM.plateWelded(), 16), new OreDictStack(SBD.wireDense(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_QUANTUM)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readExtraData(JsonElement element, PlasmaForgeRecipe recipe) {
|
||||
JsonObject obj = (JsonObject) element;
|
||||
recipe.ignitionTemp = obj.get("ignitionTemp").getAsLong();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeExtraData(PlasmaForgeRecipe recipe, JsonWriter writer) throws IOException {
|
||||
writer.name("ignitionTemp").value(recipe.ignitionTemp);
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
HashMap<Object, Object> recipes = new HashMap<Object, Object>();
|
||||
|
||||
for(GenericRecipe recipe : INSTANCE.recipeOrderedList) {
|
||||
List input = new ArrayList();
|
||||
if(recipe.inputItem != null) for(AStack stack : recipe.inputItem) input.add(stack);
|
||||
if(recipe.inputFluid != null) for(FluidStack stack : recipe.inputFluid) input.add(ItemFluidIcon.make(stack));
|
||||
List output = new ArrayList();
|
||||
if(recipe.outputItem != null) for(IOutput stack : recipe.outputItem) output.add(stack.getAllPossibilities());
|
||||
recipes.put(input.toArray(), output.toArray());
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
}
|
||||
@ -166,7 +166,9 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(EMERALD.dust()), new AnvilOutput(new ItemStack(Items.emerald))).setTier(3));
|
||||
|
||||
registerConstructionRecipes();
|
||||
registerConstructionStamps();
|
||||
registerConstructionAmmo();
|
||||
registerConstructionSirens();
|
||||
registerConstructionUpgrades();
|
||||
registerConstructionRecycling();
|
||||
}
|
||||
@ -578,6 +580,34 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerConstructionStamps() {
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_stone_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_stone_plate))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_stone_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_stone_wire))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_stone_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_stone_circuit))).setTier(1));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_iron_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_iron_plate))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_iron_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_iron_wire))).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_iron_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_iron_circuit))).setTier(1));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_steel_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_steel_plate))).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_steel_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_steel_wire))).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_steel_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_steel_circuit))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_titanium_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_titanium_plate))).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_titanium_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_titanium_wire))).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_titanium_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_titanium_circuit))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_obsidian_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_obsidian_plate))).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_obsidian_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_obsidian_wire))).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_obsidian_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_obsidian_circuit))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_desh_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_desh_plate))).setTier(3));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_desh_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_desh_wire))).setTier(3));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.stamp_desh_flat, 1),new AnvilOutput(new ItemStack(ModItems.stamp_desh_circuit))).setTier(3));
|
||||
|
||||
}
|
||||
|
||||
public static void registerConstructionAmmo() {
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.stamp_iron_flat), new OreDictStack(GUNMETAL.ingot(), 2)}, new AnvilOutput(new ItemStack(ModItems.stamp_9))).setTier(2));
|
||||
@ -597,6 +627,14 @@ public class AnvilRecipes extends SerializableRecipe {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(STEEL.ingot(), 4)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 28))).setTier(2));
|
||||
}
|
||||
|
||||
public static void registerConstructionSirens() {
|
||||
for(int i = 1; i < 21; i++) {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[] {new OreDictStack(STEEL.plate()), new ComparableStack(ModItems.plate_polymer)}, new AnvilOutput(new ItemStack(ModItems.siren_track, 1, i))).setTier(2).setOverlay(OverlayType.CONSTRUCTION));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void registerConstructionUpgrades() { }
|
||||
|
||||
public static void registerConstructionRecycling() {
|
||||
|
||||
@ -94,6 +94,7 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(PUREXRecipes.INSTANCE);
|
||||
recipeHandlers.add(FusionRecipes.INSTANCE);
|
||||
recipeHandlers.add(PrecAssRecipes.INSTANCE);
|
||||
recipeHandlers.add(PlasmaForgeRecipes.INSTANCE);
|
||||
|
||||
recipeHandlers.add(new MatDistribution());
|
||||
recipeHandlers.add(new CustomMachineRecipes());
|
||||
|
||||
@ -2,9 +2,6 @@ package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@ -12,7 +9,6 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@ -97,36 +93,27 @@ public class ItemCassette extends Item {
|
||||
SOUND;
|
||||
};
|
||||
|
||||
public ItemCassette()
|
||||
{
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
public ItemCassette() {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (int i = 1; i < TrackType.values().length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for(int i = 1; i < TrackType.values().length; ++i) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
|
||||
if(!(stack.getItem() instanceof ItemCassette))
|
||||
return;
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
if(!(stack.getItem() instanceof ItemCassette)) return;
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
||||
list.add("");
|
||||
|
||||
list.add("Siren sound cassette:");
|
||||
list.add(" Name: " + TrackType.getEnum(stack.getItemDamage()).getTrackTitle());
|
||||
list.add(" Type: " + TrackType.getEnum(stack.getItemDamage()).getType().name());
|
||||
list.add(" Volume: " + TrackType.getEnum(stack.getItemDamage()).getVolume());
|
||||
list.add("Siren sound cassette:");
|
||||
list.add(" Name: " + TrackType.getEnum(stack.getItemDamage()).getTrackTitle());
|
||||
list.add(" Type: " + TrackType.getEnum(stack.getItemDamage()).getType().name());
|
||||
list.add(" Volume: " + TrackType.getEnum(stack.getItemDamage()).getVolume());
|
||||
}
|
||||
|
||||
public static TrackType getType(ItemStack stack) {
|
||||
@ -136,47 +123,31 @@ public class ItemCassette extends Item {
|
||||
return TrackType.NULL;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister p_94581_1_)
|
||||
{
|
||||
super.registerIcons(p_94581_1_);
|
||||
public void registerIcons(IIconRegister p_94581_1_) {
|
||||
super.registerIcons(p_94581_1_);
|
||||
this.overlayIcon = p_94581_1_.registerIcon("hbm:cassette_overlay");
|
||||
}
|
||||
|
||||
this.overlayIcon = p_94581_1_.registerIcon("hbm:cassette_overlay");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int p_77618_1_, int p_77618_2_)
|
||||
{
|
||||
return p_77618_2_ == 1 ? this.overlayIcon : super.getIconFromDamageForRenderPass(p_77618_1_, p_77618_2_);
|
||||
}
|
||||
public IIcon getIconFromDamageForRenderPass(int meta, int pass) {
|
||||
return pass == 1 ? this.overlayIcon : super.getIconFromDamageForRenderPass(meta, pass);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int p_82790_2_)
|
||||
{
|
||||
if (p_82790_2_ == 0)
|
||||
{
|
||||
return 16777215;
|
||||
}
|
||||
else
|
||||
{
|
||||
int j = TrackType.getEnum(stack.getItemDamage()).getColor();
|
||||
|
||||
if (j < 0)
|
||||
{
|
||||
j = 16777215;
|
||||
}
|
||||
|
||||
return j;
|
||||
}
|
||||
}
|
||||
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||
if(pass == 0) return 16777215;
|
||||
int j = TrackType.getEnum(stack.getItemDamage()).getColor();
|
||||
if(j < 0) j = 16777215;
|
||||
return j;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -34,11 +33,7 @@ public class ItemStamp extends Item {
|
||||
stamps.put(type, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
if(this.type == StampType.PLATE || this.type == StampType.WIRE || this.type == StampType.CIRCUIT)
|
||||
list.add("[CREATED USING TEMPLATE FOLDER]");
|
||||
}
|
||||
|
||||
|
||||
/** Params can't take an ItemStack, for some reason it crashes during init */
|
||||
public StampType getStampType(Item item, int meta) {
|
||||
|
||||
@ -36,6 +36,7 @@ import com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -128,9 +129,11 @@ public class XFactoryFolly {
|
||||
};
|
||||
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_CAN_FIRE = (stack, ctx) -> {
|
||||
if(!ItemGunBaseNT.getIsAiming(stack)) return false;
|
||||
if(ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) != GunAnimation.SPINUP) return false;
|
||||
if(ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex) < 100) return false;
|
||||
if(ctx.entity instanceof EntityPlayer) {
|
||||
if(!ItemGunBaseNT.getIsAiming(stack)) return false;
|
||||
if(ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) != GunAnimation.SPINUP) return false;
|
||||
if(ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex) < 100) return false;
|
||||
}
|
||||
return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0;
|
||||
};
|
||||
|
||||
|
||||
@ -488,6 +488,7 @@ public class ClientProxy extends ServerProxy {
|
||||
double[] tir = new double[] {0, 0, 0};
|
||||
double[] sir = new double[] {1, 1, 1};
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.steel_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.titanium_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.alloy_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.desh_sword, new ItemRenderTransformer(rtp, ttp_low, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
|
||||
@ -725,11 +725,6 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_euphemium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_dagaz, ModItems.rune_dagaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, EUPH.dust(), EUPH.dust(), EUPH.dust(), EUPH.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_schrabidium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_dagaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, SA326.dust(), SA326.dust(), SA326.dust(), SA326.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_dineutronium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_hagalaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, DNT.dust(), DNT.dust(), DNT.dust(), DNT.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_core, 1), new Object[] { "DLD", "LML", "DLD", 'D', ModItems.ingot_bismuth, 'L', DNT.block(), 'M', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()), 'X', ModItems.crystal_xen, 'L', ModItems.sat_head_laser });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_receiver, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()), 'X', ModBlocks.block_dineutronium, 'L', STEEL.shell() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_injector, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', CMB.plate(), 'T', ModBlocks.machine_fluidtank, 'X', ModItems.motor, 'L', STEEL.pipe() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_stabilizer, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModBlocks.hadron_coil_alloy, 'L', ModItems.crystal_xen });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.barrel_plastic, 1), new Object[] { "IPI", "I I", "IPI", 'I', ModItems.plate_polymer, 'P', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.barrel_steel, 1), new Object[] { "IPI", "I I", "IPI", 'I', STEEL.plate(), 'P', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.barrel_tcalloy, 1), new Object[] { "IPI", "I I", "IPI", 'I', "ingotTcAlloy", 'P', TI.plate() });
|
||||
|
||||
@ -258,7 +258,6 @@ public class MainRegistry {
|
||||
polaroidID = rand.nextInt(18) + 1;
|
||||
}
|
||||
|
||||
ShadyUtil.test();
|
||||
loadConfig(PreEvent);
|
||||
HbmPotion.init();
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ public class NEIRegistry {
|
||||
handlers.add(new CrystallizerRecipeHandler());
|
||||
handlers.add(new BookRecipeHandler());
|
||||
handlers.add(new FusionRecipeHandler());
|
||||
handlers.add(new PlasmaForgeRecipeHandler());
|
||||
handlers.add(new SILEXRecipeHandler());
|
||||
handlers.add(new FuelPoolHandler());
|
||||
handlers.add(new RBMKRodDisassemblyHandler());
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.hbm.module.machine;
|
||||
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipes;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import api.hbm.energymk2.IEnergyHandlerMK2;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ModuleMachinePlasma extends ModuleMachineBase {
|
||||
|
||||
public ModuleMachinePlasma(int index, IEnergyHandlerMK2 battery, ItemStack[] slots) {
|
||||
super(index, battery, slots);
|
||||
this.inputSlots = new int[12];
|
||||
this.outputSlots = new int[1];
|
||||
this.inputTanks = new FluidTank[1];
|
||||
this.outputTanks = new FluidTank[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenericRecipes getRecipeSet() {
|
||||
return PlasmaForgeRecipes.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupTanks(GenericRecipe recipe) {
|
||||
super.setupTanks(recipe);
|
||||
if(recipe == null) return;
|
||||
for(int i = 0; i < inputTanks.length; i++) if(recipe.inputFluid != null && recipe.inputFluid.length > i) inputTanks[i].changeTankSize(BobMathUtil.max(inputTanks[i].getFill(), recipe.inputFluid[i].fill * 2, 16_000));
|
||||
}
|
||||
|
||||
public ModuleMachinePlasma itemInput(int from) { for(int i = 0; i < inputSlots.length; i++) inputSlots[i] = from + i; return this; }
|
||||
public ModuleMachinePlasma itemOutput(int a) { outputSlots[0] = a; return this; }
|
||||
public ModuleMachinePlasma fluidInput(FluidTank a) { inputTanks[0] = a; return this; }
|
||||
}
|
||||
@ -6,6 +6,9 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.Clock;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -30,6 +33,8 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
TileEntityFusionPlasmaForge forge = (TileEntityFusionPlasmaForge) tile;
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fusion_plasma_forge_tex);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Body");
|
||||
@ -85,11 +90,64 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glColor3f(0F, 0F, 0F);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Plasma");
|
||||
if(forge.plasmaEnergySync <= 0) {
|
||||
GL11.glColor3f(0F, 0F, 0F);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Plasma");
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
} else {
|
||||
RenderArcFurnace.fullbright(true);
|
||||
long time = Clock.get_ms() + forge.timeOffset;
|
||||
float alpha = 0.5F + (float) (Math.sin(time / 500D) * 0.25F);
|
||||
double mainOsc = BobMathUtil.sps(time / 750D) % 1D;
|
||||
double glowOsc = Math.sin(time / 1000D) % 1D;
|
||||
double glowExtra = time / 10000D % 1D;
|
||||
|
||||
GL11.glColor3f(forge.plasmaRed * alpha, forge.plasmaGreen * alpha, forge.plasmaBlue * alpha);
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
bindTexture(ResourceManager.fusion_plasma_tex);
|
||||
GL11.glTranslated(0, mainOsc, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Plasma");
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
GL11.glColor3f(forge.plasmaRed * 2, forge.plasmaGreen * 2, forge.plasmaBlue * 2);
|
||||
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
bindTexture(ResourceManager.fusion_plasma_glow_tex);
|
||||
GL11.glTranslated(0, glowOsc + glowExtra, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Plasma");
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
|
||||
glowOsc = Math.sin(time / 600D + 2) % 1D;
|
||||
glowExtra = time / 5000D % 1D;
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
bindTexture(ResourceManager.fusion_plasma_glow_tex);
|
||||
GL11.glTranslated(0, glowOsc + glowExtra, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Plasma");
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
RenderArcFurnace.fullbright(false);
|
||||
}
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKGauge.GaugeUnit;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.ColorUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -71,6 +72,25 @@ public class RenderRBMKGauge extends TileEntitySpecialRenderer {
|
||||
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
int height = font.FONT_HEIGHT;
|
||||
|
||||
double lineScale = 0.0025D;
|
||||
String lineLower = unit.min <= 10_000 ? unit.min + "" : BobMathUtil.getShortNumber(unit.min);
|
||||
String lineUpper = unit.max <= 10_000 ? unit.max + "" : BobMathUtil.getShortNumber(unit.max);
|
||||
|
||||
for(int j = 0; j < 2; j++) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.4375, -0.125);
|
||||
GL11.glRotated(10 + j * 50, -1, 0, 0);
|
||||
GL11.glTranslated(0, -0.4375, 0.125);
|
||||
|
||||
GL11.glTranslated(0.032, 0.4375, 0.125);
|
||||
GL11.glScaled(lineScale, -lineScale, lineScale);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
font.drawString(j == 0 ? lineLower : lineUpper, 0, -height / 2, 0x000000);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(unit.label != null && !unit.label.isEmpty()) {
|
||||
|
||||
GL11.glTranslated(0.01, 0.3125, 0);
|
||||
|
||||
@ -12,5 +12,5 @@ public interface IFusionPowerReceiver {
|
||||
* fusionPower is the per-port output adjusted for the amount of connected receivers (i.e. when boilers share output energy)
|
||||
* neutronPower is a fixed value provided by the recipe
|
||||
*/
|
||||
public void receiveFusionPower(long fusionPower, double neutronPower);
|
||||
public void receiveFusionPower(long fusionPower, double neutronPower, float r, float g, float b);
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ public class TileEntityFusionBoiler extends TileEntityLoadedBase implements IFlu
|
||||
@Override public boolean receivesFusionPower() { return true; }
|
||||
|
||||
@Override
|
||||
public void receiveFusionPower(long fusionPower, double neutronPower) {
|
||||
public void receiveFusionPower(long fusionPower, double neutronPower, float r, float g, float b) {
|
||||
this.plasmaEnergy = fusionPower;
|
||||
|
||||
int waterCycles = Math.min(tanks[0].getFill(), tanks[1].getMaxFill() - tanks[1].getFill());
|
||||
|
||||
@ -267,7 +267,7 @@ public class TileEntityFusionBreeder extends TileEntityMachineBase implements IF
|
||||
}
|
||||
|
||||
@Override public boolean receivesFusionPower() { return false; }
|
||||
@Override public void receiveFusionPower(long fusionPower, double neutronPower) { this.neutronEnergy = neutronPower; doProgress(); }
|
||||
@Override public void receiveFusionPower(long fusionPower, double neutronPower, float r, float g, float b) { this.neutronEnergy = neutronPower; doProgress(); }
|
||||
|
||||
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {tanks[0]}; }
|
||||
@Override public FluidTank[] getSendingTanks() { return new FluidTank[] {tanks[1]}; }
|
||||
|
||||
@ -62,7 +62,7 @@ public class TileEntityFusionCoupler extends TileEntityLoadedBase implements IFu
|
||||
@Override public boolean receivesFusionPower() { return true; }
|
||||
|
||||
@Override
|
||||
public void receiveFusionPower(long fusionPower, double neutronPower) {
|
||||
public void receiveFusionPower(long fusionPower, double neutronPower, float r, float g, float b) {
|
||||
|
||||
// more copy pasted crap code ! ! !
|
||||
if(klystronNode != null && klystronNode.net != null) {
|
||||
|
||||
@ -159,7 +159,7 @@ public class TileEntityFusionMHDT extends TileEntityLoadedBase implements IEnerg
|
||||
}
|
||||
|
||||
@Override public boolean receivesFusionPower() { return true; }
|
||||
@Override public void receiveFusionPower(long fusionPower, double neutronPower) { this.plasmaEnergy = fusionPower; }
|
||||
@Override public void receiveFusionPower(long fusionPower, double neutronPower, float r, float g, float b) { this.plasmaEnergy = fusionPower; }
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
|
||||
@ -1,7 +1,268 @@
|
||||
package com.hbm.tileentity.machine.fusion;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class TileEntityFusionPlasmaForge extends TileEntity {
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
|
||||
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.module.machine.ModuleMachinePlasma;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.uninos.GenNode;
|
||||
import com.hbm.uninos.INetworkProvider;
|
||||
import com.hbm.uninos.UniNodespace;
|
||||
import com.hbm.uninos.networkproviders.PlasmaNetworkProvider;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.fluidmk2.IFluidStandardReceiverMK2;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implements IFusionPowerReceiver, IEnergyReceiverMK2, IFluidStandardReceiverMK2, IControlReceiver, IGUIProvider {
|
||||
|
||||
public FluidTank inputTank;
|
||||
|
||||
public long power;
|
||||
public long maxPower = 10_000_000;
|
||||
public boolean didProcess;
|
||||
|
||||
public float plasmaRed;
|
||||
public float plasmaGreen;
|
||||
public float plasmaBlue;
|
||||
public long plasmaEnergy;
|
||||
public long plasmaEnergySync;
|
||||
protected GenNode receiverNode;
|
||||
protected GenNode providerNode;
|
||||
|
||||
public int timeOffset = -1;
|
||||
|
||||
public ModuleMachinePlasma plasmaModule;
|
||||
|
||||
public TileEntityFusionPlasmaForge() {
|
||||
super(16);
|
||||
this.inputTank = new FluidTank(Fluids.NONE, 16_000);
|
||||
|
||||
this.plasmaModule = new ModuleMachinePlasma(0, this, slots)
|
||||
.itemInput(3).itemOutput(15).fluidInput(inputTank);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machinePlasmaForge";
|
||||
}
|
||||
|
||||
@Override public boolean receivesFusionPower() { return true; }
|
||||
@Override public void receiveFusionPower(long fusionPower, double neutronPower, float r, float g, float b) {
|
||||
this.plasmaEnergy = fusionPower;
|
||||
this.plasmaRed = r;
|
||||
this.plasmaGreen = g;
|
||||
this.plasmaBlue = b;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(maxPower <= 0) this.maxPower = 1_000_000;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.plasmaEnergySync = this.plasmaEnergy;
|
||||
this.plasmaEnergy = 0;
|
||||
|
||||
ForgeDirection rot = ForgeDirection.getOrientation(this.getBlockMetadata() - 10).getRotation(ForgeDirection.UP);
|
||||
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(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);
|
||||
if(recipe != null) this.maxPower = recipe.power * 100;
|
||||
|
||||
this.maxPower = BobMathUtil.max(this.power, this.maxPower, 100_000);
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos);
|
||||
if(inputTank.getTankType() != Fluids.NONE) this.trySubscribe(inputTank.getTankType(), worldObj, pos);
|
||||
}
|
||||
|
||||
double speed = 1D;
|
||||
double pow = 1D;
|
||||
|
||||
boolean ignition = recipe != null ? recipe.ignitionTemp <= this.plasmaEnergySync : true;
|
||||
|
||||
this.plasmaModule.update(speed, pow, ignition, slots[1]);
|
||||
this.didProcess = this.plasmaModule.didProcess;
|
||||
if(this.plasmaModule.markDirty) this.markDirty();
|
||||
|
||||
if(providerNode != null && providerNode.hasValidNet()) {
|
||||
|
||||
for(Object o : providerNode.net.receiverEntries.entrySet()) {
|
||||
Entry<Object, Long> entry = (Entry<Object, Long>) o;
|
||||
|
||||
if(entry.getKey() instanceof IFusionPowerReceiver) {
|
||||
long powerReceived = (long) Math.ceil(this.plasmaEnergySync * 0.75);
|
||||
((IFusionPowerReceiver) entry.getKey()).receiveFusionPower(powerReceived, 0, plasmaRed, plasmaGreen, plasmaBlue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.networkPackNT(100);
|
||||
} else {
|
||||
|
||||
if(timeOffset == -1) this.timeOffset = worldObj.rand.nextInt(30_000);
|
||||
}
|
||||
}
|
||||
|
||||
public GenNode createNode(INetworkProvider provider, ForgeDirection dir) {
|
||||
GenNode node = UniNodespace.getNode(worldObj, xCoord + dir.offsetX * 5, yCoord + 2, zCoord + dir.offsetZ * 5, provider);
|
||||
if(node != null) return node;
|
||||
|
||||
node = new GenNode(provider,
|
||||
new BlockPos(xCoord + dir.offsetX * 5, yCoord + 2, zCoord + dir.offsetZ * 5))
|
||||
.setConnections(new DirPos(xCoord + dir.offsetX * 6, yCoord + 2, zCoord + dir.offsetZ * 6, dir));
|
||||
|
||||
UniNodespace.createNode(worldObj, node);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 6 - rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 6 - rot.offsetZ * 2, dir),
|
||||
new DirPos(xCoord + dir.offsetX * 6 - rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 6 - rot.offsetZ * 1, dir),
|
||||
new DirPos(xCoord + dir.offsetX * 6 + rot.offsetX * 0, yCoord, zCoord + dir.offsetZ * 6 + rot.offsetZ * 0, dir),
|
||||
new DirPos(xCoord + dir.offsetX * 6 + rot.offsetX * 1, yCoord, zCoord + dir.offsetZ * 6 + rot.offsetZ * 1, dir),
|
||||
new DirPos(xCoord + dir.offsetX * 6 + rot.offsetX * 2, yCoord, zCoord + dir.offsetZ * 6 + rot.offsetZ * 2, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 6 - rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 6 - rot.offsetZ * 2, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 6 - rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 6 - rot.offsetZ * 1, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 6 + rot.offsetX * 0, yCoord, zCoord - dir.offsetZ * 6 + rot.offsetZ * 0, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 6 + rot.offsetX * 1, yCoord, zCoord - dir.offsetZ * 6 + rot.offsetZ * 1, dir.getOpposite()),
|
||||
new DirPos(xCoord - dir.offsetX * 6 + rot.offsetX * 2, yCoord, zCoord - dir.offsetZ * 6 + rot.offsetZ * 2, dir.getOpposite()),
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
this.inputTank.serialize(buf);
|
||||
buf.writeFloat(plasmaRed);
|
||||
buf.writeFloat(plasmaGreen);
|
||||
buf.writeFloat(plasmaBlue);
|
||||
buf.writeLong(plasmaEnergySync);
|
||||
buf.writeLong(power);
|
||||
buf.writeLong(maxPower);
|
||||
buf.writeBoolean(didProcess);
|
||||
this.plasmaModule.serialize(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.inputTank.deserialize(buf);
|
||||
this.plasmaRed = buf.readFloat();
|
||||
this.plasmaGreen = buf.readFloat();
|
||||
this.plasmaBlue = buf.readFloat();
|
||||
this.plasmaEnergySync = buf.readLong();
|
||||
this.power = buf.readLong();
|
||||
this.maxPower = buf.readLong();
|
||||
this.didProcess = buf.readBoolean();
|
||||
this.plasmaModule.deserialize(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.inputTank.readFromNBT(nbt, "i");
|
||||
this.power = nbt.getLong("power");
|
||||
this.maxPower = nbt.getLong("maxPower");
|
||||
this.plasmaModule.readFromNBT(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
this.inputTank.writeToNBT(nbt, "i");
|
||||
nbt.setLong("power", power);
|
||||
nbt.setLong("maxPower", maxPower);
|
||||
this.plasmaModule.writeToNBT(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
if(slot == 0) return true; // battery
|
||||
if(slot == 1 && stack.getItem() == ModItems.blueprints) return true;
|
||||
// TODO booster material
|
||||
if(this.plasmaModule.isItemValid(slot, stack)) return true; // recipe input crap
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return i == 15 || this.plasmaModule.isSlotClogged(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return new int[] {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
||||
}
|
||||
|
||||
@Override public long getPower() { return power; }
|
||||
@Override public void setPower(long power) { this.power = power; }
|
||||
@Override public long getMaxPower() { return maxPower; }
|
||||
|
||||
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {inputTank}; }
|
||||
@Override public FluidTank[] getAllTanks() { return new FluidTank[] {inputTank}; }
|
||||
|
||||
@Override public boolean hasPermission(EntityPlayer player) { return this.isUseableByPlayer(player); }
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
if(data.hasKey("index") && data.hasKey("selection")) {
|
||||
int index = data.getInteger("index");
|
||||
String selection = data.getString("selection");
|
||||
if(index == 0) {
|
||||
this.plasmaModule.recipe = selection;
|
||||
this.markChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
if(bb == null) bb = AxisAlignedBB.getBoundingBox(xCoord - 5, yCoord, zCoord - 5, xCoord + 5, yCoord + 6, zCoord + 6);
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return new ContainerMachinePlasmaForge(player.inventory, this); }
|
||||
@Override @SideOnly(Side.CLIENT) public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIMachinePlasmaForge(player.inventory, this); }
|
||||
}
|
||||
|
||||
@ -169,6 +169,9 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP
|
||||
|
||||
boolean ignition = recipe != null ? recipe.ignitionTemp <= this.klystronEnergy : true;
|
||||
|
||||
float r = 0F;
|
||||
float g = 0F;
|
||||
float b = 0F;
|
||||
this.plasmaEnergy = 0;
|
||||
this.fuelConsumption = 0;
|
||||
this.fusionModule.preUpdate(factor, collectors * 0.5D);
|
||||
@ -178,6 +181,9 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP
|
||||
if(didProcess && recipe != null) {
|
||||
this.plasmaEnergy = (long) Math.ceil(recipe.outputTemp * factor);
|
||||
this.fuelConsumption = factor;
|
||||
r = recipe.r;
|
||||
g = recipe.g;
|
||||
b = recipe.b;
|
||||
}
|
||||
|
||||
double outputIntensity = this.getOuputIntensity(receiverCount);
|
||||
@ -192,7 +198,7 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP
|
||||
|
||||
if(entry.getKey() instanceof IFusionPowerReceiver) {
|
||||
long powerReceived = (long) Math.ceil(this.plasmaEnergy * outputIntensity);
|
||||
((IFusionPowerReceiver) entry.getKey()).receiveFusionPower(powerReceived, outputFlux);
|
||||
((IFusionPowerReceiver) entry.getKey()).receiveFusionPower(powerReceived, outputFlux, r, g, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod && ItemRBMKRod.getHullHeat(slots[0]) >= 150) {
|
||||
if(slots[0] != null && slots[0].getItem() instanceof ItemRBMKRod && ItemRBMKRod.getHullHeat(slots[0]) >= 150 && !RBMKDials.getMeltdownsDisabled(worldObj)) {
|
||||
this.meltdown();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Base64;
|
||||
@ -60,18 +56,6 @@ public class ShadyUtil {
|
||||
hashes.add("31da6223a100ed348ceb3254ceab67c9cc102cb2a04ac24de0df3ef3479b1036");
|
||||
}
|
||||
|
||||
public static final int c = 0x3d;
|
||||
public static String initializer = "Ur bp7mN-@UFZKXBx9N[/>M'k\\7\\9m3b";
|
||||
public static String signature = "dYPq\\YzrNpfn[ZDxdk7PS2jhTY72cZT7SoH|\\WL3dIznfC";
|
||||
public static String mask = "E#?V,%l!nb4 ik_wJ@(&k4o>Wq";
|
||||
public static String checksum = "dpXt\\Xnr\\Yzm";
|
||||
public static String testCase = "dYPq\\YzrNm3FUH;P[ZTq";
|
||||
public static String testValue = "WGm?";
|
||||
public static String smTest1 = "hgwS";
|
||||
public static String smTest2 = "8Sfw";
|
||||
public static String smTest3 = "j11D";
|
||||
public static String smTest4 = "s783";
|
||||
|
||||
public static Set<String> contributors = Sets.newHashSet(new String[] {
|
||||
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf
|
||||
"5bf069bc-5b46-4179-aafe-35c0a07dee8b", //JMF781
|
||||
@ -79,18 +63,10 @@ public class ShadyUtil {
|
||||
});
|
||||
|
||||
// simple cryptographic utils
|
||||
public static String encode(String msg) { return Base64.getEncoder().encodeToString(msg.getBytes()); }
|
||||
public static String decode(String msg) { return new String(Base64.getDecoder().decode(msg)); }
|
||||
@Deprecated public static String encode(String msg) { return Base64.getEncoder().encodeToString(msg.getBytes()); }
|
||||
@Deprecated public static String decode(String msg) { return new String(Base64.getDecoder().decode(msg)); }
|
||||
|
||||
public static String offset(String msg, int o) {
|
||||
byte[] bytes = msg.getBytes();
|
||||
for(int i = 0; i < bytes.length; i++) {
|
||||
bytes[i] += o;
|
||||
}
|
||||
return new String(bytes);
|
||||
}
|
||||
|
||||
/** Encryptor for the h-cat answer strings */
|
||||
/** complete fucking shit */
|
||||
public static String smoosh(String s1, String s2, String s3, String s4) {
|
||||
|
||||
Random rand = new Random();
|
||||
@ -132,23 +108,4 @@ public class ShadyUtil {
|
||||
} catch(NoSuchAlgorithmException e) { }
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void test() {
|
||||
if(!GeneralConfig.enableDebugMode) return; //only run in debug mode
|
||||
|
||||
//unit test for smooshing
|
||||
MainRegistry.logger.debug(smoosh(smTest1, smTest2, smTest3, smTest4));
|
||||
|
||||
try {
|
||||
Class test = Class.forName(decode(offset(signature, -2)));
|
||||
Field field = ReflectionHelper.findField(test, decode(offset(checksum, -2)));
|
||||
if(field != null) {
|
||||
System.out.println("TEST SECTION START");
|
||||
//Class toLoad = Class.forName(decode(offset(testCase, -2)));
|
||||
//Field toRead = ReflectionHelper.findField(toLoad, decode(offset(testValue, -2)));
|
||||
//ModEventHandler.reference = toRead;
|
||||
System.out.println("TEST SECTION END");
|
||||
}
|
||||
} catch(Throwable e) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 334 B |
|
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 861 B |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |