mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Fix possible divide by 0 error with cursor updates (#6398)
This commit is contained in:
parent
746d5cb8fb
commit
f217b15bbf
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
ItemStack itemstack = entityitemframe.getItem();
|
ItemStack itemstack = entityitemframe.getItem();
|
||||||
|
|
||||||
- if (this.tickCount % 10 == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks
|
- if (this.tickCount % 10 == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks
|
||||||
+ if (this.level.paperConfig.mapItemFrameCursorUpdateInterval >= 0 && this.tickCount % this.level.paperConfig.mapItemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
|
+ if (this.level.paperConfig.mapItemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig.mapItemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
|
||||||
Integer integer = MapItem.getMapId(itemstack);
|
Integer integer = MapItem.getMapId(itemstack);
|
||||||
MapItemSavedData worldmap = MapItem.getSavedData(integer, (Level) this.level);
|
MapItemSavedData worldmap = MapItem.getSavedData(integer, (Level) this.level);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue