Skip to content

Commit

Permalink
Fix negative tick value (#3439)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lignium authored Jul 21, 2021
1 parent 9e4bcb7 commit 93b9e6c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 93b9e6c

Please sign in to comment.