mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-22 12:43:29 +01:00
Merge branch 'master' into pre/1.13
* master: Fix logic bug in negative XP bug fix - Closes #1169
This commit is contained in:
commit
f09645d934
9 changed files with 15 additions and 14 deletions
Spigot-Server-Patches
Always-process-chunk-removal-in-removeEntity.patchAvoid-Chunk-Lookups-for-Entity-TileEntity-Current-Ch.patchExperienceOrbMergeEvent.patchIgnore-Dead-Entities-in-entityList-iteration.patchOption-for-maximum-exp-value-when-merging-orbs.patchOption-to-prevent-armor-stands-from-doing-entity-loo.patchPrevent-Saving-Bad-entities-to-chunks.patchVanished-players-don-t-have-rights.patchWorld-EntityHuman-Lookup-Optimizations.patch
|
@ -8,7 +8,7 @@ which can keep them in the chunk when they shouldnt be if done
|
|||
during entity ticking.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index eb56940a18..7f999cbd5b 100644
|
||||
index 0f2dadfa39..f6531d4fea 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
|
|
@ -22,7 +22,7 @@ index d2e87693fa..1997cbdc65 100644
|
|||
this.a(entity, entity.af);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 0f56969270..29678af2de 100644
|
||||
index 3569e209c2..a8b317cee3 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
|
|
@ -8,7 +8,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
|
|||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index d40725b17a..0f56969270 100644
|
||||
index 4c42dad5f6..3569e209c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
@ -18,6 +18,6 @@ index d40725b17a..0f56969270 100644
|
|||
- if (!loopItem.dead && !(maxValue > 0 && loopItem.value >= maxValue)) {
|
||||
+ if (!loopItem.dead && !(maxValue > 0 && loopItem.value >= maxValue) && new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) entity.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) loopItem.getBukkitEntity()).callEvent()) {
|
||||
long newTotal = (long)xp.value + (long)loopItem.value;
|
||||
if (newTotal > (long)maxValue) {
|
||||
loopItem.value = xp.value - maxValue;
|
||||
if ((int) newTotal < 0) continue; // Overflow
|
||||
if (maxValue > 0 && newTotal > (long)maxValue) {
|
||||
--
|
|
@ -35,7 +35,7 @@ index 785c31089e..6b0ca4eb98 100644
|
|||
public float length;
|
||||
public float J;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 7f999cbd5b..397915a553 100644
|
||||
index f6531d4fea..e9da359e93 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
|
|
@ -20,7 +20,7 @@ index 23cb3feef0..1c642e6364 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ed21614e0b..0e7fa6a0f2 100644
|
||||
index ed21614e0b..5a7a2443c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
@ -42,8 +42,9 @@ index ed21614e0b..0e7fa6a0f2 100644
|
|||
+ // Paper start
|
||||
+ if (!loopItem.dead && !(maxValue > 0 && loopItem.value >= maxValue)) {
|
||||
+ long newTotal = (long)xp.value + (long)loopItem.value;
|
||||
+ if (newTotal > (long)maxValue) {
|
||||
+ loopItem.value = xp.value - maxValue;
|
||||
+ if ((int) newTotal < 0) continue; // Overflow
|
||||
+ if (maxValue > 0 && newTotal > (long)maxValue) {
|
||||
+ loopItem.value = (int) (newTotal - maxValue);
|
||||
+ xp.value = maxValue;
|
||||
+ } else {
|
||||
+ xp.value += loopItem.value;
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 5b14973810..77fda4051e 100644
|
||||
index 4a135d84db..e9b024ad65 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
@ -21,7 +21,7 @@ index 5b14973810..77fda4051e 100644
|
|||
private void maxEntityCollision() {
|
||||
maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) );
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 0de1847639..6f063dc935 100644
|
||||
index d5ec209feb..6ed5cbb096 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||
|
|
|
@ -57,7 +57,7 @@ index a97e024ec4..bd52bf6561 100644
|
|||
nbttagcompound.set("Entities", nbttaglist1);
|
||||
NBTTagList nbttaglist2 = new NBTTagList();
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 94a4bf3c7a..eb56940a18 100644
|
||||
index 3c9d9f1ab0..0f2dadfa39 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
|
|
@ -64,7 +64,7 @@ index 53c9f21887..71e4084320 100644
|
|||
return this.a.a();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 6f063dc935..94a4bf3c7a 100644
|
||||
index 6ed5cbb096..3c9d9f1ab0 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] World EntityHuman Lookup Optimizations
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 397915a553..29877418c9 100644
|
||||
index e9da359e93..a370934684 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
|
Loading…
Add table
Reference in a new issue