Fix addMatterValue speculation being wrong with negative matter values
This commit is contained in:
parent
704225cd9f
commit
6b2909fc1c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user