From e2bfba701eccb4e008fd8df04fb8f4d5e24e1991 Mon Sep 17 00:00:00 2001 From: RoboXGamer Date: Sun, 27 Oct 2024 14:33:23 +0530 Subject: [PATCH] Fixed energy not shown in Jade + Added Recipe to be shown in JEI with a test recipe --- .../DiskAssemblerBlockEntity.java | 1 + .../DiskAssemblerCategory.java | 24 +++++++++++-------- .../disk_assembly/basic_storage_disk.json | 0 3 files changed, 15 insertions(+), 10 deletions(-) rename src/main/resources/data/qstorage/{recipes => recipe}/disk_assembly/basic_storage_disk.json (100%) diff --git a/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerBlockEntity.java b/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerBlockEntity.java index 477dceb..de29e90 100644 --- a/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerBlockEntity.java +++ b/src/main/java/dev/wolfieboy09/qstorage/block/disk_assembler/DiskAssemblerBlockEntity.java @@ -65,6 +65,7 @@ public boolean canReceive() { } public EnergyStorage getEnergyHandler(Direction side) { + if (side == null) return this.getEnergyStorage(); Direction blockFacing = this.getBlockState().getValue(DiskAssemblerBlock.FACING); return side == blockFacing.getOpposite() ? this.getEnergyStorage() : null; } diff --git a/src/main/java/dev/wolfieboy09/qstorage/intergration/jei/disk_assembeler/DiskAssemblerCategory.java b/src/main/java/dev/wolfieboy09/qstorage/intergration/jei/disk_assembeler/DiskAssemblerCategory.java index 2811e15..0efb99b 100644 --- a/src/main/java/dev/wolfieboy09/qstorage/intergration/jei/disk_assembeler/DiskAssemblerCategory.java +++ b/src/main/java/dev/wolfieboy09/qstorage/intergration/jei/disk_assembeler/DiskAssemblerCategory.java @@ -6,6 +6,7 @@ import dev.wolfieboy09.qstorage.api.util.ResourceHelper; import dev.wolfieboy09.qstorage.block.disk_assembler.DiskAssemblerRecipe; import dev.wolfieboy09.qstorage.registries.QSBlocks; +import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; @@ -26,8 +27,8 @@ public class DiskAssemblerCategory implements IRecipeCategory