Skip to content

Commit

Permalink
Fix negative tick value
Browse files Browse the repository at this point in the history
  • Loading branch information
Lignium committed Jul 21, 2021
1 parent 9e4bcb7 commit 4b37410
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 4b37410

Please sign in to comment.