From 93b9e6c4a68593a5ee756bab9f701711facbe605 Mon Sep 17 00:00:00 2001 From: Lignium <41531939+Lignium@users.noreply.github.com> Date: Wed, 21 Jul 2021 22:12:37 +0300 Subject: [PATCH] Fix negative tick value (#3439) --- .../common/mixin/core/world/entity/EntityMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixins/java/org/spongepowered/common/mixin/core/world/entity/EntityMixin.java b/src/mixins/java/org/spongepowered/common/mixin/core/world/entity/EntityMixin.java index 9ceb3181d04..2aa913d715d 100644 --- a/src/mixins/java/org/spongepowered/common/mixin/core/world/entity/EntityMixin.java +++ b/src/mixins/java/org/spongepowered/common/mixin/core/world/entity/EntityMixin.java @@ -1097,7 +1097,7 @@ public ItemEntity entityDropItem(final ItemStack stack, final float offsetY) { return; } final DataTransactionResult transaction = DataTransactionResult.builder() - .replace(new ImmutableSpongeValue<>(Keys.FIRE_TICKS, Ticks.of(this.remainingFireTicks))) + .replace(new ImmutableSpongeValue<>(Keys.FIRE_TICKS, Ticks.of(Math.max(this.remainingFireTicks, 0)))) .success(new ImmutableSpongeValue<>(Keys.FIRE_TICKS, Ticks.of(event.fireTicks()))) .result(DataTransactionResult.Type.SUCCESS) .build();