From f217b15bbfd6211a68f6a9013acefe9234d5bc8a Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 14 Aug 2021 10:44:31 -0700 Subject: [PATCH] Fix possible divide by 0 error with cursor updates (#6398) --- .../Configurable-item-frame-map-cursor-update-interval.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/Configurable-item-frame-map-cursor-update-interval.patch index b94a678e3e..01997871eb 100644 --- a/patches/server/Configurable-item-frame-map-cursor-update-interval.patch +++ b/patches/server/Configurable-item-frame-map-cursor-update-interval.patch @@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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.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); MapItemSavedData worldmap = MapItem.getSavedData(integer, (Level) this.level);