diff --git a/build.gradle b/build.gradle index c57dc1c..dc86246 100644 --- a/build.gradle +++ b/build.gradle @@ -33,7 +33,7 @@ neoForge { server { server() - programArgument '--nogui' + // programArgument '--nogui' systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id } diff --git a/src/main/java/dev/wolfieboy09/qstorage/block/AbstractEnergyBlockEntity.java b/src/main/java/dev/wolfieboy09/qstorage/block/AbstractEnergyBlockEntity.java index 2a9f37f..2ead8e7 100644 --- a/src/main/java/dev/wolfieboy09/qstorage/block/AbstractEnergyBlockEntity.java +++ b/src/main/java/dev/wolfieboy09/qstorage/block/AbstractEnergyBlockEntity.java @@ -77,10 +77,12 @@ public ExtendedEnergyStorage getEnergyStorage() { return this.energyStorage; } + @Override public int getEnergyStored() { return this.energyStorage.getEnergyStored(); } + @Override public int getMaxEnergyStored() { return this.energyStorage.getMaxEnergyStored(); } diff --git a/src/main/java/dev/wolfieboy09/qstorage/block/ItemResultSlot.java b/src/main/java/dev/wolfieboy09/qstorage/block/ItemResultSlot.java index e79577e..a8619ee 100644 --- a/src/main/java/dev/wolfieboy09/qstorage/block/ItemResultSlot.java +++ b/src/main/java/dev/wolfieboy09/qstorage/block/ItemResultSlot.java @@ -1,12 +1,14 @@ package dev.wolfieboy09.qstorage.block; +import net.minecraft.world.Container; +import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import net.neoforged.neoforge.items.IItemHandler; import net.neoforged.neoforge.items.SlotItemHandler; -public class ItemResultSlot extends SlotItemHandler { - public ItemResultSlot(IItemHandler itemHandler, int index, int xPosition, int yPosition) { - super(itemHandler, index, xPosition, yPosition); +public class ItemResultSlot extends Slot { + public ItemResultSlot(Container container, int slot, int x, int y) { + super(container, slot, x, y); } @Override diff --git a/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerMenu.java b/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerMenu.java index 270bb77..e9433cc 100644 --- a/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerMenu.java +++ b/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerMenu.java @@ -2,8 +2,10 @@ import dev.wolfieboy09.qstorage.api.energy.ExtendedEnergyStorage; import dev.wolfieboy09.qstorage.block.AbstractEnergyContainerMenu; +import dev.wolfieboy09.qstorage.block.ItemResultSlot; import dev.wolfieboy09.qstorage.registries.QSMenuTypes; import net.minecraft.core.BlockPos; +import net.minecraft.world.Container; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.*; @@ -61,6 +63,17 @@ public DiskAssemblerMenu(int id, BlockPos pos, Inventory playerInventory, Player addSlot(new SlotItemHandler(playerInvWrapper, slotNumber, xpos, ypos)); } } + + addSlot(new Slot((Container) containerData, 37, 17, 27)); + addSlot(new Slot((Container) containerData, 38, 17, 45)); + addSlot(new Slot((Container) containerData, 39, 35, 36)); + + addSlot(new Slot((Container) containerData, 40, 116, 27)); + addSlot(new Slot((Container) containerData, 41, 134, 27)); + addSlot(new Slot((Container) containerData, 42, 116, 45)); + addSlot(new Slot((Container) containerData, 43, 134, 45)); + + addSlot(new ItemResultSlot((Container) containerData, 44, 80, 36)); } @Override