mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
Merge branch 'ver/1.14' of github.com:PaperMC/Paper into anti-xray
This commit is contained in:
commit
e993aa6f69
@ -1,4 +1,4 @@
|
||||
From 240ff9ec9465aa5cd5827052356565df8f7fc3a8 Mon Sep 17 00:00:00 2001
|
||||
From 6dda64d42044db4abc7f9934dd4ef25658307e63 Mon Sep 17 00:00:00 2001
|
||||
From: Anthony MacAllister <anthonymmacallister@gmail.com>
|
||||
Date: Thu, 26 Jul 2018 15:30:03 -0400
|
||||
Subject: [PATCH] EntityTransformedEvent
|
||||
@ -29,10 +29,10 @@ index 9311cc5bd6..07f7b90f58 100644
|
||||
// CraftBukkit end
|
||||
this.die();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 0f4e50c3fe..76cf1d8bfc 100644
|
||||
index 19eb72909a..5d93af5857 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -247,6 +247,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -248,6 +248,7 @@ public class EntityZombie extends EntityMonster {
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -40,7 +40,7 @@ index 0f4e50c3fe..76cf1d8bfc 100644
|
||||
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.DROWNED); // CraftBukkit - added spawn reason
|
||||
this.die();
|
||||
}
|
||||
@@ -418,6 +419,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -419,6 +420,7 @@ public class EntityZombie extends EntityMonster {
|
||||
if (CraftEventFactory.callEntityTransformEvent(this, entityzombievillager, EntityTransformEvent.TransformReason.INFECTION).isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 80e349f4e9b616dee129420da8566157c7955e1f Mon Sep 17 00:00:00 2001
|
||||
From 0426fd13dc4dcdc742494adaefc1d9358600dc41 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 10 Sep 2018 23:56:36 -0400
|
||||
Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
index 4199c154eb..31c4412012 100644
|
||||
index 4199c154..31c44120 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
@@ -12,11 +12,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
|
||||
@ -53,14 +53,14 @@ index 4199c154eb..31c4412012 100644
|
||||
return block == this.g && iworldreader.getType(blockposition.up()).isAir() && iworldreader.getType(blockposition.up(2)).isAir();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
index dd6a8fe3dd..8ba69380b7 100644
|
||||
index dd6a8fe3..ddbb71b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
@@ -99,6 +99,7 @@ public class RandomPositionGenerator {
|
||||
}
|
||||
|
||||
blockposition2 = new BlockPosition((double) l + entitycreature.locX, (double) i1 + entitycreature.locY, (double) j1 + entitycreature.locZ);
|
||||
+ if (!entitycreature.world.isLoaded(blockposition1)) continue; // Paper
|
||||
+ if (!entitycreature.world.isLoaded(blockposition2)) continue; // Paper
|
||||
if ((!flag1 || entitycreature.a(blockposition2)) && navigationabstract.a(blockposition2)) {
|
||||
if (!flag) {
|
||||
blockposition2 = a(blockposition2, entitycreature);
|
||||
@ -74,5 +74,5 @@ index dd6a8fe3dd..8ba69380b7 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.20.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a8474fcf734b5d80f37fd3f684dcfa6c293fceff Mon Sep 17 00:00:00 2001
|
||||
From ca7dafa82b1227e80fed8574ef53a475d9a1b238 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 7 Oct 2018 04:29:59 -0500
|
||||
Subject: [PATCH] Add more Zombie API
|
||||
@ -18,7 +18,7 @@ index 5e88367d3c..c73d2ff5da 100644
|
||||
byte b0 = (Byte) this.datawatcher.get(EntityInsentient.b);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 76cf1d8bfc..6e265467b0 100644
|
||||
index 5d93af5857..552bad0520 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -31,6 +31,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@ -37,7 +37,7 @@ index 76cf1d8bfc..6e265467b0 100644
|
||||
public boolean isDrownConverting() {
|
||||
return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING);
|
||||
}
|
||||
@@ -209,6 +211,13 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -210,6 +212,13 @@ public class EntityZombie extends EntityMonster {
|
||||
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ index 76cf1d8bfc..6e265467b0 100644
|
||||
protected void eb() {
|
||||
this.b(EntityTypes.DROWNED);
|
||||
this.world.a((EntityHuman) null, 1040, new BlockPosition(this), 0);
|
||||
@@ -253,10 +262,17 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -254,10 +263,17 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ index 76cf1d8bfc..6e265467b0 100644
|
||||
@Override
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
if (super.damageEntity(damagesource, f)) {
|
||||
@@ -374,6 +390,7 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -375,6 +391,7 @@ public class EntityZombie extends EntityMonster {
|
||||
nbttagcompound.setBoolean("CanBreakDoors", this.ee());
|
||||
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bF : -1);
|
||||
nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1);
|
||||
@ -78,7 +78,7 @@ index 76cf1d8bfc..6e265467b0 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -388,7 +405,11 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -389,7 +406,11 @@ public class EntityZombie extends EntityMonster {
|
||||
if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) {
|
||||
this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime"));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2cc99dff418c4fe9f531d9ebdfba29b78b30dcb8 Mon Sep 17 00:00:00 2001
|
||||
From 454f8b5f99337406d4fbea161d48624e6f4dcb5f Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 9 Jun 2019 03:53:22 +0100
|
||||
Subject: [PATCH] incremental chunk saving
|
||||
@ -126,7 +126,7 @@ index d85220b66c..c4ad039ffd 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 2e697675e2..ec3b6ec5cf 100644
|
||||
index 2e697675e2..ccc129525a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -755,8 +755,9 @@ public class WorldServer extends World {
|
||||
@ -148,6 +148,22 @@ index 2e697675e2..ec3b6ec5cf 100644
|
||||
|
||||
timings.worldSaveChunks.startTiming(); // Paper
|
||||
chunkproviderserver.save(flag);
|
||||
@@ -772,6 +774,7 @@ public class WorldServer extends World {
|
||||
} // Paper
|
||||
}
|
||||
|
||||
+ if (flag || server.serverAutoSave) { // Paper
|
||||
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||
// PAIL - rename
|
||||
WorldServer worldserver1 = this;
|
||||
@@ -781,6 +784,7 @@ public class WorldServer extends World {
|
||||
worlddata.c(this.server.getBossBattleCustomData().c());
|
||||
worldserver1.getDataManager().saveWorldData(worlddata, this.server.getPlayerList().r());
|
||||
// CraftBukkit end
|
||||
+ } // Paper
|
||||
}
|
||||
|
||||
protected void k_() throws ExceptionWorldConflict {
|
||||
--
|
||||
2.22.0
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 96e47b61a7b56b3593c1fd8058c970ee09efb490 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Wed, 26 Jun 2019 03:04:45 +0100
|
||||
Subject: [PATCH] Fix Raids CME
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Raid.java b/src/main/java/net/minecraft/server/Raid.java
|
||||
index 6c1bbefd71..72f76d6c02 100644
|
||||
--- a/src/main/java/net/minecraft/server/Raid.java
|
||||
+++ b/src/main/java/net/minecraft/server/Raid.java
|
||||
@@ -137,14 +137,14 @@ public class Raid {
|
||||
private void y() {
|
||||
Collection<EntityPlayer> collection = this.r.getPlayers();
|
||||
Set<EntityPlayer> set = Sets.newHashSet(collection);
|
||||
- Iterator iterator = collection.iterator();
|
||||
+ Iterator iterator = set.iterator(); // Paper - use the set, this doesn't get modified out of scope
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||
BlockPosition blockposition = new BlockPosition(entityplayer);
|
||||
|
||||
if (this.k.c_(blockposition) != this) {
|
||||
- set.remove(entityplayer);
|
||||
+ iterator.remove(); // Paper
|
||||
this.r.removePlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e8b39d430a77c2e53656b4c7bc2ed4b4a2b48a00
|
||||
Subproject commit c69979247bdae6884d4edf377d485cf88ddfa0f5
|
Loading…
Reference in New Issue
Block a user