Skip to content

Commit

Permalink
EMCが無いアイテムを設置しようとした際のゼロ除算を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yuu1111 committed Jun 9, 2024
1 parent 3d42181 commit 9a89a87
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 37 deletions.
3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions .idea/modules/EMCGadgets.api.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions .idea/modules/EMCGadgets.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions .idea/modules/EMCGadgets.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9a89a87

Please sign in to comment.