From 6b2909fc1c670d2b791a51d4f635a7f68c3e66d8 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 16 Mar 2023 23:18:30 +0700 Subject: [PATCH] Fix addMatterValue speculation being wrong with negative matter values --- src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt index 4a6a52d04..06b29621e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/MatterDustItem.kt @@ -61,7 +61,7 @@ class MatterDustItem : Item(Properties().stacksTo(64)), IMatterItem { val matterThis = matter(stack) - if (matterThis >= ItemsConfig.MATTER_DUST_CAPACITY) + if (matterThis >= ItemsConfig.MATTER_DUST_CAPACITY && matter.isPositive) return Decimal.ZERO val newMatter = (matterThis + matter).coerceAtMost(ItemsConfig.MATTER_DUST_CAPACITY)