From 9a89a87d30e3b3f1ed007faab7ec0a1d9926589d Mon Sep 17 00:00:00 2001 From: yuu111 Date: Sun, 9 Jun 2024 22:36:26 +0900 Subject: [PATCH] =?UTF-8?q?EMC=E3=81=8C=E7=84=A1=E3=81=84=E3=82=A2?= =?UTF-8?q?=E3=82=A4=E3=83=86=E3=83=A0=E3=82=92=E8=A8=AD=E7=BD=AE=E3=81=97?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=A8=E3=81=97=E3=81=9F=E9=9A=9B=E3=81=AE?= =?UTF-8?q?=E3=82=BC=E3=83=AD=E9=99=A4=E7=AE=97=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 3 ++- .idea/modules.xml | 10 ++++++++++ .idea/modules/EMCGadgets.api.iml | 14 ++------------ .idea/modules/EMCGadgets.main.iml | 14 ++------------ .idea/modules/EMCGadgets.test.iml | 14 ++------------ .../emcgadgets/EMCInventoryManipulation.java | 1 + 6 files changed, 19 insertions(+), 37 deletions(-) create mode 100644 .idea/modules.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index a5e1dce..4d199bc 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,10 +1,11 @@ - + + diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..229f065 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/EMCGadgets.api.iml b/.idea/modules/EMCGadgets.api.iml index b29b065..9f6c964 100644 --- a/.idea/modules/EMCGadgets.api.iml +++ b/.idea/modules/EMCGadgets.api.iml @@ -7,21 +7,11 @@ FORGE MCP + 1 - - \ No newline at end of file diff --git a/.idea/modules/EMCGadgets.main.iml b/.idea/modules/EMCGadgets.main.iml index b29b065..9f6c964 100644 --- a/.idea/modules/EMCGadgets.main.iml +++ b/.idea/modules/EMCGadgets.main.iml @@ -7,21 +7,11 @@ FORGE MCP + 1 - - \ No newline at end of file diff --git a/.idea/modules/EMCGadgets.test.iml b/.idea/modules/EMCGadgets.test.iml index b29b065..9f6c964 100644 --- a/.idea/modules/EMCGadgets.test.iml +++ b/.idea/modules/EMCGadgets.test.iml @@ -7,21 +7,11 @@ FORGE MCP + 1 - - \ No newline at end of file diff --git a/src/main/java/net/teamfruit/emcgadgets/EMCInventoryManipulation.java b/src/main/java/net/teamfruit/emcgadgets/EMCInventoryManipulation.java index 2003e53..aa1c8dd 100644 --- a/src/main/java/net/teamfruit/emcgadgets/EMCInventoryManipulation.java +++ b/src/main/java/net/teamfruit/emcgadgets/EMCInventoryManipulation.java @@ -34,6 +34,7 @@ public static long countEmc(ItemStack itemStack, EntityPlayer player) { if (provider.hasKnowledge(itemStack)) { long itemEmc = EMCHelper.getEmcValue(itemStack); + if (itemEmc <= 0L) return 0L; long placeableCount = provider.getEmc() / itemEmc; if (placeableCount > 0) return placeableCount;