diff --git a/changelog b/changelog index eb4d93fad..d6fe0941a 100644 --- a/changelog +++ b/changelog @@ -26,6 +26,7 @@ * This effectively means that neutron reflectors are post oil 3 * Removed legacy battery items and selfchargers * Added more QMAW pages +* Expensive mode plastic sheets now only use rubber instead of rubber or latex ## Fixed * Fixed uncrafting of the nickel RTG pellet not respecting item metadata diff --git a/src/main/java/api/hbm/ntl/ISlotMonitorProvider.java b/src/main/java/api/hbm/ntl/ISlotMonitorProvider.java new file mode 100644 index 000000000..380a6c69f --- /dev/null +++ b/src/main/java/api/hbm/ntl/ISlotMonitorProvider.java @@ -0,0 +1,16 @@ +package api.hbm.ntl; + +import net.minecraft.item.ItemStack; + +/** Interface for storage tile entities which provides the access terminals with slot monitors, and slot monitors with ways of accessing the underlying stacks */ +public interface ISlotMonitorProvider { + + /** Returns an array of available slot monitors, which should ideally mirror the available slots of that container */ + public SlotMonitor[] getMonitors(); + + /** Returns the slot contents of that index, so that the monitors cna detect changes */ + public ItemStack getSlotAt(int index); + + /** Whether this storage unit is reachable by the access point on the provided location */ + public boolean isAvailableToTerminal(int termX, int termY, int termZ); +} diff --git a/src/main/java/api/hbm/ntl/SlotMonitor.java b/src/main/java/api/hbm/ntl/SlotMonitor.java new file mode 100644 index 000000000..99c5c1e28 --- /dev/null +++ b/src/main/java/api/hbm/ntl/SlotMonitor.java @@ -0,0 +1,20 @@ +package api.hbm.ntl; + +import net.minecraft.item.Item; +import net.minecraft.nbt.NBTTagCompound; + +public class SlotMonitor { + + public final int index; + public final ISlotMonitorProvider parent; + + public Item item; + public long stacksize; + public int meta; + public NBTTagCompound nbt; + + public SlotMonitor(int index, ISlotMonitorProvider parent) { + this.index = index; + this.parent = parent; + } +} diff --git a/src/main/java/com/hbm/inventory/container/ContainerBase.java b/src/main/java/com/hbm/inventory/container/ContainerBase.java index 14305fc1c..6ad69331c 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerBase.java +++ b/src/main/java/com/hbm/inventory/container/ContainerBase.java @@ -67,6 +67,11 @@ public class ContainerBase extends Container { return slotOriginal; } + /** Standard player inventory with default hotbar and horizontal offsets */ + public void playerInv(InventoryPlayer invPlayer, int playerInvY) { + playerInv(invPlayer, 8, playerInvY, playerInvY + 58); + } + /** Standard player inventory with default hotbar offset */ public void playerInv(InventoryPlayer invPlayer, int playerInvX, int playerInvY) { playerInv(invPlayer, playerInvX, playerInvY, playerInvY + 58); diff --git a/src/main/java/com/hbm/inventory/container/ContainerPneumoStorageClutter.java b/src/main/java/com/hbm/inventory/container/ContainerPneumoStorageClutter.java new file mode 100644 index 000000000..793149f2d --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerPneumoStorageClutter.java @@ -0,0 +1,15 @@ +package com.hbm.inventory.container; + +import com.hbm.tileentity.network.pneumatic.TileEntityPneumoStorageClutter; + +import net.minecraft.entity.player.InventoryPlayer; + +public class ContainerPneumoStorageClutter extends ContainerBase { + + public ContainerPneumoStorageClutter(InventoryPlayer invPlayer, TileEntityPneumoStorageClutter storage) { + super(invPlayer, storage); + + addSlots(storage, 0, 8, 17, 6, 9); + playerInv(invPlayer, 153); + } +} diff --git a/src/main/java/com/hbm/inventory/gui/GUIPneumoStorageClutter.java b/src/main/java/com/hbm/inventory/gui/GUIPneumoStorageClutter.java new file mode 100644 index 000000000..39ebd6863 --- /dev/null +++ b/src/main/java/com/hbm/inventory/gui/GUIPneumoStorageClutter.java @@ -0,0 +1,51 @@ +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.container.ContainerPneumoStorageClutter; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.network.pneumatic.TileEntityPneumoStorageClutter; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIPneumoStorageClutter extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_pneumatic_clutter.png"); + protected TileEntityPneumoStorageClutter storage; + + public GUIPneumoStorageClutter(InventoryPlayer invPlayer, TileEntityPneumoStorageClutter storage) { + super(new ContainerPneumoStorageClutter(invPlayer, storage)); + this.storage = storage; + + this.xSize = 200; + this.ySize = 235; + } + + @Override + public void drawScreen(int x, int y, float interp) { + super.drawScreen(x, y, interp); + } + + @Override + protected void mouseClicked(int x, int y, int i) { + super.mouseClicked(x, y, i); + } + + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = this.storage.hasCustomInventoryName() ? this.storage.getInventoryName() : I18n.format(this.storage.getInventoryName()); + + this.fontRendererObj.drawString(name, 176 / 2 - this.fontRendererObj.getStringWidth(name) / 2, 5, 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); + } +} diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java index a422cd065..cdb46d914 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java @@ -104,7 +104,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputFluids(new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 4_000)) .outputFluids(new FluidStack(Fluids.PERFLUOROMETHYL, 4_000))); this.register(new GenericRecipe("ass.explastic").setup(600, 20_000).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.PLASTIC.ordinal())) - .inputItems(new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(ANY_RUBBER.ingot(), 8)) + .inputItems(new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(RUBBER.ingot(), 8)) .inputFluids(new FluidStack(Fluids.SOLVENT, 1_000))); this.register(new GenericRecipe("ass.exgold").setup(600, 10_000).outputItems(new ItemStack(ModItems.item_expensive, 1, EnumExpensiveType.GOLD_DUST.ordinal())) .inputItems(new OreDictStack(GOLD.dust(), 64), new OreDictStack(GOLD.dust(), 64))); @@ -479,7 +479,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.LEAD_PLATING), new OreDictStack(GRAPHITE.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new OreDictStack(ANY_CONCRETE.any(), 16), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.rbmk").setup(100, 100).outputItems(new ItemStack(ModBlocks.rbmk_blank, 1)) .inputItems(new ComparableStack(ModBlocks.concrete_asbestos, 4), new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(CU.plate(), 4), new OreDictStack(RUBBER.ingot(), 2)) - .inputItemsEx(new ComparableStack(ModBlocks.concrete_asbestos, 4), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.FERRO_PLATING), new OreDictStack(CU.plate(), 16)) + .inputItemsEx(new ComparableStack(ModBlocks.concrete_asbestos, 4), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.LEAD_PLATING), new OreDictStack(CU.plate(), 16)) .setPools528(GenericRecipes.POOL_PREFIX_528 + "ferrouranium")); this.register(new GenericRecipe("ass.rbmkautoloader").setup(100, 100).outputItems(new ItemStack(ModBlocks.rbmk_autoloader, 1)) .inputItems(new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(PB.plateCast(), 4), new OreDictStack(B.ingot(), 4), new ComparableStack(ModItems.motor, 3)) diff --git a/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageClutter.java b/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageClutter.java index 126bed44e..0018ee74b 100644 --- a/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageClutter.java +++ b/src/main/java/com/hbm/tileentity/network/pneumatic/TileEntityPneumoStorageClutter.java @@ -1,18 +1,31 @@ package com.hbm.tileentity.network.pneumatic; +import com.hbm.inventory.container.ContainerPneumoStorageClutter; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; +import com.hbm.inventory.gui.GUIPneumoStorageClutter; +import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.TileEntityMachineBase; import api.hbm.fluidmk2.IFluidStandardReceiverMK2; +import api.hbm.ntl.ISlotMonitorProvider; +import api.hbm.ntl.SlotMonitor; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; -public class TileEntityPneumoStorageClutter extends TileEntityMachineBase implements IFluidStandardReceiverMK2 { +public class TileEntityPneumoStorageClutter extends TileEntityMachineBase implements IFluidStandardReceiverMK2, ISlotMonitorProvider, IGUIProvider { public FluidTank compair; + public SlotMonitor[] monitors; public TileEntityPneumoStorageClutter() { super(6 * 9); this.compair = new FluidTank(Fluids.AIR, 4_000).withPressure(1); + this.monitors = new SlotMonitor[6 * 9]; + + for(int i = 0; i < monitors.length; i++) this.monitors[i] = new SlotMonitor(i, this); } @Override @@ -25,6 +38,26 @@ public class TileEntityPneumoStorageClutter extends TileEntityMachineBase implem } + @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return true; } + @Override public FluidTank[] getAllTanks() { return new FluidTank[] {compair}; } @Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {compair}; } + + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new ContainerPneumoStorageClutter(player.inventory, this); + } + + @Override + public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new GUIPneumoStorageClutter(player.inventory, this); + } + + @Override public SlotMonitor[] getMonitors() { return monitors; } + @Override public ItemStack getSlotAt(int index) { return this.getStackInSlot(index); } + + @Override + public boolean isAvailableToTerminal(int termX, int termY, int termZ) { + return true; + } } diff --git a/src/main/resources/assets/hbm/manual/material/hss.json b/src/main/resources/assets/hbm/manual/material/hss.json index 76c883af6..13920bd3a 100644 --- a/src/main/resources/assets/hbm/manual/material/hss.json +++ b/src/main/resources/assets/hbm/manual/material/hss.json @@ -9,7 +9,7 @@ "zh_CN": "高速钢" }, "content": { - "en_US": "Alloy made from [[steel|Steel]], [[tungsten|Tungsten]] and [[cobalt|Cobalt]] in a [[curcible|Crucible]]. Created as liquid metal, needs to be cast into ingot or plate shape before being usable.", + "en_US": "Alloy made from [[steel|Steel]], [[tungsten|Tungsten]] and [[cobalt|Cobalt]] in a [[crucible|Crucible]]. Created as liquid metal, needs to be cast into ingot or plate shape before being usable.", "uk_UA": "Сплав зі [[сталі|Steel]], [[вольфраму|Tungsten]] та [[кобальту|Cobalt]], виготовлений в [[ливарні|Crucible]]. Створюється у вигляді рідкого металу, перед використанням його необхідно відлити у форму зливка або пластини.

Використовується для виготовлення різального обладнання що працює на великих швидкостях.", "ru_RU": "Сплав из [[стали|Steel]], [[вольфрама|Tungsten]] и [[кобальта|Cobalt]], изготовленный в [[тигле|Crucible]]. Создается в виде жидкого металла, требует отливки в форму слитка или пластины перед использованием.", "zh_CN": "[[钢|Steel]、[[钨|Tungsten]]、[[钴|Cobalt]]的合金,在[[坩埚|Crucible]]中制成。制造出的高速钢为熔融状态, 在使用前需要将其铸造成锭或板的形式。"