mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Remove the upgrade, just change the caster
This commit is contained in:
parent
63926ccd4a
commit
4b59c55c5a
@ -2,9 +2,6 @@ package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotNonRetarded;
|
||||
import com.hbm.inventory.SlotUpgrade;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineStrandCaster;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -30,9 +27,6 @@ public class ContainerMachineStrandCaster extends Container {
|
||||
}
|
||||
}
|
||||
|
||||
//unstacking upgrade
|
||||
this.addSlotToContainer(new SlotUpgrade(this.caster, 7, 57, 25));
|
||||
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 9; j++) {
|
||||
@ -54,17 +48,13 @@ public class ContainerMachineStrandCaster extends Container {
|
||||
ItemStack originalStack = slot.getStack();
|
||||
stack = originalStack.copy();
|
||||
|
||||
if (index <= 7) {
|
||||
if (!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 8, this.inventorySlots.size(), true)) {
|
||||
if (index <= 6) {
|
||||
if (!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 7, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
slot.onSlotChange(originalStack, stack);
|
||||
|
||||
} else if (stack.getItem() == ModItems.upgrade_unclog) {
|
||||
// Doesn't matter if it suceeds
|
||||
this.mergeItemStack(originalStack, 7, 8, false);
|
||||
return null;
|
||||
} else if (!InventoryUtil.mergeItemStack(this.inventorySlots, originalStack, 1, 2, false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1849,7 +1849,6 @@ public class ModItems {
|
||||
public static Item upgrade_gc_speed;
|
||||
public static Item upgrade_5g;
|
||||
public static Item upgrade_stack;
|
||||
public static Item upgrade_unclog;
|
||||
public static Item upgrade_ejector;
|
||||
|
||||
public static Item ingot_euphemium;
|
||||
@ -4402,7 +4401,6 @@ public class ModItems {
|
||||
upgrade_gc_speed = new ItemMachineUpgrade().setUnlocalizedName("upgrade_gc_speed").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_gc_speed");
|
||||
upgrade_5g = new ItemMachineUpgrade().setUnlocalizedName("upgrade_5g").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_5g");
|
||||
upgrade_stack = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_stack").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_stack");
|
||||
upgrade_unclog = new ItemMachineUpgrade().setUnlocalizedName("upgrade_unclog").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_unclog");
|
||||
upgrade_ejector = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_ejector").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_ejector");
|
||||
|
||||
wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand");
|
||||
@ -6391,7 +6389,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(upgrade_gc_speed, upgrade_gc_speed.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_5g, upgrade_5g.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_stack, upgrade_stack.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_unclog, upgrade_unclog.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_ejector, upgrade_ejector.getUnlocalizedName());
|
||||
|
||||
//Machine Templates
|
||||
|
||||
@ -107,12 +107,6 @@ public class ItemMachineUpgrade extends Item {
|
||||
list.add("Allows for total isotopic separation of HEUF6");
|
||||
list.add(EnumChatFormatting.YELLOW + "also your centrifuge goes sicko mode");
|
||||
}
|
||||
|
||||
if(this == ModItems.upgrade_unclog) {
|
||||
list.add(EnumChatFormatting.RED + "Strand Caster Upgrade");
|
||||
list.add("Stops the buffer from constantly clogging up");
|
||||
list.add("by allowing to periodically drain its contents");
|
||||
}
|
||||
}
|
||||
|
||||
public static enum UpgradeType {
|
||||
|
||||
@ -14,7 +14,6 @@ import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.crafting.*;
|
||||
import com.hbm.crafting.handlers.*;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
@ -796,7 +795,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_stack, 1, 0), new Object[] { " C ", "PUP", " C ", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'U', ModItems.upgrade_template });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_stack, 1, 1), new Object[] { " C ", "PUP", " C ", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_HYDRAULIC), 'U', new ItemStack(ModItems.upgrade_stack, 1, 0) });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_stack, 1, 2), new Object[] { " C ", "PUP", " C ", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_ELECTRIC), 'U', new ItemStack(ModItems.upgrade_stack, 1, 1) });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_unclog, 1), new Object[] { " B ", "TUT", " B ", 'B', new ItemStack(ModItems.tank_steel), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'U', ModItems.upgrade_template });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_ejector, 1, 0), new Object[] { " C ", "PUP", " C ", 'C', ModItems.plate_copper, 'P', ModItems.motor, 'U', ModItems.upgrade_template });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_ejector, 1, 1), new Object[] { " C ", "PUP", " C ", 'C', ModItems.plate_gold, 'P', ModItems.motor, 'U', new ItemStack(ModItems.upgrade_ejector, 1, 0) });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_ejector, 1, 2), new Object[] { " C ", "PUP", " C ", 'C', ModItems.plate_saturnite, 'P', ModItems.motor, 'U', new ItemStack(ModItems.upgrade_ejector, 1, 1) });
|
||||
|
||||
@ -47,7 +47,7 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
||||
}
|
||||
|
||||
public TileEntityMachineStrandCaster() {
|
||||
super(8);
|
||||
super(7);
|
||||
water = new FluidTank(Fluids.WATER, 64_000);
|
||||
steam = new FluidTank(Fluids.SPENTSTEAM, 64_000);
|
||||
}
|
||||
@ -84,34 +84,34 @@ public class TileEntityMachineStrandCaster extends TileEntityFoundryCastingBase
|
||||
if(canProcess()) {
|
||||
int minAmount = mold.getCost() * 9;
|
||||
|
||||
// The upgrade makes it flush the buffers after 10 seconds of inactivity
|
||||
if(slots[7] != null && slots[7].getItem() == ModItems.upgrade_unclog && worldObj.getWorldTime() >= lastCastTick + 200) {
|
||||
// Makes it flush the buffers after 10 seconds of inactivity
|
||||
if(worldObj.getWorldTime() >= lastCastTick + 200) {
|
||||
minAmount = mold.getCost();
|
||||
}
|
||||
|
||||
if(this.amount >= minAmount) {
|
||||
int itemsCasted = amount / mold.getCost();
|
||||
|
||||
|
||||
for(int j = 0; j < itemsCasted; j++) {
|
||||
this.amount -= mold.getCost();
|
||||
|
||||
|
||||
ItemStack out = mold.getOutput(type);
|
||||
|
||||
|
||||
for(int i = 1; i < 7; i++) {
|
||||
if(slots[i] == null) {
|
||||
slots[i] = out.copy();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(slots[i].isItemEqual(out) && slots[i].stackSize + out.stackSize <= out.getMaxStackSize()) {
|
||||
slots[i].stackSize += out.stackSize;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
markChanged();
|
||||
|
||||
|
||||
water.setFill(water.getFill() - getWaterRequired() * itemsCasted);
|
||||
steam.setFill(steam.getFill() + getWaterRequired() * itemsCasted);
|
||||
|
||||
|
||||
@ -3515,7 +3515,6 @@ item.upgrade_speed_3.name=Geschwindigkeitsupgrade Mk.III
|
||||
item.upgrade_stack_1.name=Stapelupgrade Mk.I
|
||||
item.upgrade_stack_2.name=Stapelupgrade Mk.II
|
||||
item.upgrade_stack_3.name=Stapelupgrade Mk.III
|
||||
item.upgrade_unclog.name=Unclogging Upgrade
|
||||
item.upgrade_template.name=Maschinenupgrade-Vorlage
|
||||
item.volcanic_pickaxe.name=Geschmolzene Spitzhacke
|
||||
item.wand_d.name=Debug-Zauberstab
|
||||
|
||||
@ -4532,7 +4532,6 @@ item.upgrade_speed_3.name=Speed Upgrade Mk.III
|
||||
item.upgrade_stack_1.name=Stack Ejection Upgrade Mk.I
|
||||
item.upgrade_stack_2.name=Stack Ejection Upgrade Mk.II
|
||||
item.upgrade_stack_3.name=Stack Ejection Upgrade Mk.III
|
||||
item.upgrade_unclog.name=Unclogging Upgrade
|
||||
item.upgrade_template.name=Machine Upgrade Template
|
||||
item.volcanic_axe.name=Molten Axe
|
||||
item.volcanic_pickaxe.name=Molten Pickaxe
|
||||
|
||||
@ -4711,7 +4711,6 @@ item.upgrade_speed_3.name=Speed Upgrade Mk.III
|
||||
item.upgrade_stack_1.name=Stack Ejection Upgrade Mk.I
|
||||
item.upgrade_stack_2.name=Stack Ejection Upgrade Mk.II
|
||||
item.upgrade_stack_3.name=Stack Ejection Upgrade Mk.III
|
||||
item.upgrade_unclog.name=Unclogging Upgrade
|
||||
item.upgrade_template.name=Machine Upgrade Template
|
||||
item.volcanic_axe.name=Molten Axe
|
||||
item.volcanic_pickaxe.name=Molten Pickaxe
|
||||
|
||||
@ -4137,7 +4137,6 @@ item.upgrade_speed_3.name=Speed Upgrade Mk.III
|
||||
item.upgrade_stack_1.name=Stack Ejection Upgrade Mk.I
|
||||
item.upgrade_stack_2.name=Stack Ejection Upgrade Mk.II
|
||||
item.upgrade_stack_3.name=Stack Ejection Upgrade Mk.III
|
||||
item.upgrade_unclog.name=Unclogging Upgrade
|
||||
item.upgrade_template.name=Machine Upgrade Template
|
||||
item.v1.name=V1
|
||||
item.volcanic_pickaxe.name=Molten Pickaxe
|
||||
|
||||
@ -3965,7 +3965,6 @@ item.upgrade_ejector_3.name=Улучшение извлекателя "Скор
|
||||
item.upgrade_stack_1.name=Улучшение извлекателя "Количество стака" I уровня
|
||||
item.upgrade_stack_2.name=Улучшение извлекателя "Количество стака" II уровня
|
||||
item.upgrade_stack_3.name=Улучшение извлекателя "Количество стака" III уровня
|
||||
item.upgrade_unclog.name=Улучшение машины непрерывного литья "Частичный слив"
|
||||
|
||||
item.fusion_core.name=Ядерный блок
|
||||
item.energy_core.name=Импровизированный энергоблок
|
||||
|
||||
@ -4407,7 +4407,6 @@ item.upgrade_speed_3=三级红色机器升级
|
||||
item.upgrade_stack_1=一级堆叠弹出升级
|
||||
item.upgrade_stack_2=二级堆叠弹出升级
|
||||
item.upgrade_stack_3=三级堆叠弹出升级
|
||||
item.upgrade_unclog.name=Unclogging upgrade
|
||||
item.upgrade_template=机器升级模板
|
||||
item.volcanic_axe=熔岩斧
|
||||
item.volcanic_pickaxe=熔岩镐
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 759 B |
Loading…
x
Reference in New Issue
Block a user