mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
2a2d9fb508
1) Removed "Regen" mode of Dupe UUID resolver, forced safe. Some servers who updated before we had safe mode added still had this value. There's really no reason to keep this mode, as we've seen that vanilla triggers this often and 99.9999999% of cases will be an actual duplicate that needs to be deleted. 2) Made Vanilla Debug messages about dupe UUIDs and dupe uuid resolve messages only show up if the debug.entities flag is on. This will stop server owners from panicing from seeing these logs, and stop opening bug reports on this, only for us to tell you "don't worry about it". 3) Avoid adding entities to world that are already added to world. This can be triggered by anything that causes an entity to be added to the world during the chunk load process, such as chunk conversions. Issue #1544 was a case of this. 4) Removed debug warning about ExpiringMap. Nothing more I know to do about this anyways. We recover from it, stop warning to reduce noise of issues to us.
73 lines
3.0 KiB
Diff
73 lines
3.0 KiB
Diff
From acfd71d693f42e32e09b2035fc1d78bdff690938 Mon Sep 17 00:00:00 2001
|
|
From: kashike <kashike@vq.lc>
|
|
Date: Wed, 15 Aug 2018 01:26:09 -0700
|
|
Subject: [PATCH] Allow disabling armour stand ticking
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index a2656abaf0..95fc2d8ed8 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -493,4 +493,10 @@ public class PaperWorldConfig {
|
|
break;
|
|
}
|
|
}
|
|
+
|
|
+ public boolean armorStandTick = true;
|
|
+ private void armorStandTick() {
|
|
+ this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick);
|
|
+ log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default");
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
index 7647311dfd..35afffedef 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
|
@@ -45,6 +45,7 @@ public class EntityArmorStand extends EntityLiving {
|
|
public Vector3f leftLegPose;
|
|
public Vector3f rightLegPose;
|
|
public boolean canMove = true; // Paper
|
|
+ public boolean canTick = true; // Paper - armour stand ticking
|
|
|
|
public EntityArmorStand(World world) {
|
|
super(EntityTypes.ARMOR_STAND, world);
|
|
@@ -57,6 +58,7 @@ public class EntityArmorStand extends EntityLiving {
|
|
this.leftLegPose = EntityArmorStand.bB;
|
|
this.rightLegPose = EntityArmorStand.bC;
|
|
this.noclip = this.isNoGravity();
|
|
+ if (world != null) this.canTick = world.paperConfig.armorStandTick; // Paper - armour stand ticking
|
|
this.setSize(0.5F, 1.975F);
|
|
this.Q = 0.0F;
|
|
}
|
|
@@ -556,6 +558,7 @@ public class EntityArmorStand extends EntityLiving {
|
|
}
|
|
|
|
public void tick() {
|
|
+ if (!this.canTick) return;// Paper
|
|
super.tick();
|
|
Vector3f vector3f = (Vector3f) this.datawatcher.get(EntityArmorStand.b);
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
index 9f5c3b92e3..07ce93f17c 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
|
|
@@ -297,5 +297,15 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
|
|
public boolean isSlotDisabled(org.bukkit.inventory.EquipmentSlot slot) {
|
|
return getHandle().isSlotDisabled(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot));
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean canTick() {
|
|
+ return this.getHandle().canTick;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public void setCanTick(final boolean tick) {
|
|
+ this.getHandle().canTick = tick;
|
|
+ }
|
|
// Paper end
|
|
}
|
|
--
|
|
2.19.0
|
|
|