mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 00:10:32 +01:00
89d51d5f29
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
20 lines
1.5 KiB
Diff
20 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Warrior <50800980+Warriorrrr@users.noreply.github.com>
|
|
Date: Fri, 13 Aug 2021 01:14:38 +0200
|
|
Subject: [PATCH] Configurable item frame map cursor update interval
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
|
index c21cea7975844e0a04daeb1fcffc26d55fc62025..a83b4d9b61230ecf5f776269cab228cf49c5f546 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
|
@@ -117,7 +117,7 @@ public class ServerEntity {
|
|
if (true || this.tickCount % 10 == 0) { // CraftBukkit - Moved below, should always enter this block
|
|
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().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 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, this.level);
|
|
|