Merge pull request #3636 from Spottedleaf/ver/1.16

This commit is contained in:
Daniel Ennis 2020-06-27 01:42:12 -04:00 committed by GitHub
commit d82de9819f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
179 changed files with 429 additions and 427 deletions

View File

@ -636,7 +636,7 @@ index d5e1da2eeea7c06289f52509af844df59e8a29b2..63d3d43f74bed94cd03aa3b7254e6630
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f306530642c56020c390afbcdddf5cbf343a7b2b..f20a68bafc5abb76c60fba85c228bf15f05d309a 100644
index 87fe70ed5f333d84018020b42fe375ce247451b4..a85b7a93a974263e2c3d7546ddfe4707781ef165 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -801,6 +801,7 @@ public final class CraftServer implements Server {
@ -663,7 +663,7 @@ index f306530642c56020c390afbcdddf5cbf343a7b2b..f20a68bafc5abb76c60fba85c228bf15
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2074,4 +2077,35 @@ public final class CraftServer implements Server {
@@ -2075,4 +2078,35 @@ public final class CraftServer implements Server {
{
return spigot;
}

View File

@ -1489,7 +1489,7 @@ index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf43
PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet);
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index f51bae1a01b6ac158f808d85bc77cb03a8f19aa3..7464ef739bf673baab8661e561abbe9266b888c4 100644
index 500977885d4cfbfd9d86824074d3f1903e1fc6cb..c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1499,7 +1499,7 @@ index f51bae1a01b6ac158f808d85bc77cb03a8f19aa3..7464ef739bf673baab8661e561abbe92
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -940,10 +941,11 @@ public abstract class PlayerList {
@@ -941,10 +942,11 @@ public abstract class PlayerList {
}
public void savePlayers() {
@ -1758,10 +1758,10 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98f
// CraftBukkit start - moved from MinecraftServer.saveChunks
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f20a68bafc5abb76c60fba85c228bf15f05d309a..36e44309d5c8467c79da981ea957c17ebabe9595 100644
index a85b7a93a974263e2c3d7546ddfe4707781ef165..0094d9251251845fbacff6d458443385627ca0c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2047,12 +2047,31 @@ public final class CraftServer implements Server {
@@ -2048,12 +2048,31 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
{
@ -1963,10 +1963,10 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index af2462a8bbf617a0c949d9e3536581d7500e90ee..51782a02c0882acca208b71bbd75946f6396dcce 100644
index c5216d62660631f54d50575c30717f4052c10f8f..661c8b3c81be46ef2c9488bb52d1963c7f0e89e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1761,6 +1761,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1757,6 +1757,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
packet.components = components;
getHandle().playerConnection.sendPacket(packet);
}

View File

@ -140,10 +140,10 @@ index 1fcdbbbc7b60edd1e87bab5f1c5d19a6755de17c..0f2011a776619301dd6a133b9a4044b4
GameProfilerTick gameprofilertick = GameProfilerTick.a("Server");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0f49da25bb6a1aaad18cbd57d0d312769fe50c3e..9cf0d095db124976c7777ff78a6a1f1f46f4a363 100644
index 3e2328079f5f98f3f10cc1badd1059a3703eb2d7..0f5af8365abe99971a815285703a3b598f130a0d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2044,6 +2044,17 @@ public final class CraftServer implements Server {
@@ -2045,6 +2045,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}

View File

@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and
improve setPosition to use raw
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1e942e8ef 100644
index c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd..29a7866190fea78c025c2e59a48ed92239f6a446 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -143,14 +143,14 @@ public abstract class PlayerList {
@@ -143,7 +143,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event
Player bukkitPlayer = entityplayer.getBukkitEntity();
@ -21,9 +21,10 @@ index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1
Bukkit.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation();
worldserver = ((CraftWorld) loc.getWorld()).getHandle();
@@ -151,7 +151,7 @@ public abstract class PlayerList {
entityplayer.spawnIn(worldserver);
entityplayer.spawnIn(worldserver1);
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
- entityplayer.setPosition(loc.getX(), loc.getY(), loc.getZ());
+ entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world)
entityplayer.setYawPitch(loc.getYaw(), loc.getPitch());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 35f0527f6dbd06660a1ca4ce528ac1e8c056bb16..3768215d57f4025bdb83913e45b12119d53e1002 100644
index 5ff0456b781b6a6fbc674e2c532b73f3245f5fd5..3a0e0139db61405e8307abb3d17d1836f45bd8a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1698,6 +1698,7 @@ public final class CraftServer implements Server {
@@ -1699,6 +1699,7 @@ public final class CraftServer implements Server {
return helpMap;
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 228106442d8f6d425a0d15c816532223749e03be..73f140771bac6bfda57bbd402a1603cedf8c38b5 100644
index 30701934a3b7cc7d2a502fe7c3c251a9f268a9bc..72fb341e77b73ace8555cfc1bfdb3bbab726f1e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2163,5 +2163,23 @@ public final class CraftServer implements Server {
@@ -2164,5 +2164,23 @@ public final class CraftServer implements Server {
return null;
}
}

View File

@ -20,7 +20,7 @@ index 04430aae52205ee167662004e45c145b9d2e8bed..dd21221534542d0265fa7d2178ab69c2
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d396405fac 100644
index 364697e0155012c300219ad94a3995809e6c2f8f..d45d025fa74a5ff53f0828f51639e19613e30186 100644
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
@@ -106,6 +106,13 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
@ -29,7 +29,7 @@ index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d3
+ // Paper start
+ @Override
+ public boolean canLeash(EntityHuman entityhuman) {
+ public boolean a(EntityHuman entityhuman) {
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
+ }
+ // Paper end
@ -38,18 +38,15 @@ index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d3
protected void t(float f) {
if (f > 6.0F && this.fa()) {
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 9715f10c790c0210435622ab9997ac40f98da185..f2cd6824790d7e76f8f10e2630bcd5ebbf2a4238 100644
index 9715f10c790c0210435622ab9997ac40f98da185..2f85d9799d67d3fb1d340179d8dbd03771467329 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1283,6 +1283,11 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1282,7 +1282,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
public boolean a(EntityHuman entityhuman) {
+ // Paper start - allow overriding
+ return this.canLeash(entityhuman);
+ }
+ public boolean canLeash(EntityHuman entityhuman) {
+ // Paper end - allow overriding
- public boolean a(EntityHuman entityhuman) {
+ public boolean a(EntityHuman entityhuman) { // Paper - overriden in EntityHorseAbstract
return !this.isLeashed() && !(this instanceof IMonster);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 80fec11079b71569dbfcfd399df325a1e942e8ef..42e7394326237fcb466ac9727b5ac732518cf1b9 100644
index 29a7866190fea78c025c2e59a48ed92239f6a446..5945786f5093ac8f6cd7cde74f6cb746efffbb1e 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -173,6 +173,7 @@ public abstract class PlayerList {
@@ -174,6 +174,7 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b()));
playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry()));

View File

@ -57,7 +57,7 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19
packetdataserializer.a(this.c);
packetdataserializer.a(this.d);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a6326c8d9 100644
index 5945786f5093ac8f6cd7cde74f6cb746efffbb1e..9d3b8be7a854828d6e3009e0ad4726c7f134b5e3 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -75,6 +75,7 @@ public abstract class PlayerList {
@ -68,7 +68,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a
public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) {
this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this);
@@ -304,6 +305,13 @@ public abstract class PlayerList {
@@ -305,6 +306,13 @@ public abstract class PlayerList {
}
entityplayer.syncInventory();
@ -82,7 +82,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a
// CraftBukkit - Moved from above, added world
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), worldserver1.worldDataServer.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ());
}
@@ -421,6 +429,16 @@ public abstract class PlayerList {
@@ -422,6 +430,16 @@ public abstract class PlayerList {
entityplayer.playerTick(); // SPIGOT-924
// CraftBukkit end
@ -99,7 +99,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a
this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle();
@@ -1058,6 +1076,13 @@ public abstract class PlayerList {
@@ -1059,6 +1077,13 @@ public abstract class PlayerList {
}
// CraftBukkit end

View File

@ -7,10 +7,10 @@ This causes the nether to spam unload/reload chunks, plus overall
bad behavior.
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6 100644
index 9f139dd2dbf9706cb018ee26c1315dc29067d68e..9c3b79c1314dedae06278328b6ca722d5ff1e60d 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -95,7 +95,7 @@ public class BlockFire extends BlockFireAbstract {
@@ -99,7 +99,7 @@ public class BlockFire extends BlockFireAbstract {
BlockStateBoolean blockstateboolean = (BlockStateBoolean) BlockFire.p.get(enumdirection);
if (blockstateboolean != null) {
@ -19,7 +19,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3
}
}
@@ -175,6 +175,7 @@ public class BlockFire extends BlockFireAbstract {
@@ -179,6 +179,7 @@ public class BlockFire extends BlockFireAbstract {
}
blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, l, j1, i1);
@ -27,7 +27,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3
int l1 = this.a((IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition);
if (l1 > 0) {
@@ -220,10 +221,16 @@ public class BlockFire extends BlockFireAbstract {
@@ -224,10 +225,16 @@ public class BlockFire extends BlockFireAbstract {
}
private void trySpread(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition
@ -46,7 +46,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3
// CraftBukkit start
org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -269,7 +276,7 @@ public class BlockFire extends BlockFireAbstract {
@@ -273,7 +280,7 @@ public class BlockFire extends BlockFireAbstract {
for (int j = 0; j < i; ++j) {
EnumDirection enumdirection = aenumdirection[j];
@ -55,7 +55,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3
return true;
}
}
@@ -287,7 +294,12 @@ public class BlockFire extends BlockFireAbstract {
@@ -291,7 +298,12 @@ public class BlockFire extends BlockFireAbstract {
for (int k = 0; k < j; ++k) {
EnumDirection enumdirection = aenumdirection[k];
@ -69,7 +69,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3
i = Math.max(this.getFlameChance(iblockdata), i);
}
@@ -298,7 +310,7 @@ public class BlockFire extends BlockFireAbstract {
@@ -302,7 +314,7 @@ public class BlockFire extends BlockFireAbstract {
@Override
protected boolean e(IBlockData iblockdata) {

View File

@ -45,10 +45,10 @@ index 060887d765604e4be82913607bb6266a278f5db6..c5957c2d6c54b076ebe7f9a432e30551
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2bb31a684906044b159e959dd8acd85efc660b02..fc309214f335ed455c89523ea6a388ba87c7e088 100644
index 9fdceeeeece358b2456cd66bc585821b7252691e..a201460235816698ee03d5ba5e78cbe505436216 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1476,7 +1476,8 @@ public final class CraftServer implements Server {
@@ -1477,7 +1477,8 @@ public final class CraftServer implements Server {
// Spigot Start
GameProfile profile = null;
// Only fetch an online UUID in online mode

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fc309214f335ed455c89523ea6a388ba87c7e088..acfa657c62005b04eb9fb438f63240a923c2530f 100644
index a201460235816698ee03d5ba5e78cbe505436216..56855cbb8daff88c643d97f1e12b0386d1f8ff8c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2192,5 +2192,24 @@ public final class CraftServer implements Server {
@@ -2193,5 +2193,24 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
}

View File

@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 32be0e35918398f2fd5f62c2cb87c4597985b7b3..414e23fc24e90829b71def39b186f1913ce8300d 100644
index 9d3b8be7a854828d6e3009e0ad4726c7f134b5e3..0da963896038d7b04fe0d410ab5d09a07edae9ab 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -960,11 +960,13 @@ public abstract class PlayerList {
@@ -961,11 +961,13 @@ public abstract class PlayerList {
}
public void savePlayers() {

View File

@ -73,10 +73,10 @@ index 28ade7187d6fd61adbfe65a1944426168b131c4c..878a9de29c728a0b49fb8ee15be85516
// Spigot Start
private static double calcTps(double avg, double exp, double tps)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index f5831148b5f8e2921306074f710d4b90398e896e..4945adff2f014cb679a61b8fb44d7d48971f20bf 100644
index 0da963896038d7b04fe0d410ab5d09a07edae9ab..ec57eed04d43287249a6fe105556118c39ea0c48 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1071,10 +1071,15 @@ public abstract class PlayerList {
@@ -1072,10 +1072,15 @@ public abstract class PlayerList {
entityplayer.playerInteractManager.b(worldserver.getMinecraftServer().getSaveData().getGameType());
}
@ -93,7 +93,7 @@ index f5831148b5f8e2921306074f710d4b90398e896e..4945adff2f014cb679a61b8fb44d7d48
}
// CraftBukkit end
@@ -1086,6 +1091,7 @@ public abstract class PlayerList {
@@ -1087,6 +1092,7 @@ public abstract class PlayerList {
}
// Paper end
}

View File

@ -20,10 +20,10 @@ index c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index acfa657c62005b04eb9fb438f63240a923c2530f..07906b1f25f9547896bc790c22b52a343ff9c940 100644
index 56855cbb8daff88c643d97f1e12b0386d1f8ff8c..fe331321c126150ae7288dd29f12d87c31483d49 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2211,5 +2211,10 @@ public final class CraftServer implements Server {
@@ -2212,5 +2212,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}

View File

@ -245,7 +245,7 @@ index 878a9de29c728a0b49fb8ee15be85516176795bd..b06bb3dccda23ebed1532e17f9699b9b
public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 4945adff2f014cb679a61b8fb44d7d48971f20bf..da86c825de669a6b9cea773b23d277f56a2daee5 100644
index ec57eed04d43287249a6fe105556118c39ea0c48..49d57f83dc22603b24ab2369ca4ba3a5c9e8b092 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -79,8 +79,7 @@ public abstract class PlayerList {
@ -259,7 +259,7 @@ index 4945adff2f014cb679a61b8fb44d7d48971f20bf..da86c825de669a6b9cea773b23d277f5
this.k = new GameProfileBanList(PlayerList.b);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 07906b1f25f9547896bc790c22b52a343ff9c940..1c9b5c376c0750974f52d526414d094fcf3a3e11 100644
index fe331321c126150ae7288dd29f12d87c31483d49..db41896b45f1608fbeb962d3ffe25d9608b36cc4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -46,7 +46,7 @@ import java.util.function.Consumer;
@ -271,7 +271,7 @@ index 07906b1f25f9547896bc790c22b52a343ff9c940..1c9b5c376c0750974f52d526414d094f
import net.minecraft.server.Advancement;
import net.minecraft.server.ArgumentEntity;
import net.minecraft.server.BiomeManager;
@@ -1195,9 +1195,13 @@ public final class CraftServer implements Server {
@@ -1196,9 +1196,13 @@ public final class CraftServer implements Server {
return logger;
}

View File

@ -560,7 +560,7 @@ index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f72625466
private UserCacheEntry(GameProfile gameprofile, Date date) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 71f2a8cfc2e077ce7c576957fd1d36f6612a4ebf..4786a8eaca956435f2f76ee9d5fb9e66658c24a1 100644
index 60a44992a962e15686f89247823389d3757d8b8c..feea84de7d2184caf24d79faee8874f7698e826e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -225,6 +225,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -573,7 +573,7 @@ index 71f2a8cfc2e077ce7c576957fd1d36f6612a4ebf..4786a8eaca956435f2f76ee9d5fb9e66
public final class CraftServer implements Server {
private final String serverName = "Paper"; // Paper
private final String serverVersion;
@@ -2228,5 +2231,24 @@ public final class CraftServer implements Server {
@@ -2229,5 +2232,24 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 21f583302e9d8da8c9a9651ce40c64dc8abfa512..70339603aa3e256470be241bf033f3471e2090ea 100644
index 49d57f83dc22603b24ab2369ca4ba3a5c9e8b092..0f20704c889f28d8e7560b33d366eb8948565071 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -541,7 +541,7 @@ public abstract class PlayerList {
@@ -542,7 +542,7 @@ public abstract class PlayerList {
if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot
} else if (!this.isWhitelisted(gameprofile)) {
chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted");
@ -17,7 +17,7 @@ index 21f583302e9d8da8c9a9651ce40c64dc8abfa512..70339603aa3e256470be241bf033f347
} else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) {
IpBanEntry ipbanentry = this.l.get(socketaddress);
@@ -922,9 +922,25 @@ public abstract class PlayerList {
@@ -923,9 +923,25 @@ public abstract class PlayerList {
this.server.getCommandDispatcher().a(entityplayer);
}

View File

@ -72,10 +72,10 @@ index b2eac041c3ff7d8a7c4524dac381ab95045f28af..fa5c640239451579fba35ad7b0979739
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4786a8eaca956435f2f76ee9d5fb9e66658c24a1..3c22cf8fb454acaff282d8cd6c636f918de76e9e 100644
index feea84de7d2184caf24d79faee8874f7698e826e..17c92071fabd385e1955fec793eba0b0c5cdd2b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1784,7 +1784,7 @@ public final class CraftServer implements Server {
@@ -1785,7 +1785,7 @@ public final class CraftServer implements Server {
offers = tabCompleteChat(player, message);
}

View File

@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3c22cf8fb454acaff282d8cd6c636f918de76e9e..ce3d5e9fd1853ab9519da93ce297ca0bceb9acf8 100644
index 17c92071fabd385e1955fec793eba0b0c5cdd2b6..499e7d6fecc6223df057fa644f8c449fda910f0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1480,6 +1480,26 @@ public final class CraftServer implements Server {
@@ -1481,6 +1481,26 @@ public final class CraftServer implements Server {
return recipients.size();
}

View File

@ -6,68 +6,75 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent
This event is called when an entity receives knockback by another entity.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..d94874b02ddcb640c9d94c99d83e77b2e55dce73 100644
index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..08141147f9795546e9397abed95834ed5e69a126 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1085,7 +1085,9 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1085,7 +1085,7 @@ public abstract class EntityHuman extends EntityLiving {
if (flag5) {
if (i > 0) {
if (entity instanceof EntityLiving) {
+ ((EntityLiving) entity).knockingBackEntity = this; // Paper
((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).knockingBackEntity = null; // Paper
- ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).doKnockback((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); // Paper
} else {
entity.h((double) (-MathHelper.sin(this.yaw * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 0.017453292F) * (float) i * 0.5F));
}
@@ -1109,7 +1111,9 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1109,7 +1109,7 @@ public abstract class EntityHuman extends EntityLiving {
if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
if (entityliving.damageEntity(DamageSource.playerAttack(this).sweep(), f4)) {
+ ((EntityLiving) entity).knockingBackEntity = this; // Paper
entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).knockingBackEntity = null; // Paper
- entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ entityliving.doKnockback(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this);
}
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 3997dc6d979bf5a027861397b948aa4e8486fc58..57521337ea5ad4b944cf7303d2b3f9b34431116a 100644
index e434e23bf5b22a623ed7b915711bdb31b7e90b61..424157dcf536527e80faf5428f18f7e66d4216b6 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1479,7 +1479,9 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1474,7 +1474,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (flag) {
if (f1 > 0.0F && entity instanceof EntityLiving) {
+ ((EntityLiving) entity).knockingBackEntity = this; // Paper
((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).knockingBackEntity = null; // Paper
- ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)));
+ ((EntityLiving) entity).doKnockback(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this);
this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D));
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92dece2982e 100644
index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..a62f769ab509edd30717cfca785449acecdf295e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1239,7 +1239,9 @@ public abstract class EntityLiving extends Entity {
@@ -1239,7 +1239,7 @@ public abstract class EntityLiving extends Entity {
}
this.aw = (float) (MathHelper.d(d1, d0) * 57.2957763671875D - (double) this.yaw);
+ this.knockingBackEntity = entity1 instanceof EntityLiving ? ((EntityLiving) entity1) : null; // Paper
this.a(0.4F, d0, d1);
+ this.knockingBackEntity = null; // Paper
- this.a(0.4F, d0, d1);
+ this.doKnockback(0.4F, d0, d1, entity1); // Paper
} else {
this.aw = (float) ((int) (Math.random() * 2.0D) * 180);
}
@@ -1287,7 +1289,9 @@ public abstract class EntityLiving extends Entity {
@@ -1287,7 +1287,7 @@ public abstract class EntityLiving extends Entity {
}
protected void f(EntityLiving entityliving) {
+ ((EntityLiving) entityliving).knockingBackEntity = this; // Paper
entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ());
+ ((EntityLiving) entityliving).knockingBackEntity = null; // Paper
- entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ());
+ entityliving.doKnockback(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ(), this);
}
private boolean f(DamageSource damagesource) {
@@ -1531,8 +1535,19 @@ public abstract class EntityLiving extends Entity {
@@ -1524,6 +1524,11 @@ public abstract class EntityLiving extends Entity {
}
public void a(float f, double d0, double d1) {
+ // Paper start - add knockbacking entity parameter
+ this.doKnockback(f, d0, d1, null);
+ }
+ public void doKnockback(float f, double d0, double d1, Entity knockingBackEntity) {
+ // Paper end - add knockbacking entity parameter
f = (float) ((double) f * (1.0D - this.b(GenericAttributes.KNOCKBACK_RESISTANCE)));
if (f > 0.0F) {
this.impulse = true;
@@ -1531,6 +1536,16 @@ public abstract class EntityLiving extends Entity {
Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f);
this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
@ -83,7 +90,4 @@ index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92d
+ // Paper end
}
}
+ EntityLiving knockingBackEntity; // Paper
@Nullable
protected SoundEffect getSoundHurt(DamageSource damagesource) {

View File

@ -19,7 +19,7 @@ index 33ce9a500430a01650e69a3568c8b03db325a936..cea15d50ed89430ee8d8cff9de21e1fc
+ }
}
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a14f4fa278 100644
index 356defd19ebba5b051b7dbdcc21f0139bbdc4a84..69faefbdbf338b38311cd2a5d3183a104ec36f86 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -28,10 +28,10 @@ public class EnderDragonBattle {
@ -46,21 +46,3 @@ index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a1
this.world = worldserver;
if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) {
if (nbttagcompound.b("Dragon")) {
@@ -376,7 +380,7 @@ public class EnderDragonBattle {
private void a(BlockPosition blockposition) {
this.world.triggerEffect(3000, blockposition, 0);
- WorldGenerator.END_GATEWAY.b((WorldGenFeatureConfiguration) WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition);
+ WorldGenerator.END_GATEWAY.b(WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); // Paper - decompile error
}
private void a(boolean flag) {
@@ -388,7 +392,7 @@ public class EnderDragonBattle {
}
}
- worldgenendtrophy.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation);
+ worldgenendtrophy.b(WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); // Paper - decompile error
}
private EntityEnderDragon o() {

View File

@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index d94874b02ddcb640c9d94c99d83e77b2e55dce73..1249a7ae8fa8d6ea33cbc276717f1e4553f73b85 100644
index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481f02956dc 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -155,7 +155,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -101,10 +101,10 @@ index e78306cb187b5f08e32888ebd55c4c486fc8dad2..2cbb0e0e1046efeff7f417d0c976754b
this.player.o();
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 70339603aa3e256470be241bf033f3471e2090ea..ef1ea58c252d063ce282d244236a510655538a11 100644
index 0f20704c889f28d8e7560b33d366eb8948565071..e3611d01c0e20938f8b4ef01ade03a2e3434ed9f 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -419,7 +419,7 @@ public abstract class PlayerList {
@@ -420,7 +420,7 @@ public abstract class PlayerList {
entityplayer.a(StatisticList.LEAVE_GAME);
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
@ -155,7 +155,7 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3..0ba5b2a444660f280b673dbd0db9ded38fa6a839 100644
index b5d2ce40431247112baaded01e860c1832bf8fd8..bb6635be243a270752e1c47a9646a13ea6707baf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf21750928302 100644
index 9c3b79c1314dedae06278328b6ca722d5ff1e60d..a11a775a929c5f868f1b84c56d7e1715a91db236 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -16,7 +16,7 @@ index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf217
import java.util.Map;
import java.util.Random;
@@ -249,7 +250,7 @@ public class BlockFire extends BlockFireAbstract {
@@ -253,7 +254,7 @@ public class BlockFire extends BlockFireAbstract {
world.setTypeAndData(blockposition, this.a(world, blockposition, l), 3);
} else {
@ -25,7 +25,7 @@ index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf217
}
Block block = iblockdata.getBlock();
@@ -257,6 +258,13 @@ public class BlockFire extends BlockFireAbstract {
@@ -261,6 +262,13 @@ public class BlockFire extends BlockFireAbstract {
if (block instanceof BlockTNT) {
BlockTNT blocktnt = (BlockTNT) block;

View File

@ -122,10 +122,10 @@ index 5b01e4edb3c0f8bc785b70128cbe31b14356e4fb..9213bfb78e92b838189161045e394558
this.d.values().stream().map((jsonlistentry) -> {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ef1ea58c252d063ce282d244236a510655538a11..8c1d836538c678feca56076753e8781eadcd6d1d 100644
index e3611d01c0e20938f8b4ef01ade03a2e3434ed9f..2acea235633fb6b48c68711bc1cec5b61e7bf140 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -542,7 +542,7 @@ public abstract class PlayerList {
@@ -543,7 +543,7 @@ public abstract class PlayerList {
} else if (!this.isWhitelisted(gameprofile)) {
chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted");
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 1249a7ae8fa8d6ea33cbc276717f1e4553f73b85..af554396fdb25719c158a81ccab76e91f5df2ff5 100644
index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d87f2d3f2 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -2010,14 +2010,17 @@ public abstract class EntityHuman extends EntityLiving {
@@ -2006,14 +2006,17 @@ public abstract class EntityHuman extends EntityLiving {
this.datawatcher.set(EntityHuman.bs, nbttagcompound);
}

View File

@ -119,7 +119,7 @@ index c2a3bd8f25e91f79723074d93f6a646a8ce76d8c..4934e71225fe1242615660a379e797e2
public void saveData(NBTTagCompound nbttagcompound) {
super.saveData(nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db0956a52f31 100644
index 4b249a644c680a7cc64b0d31cf453f94ff2b6a0c..d6a98bb7fc107649c179cded2d37c06a41146a89 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -95,7 +95,7 @@ public abstract class EntityLiving extends Entity {
@ -139,7 +139,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09
@Override
public float getBukkitYaw() {
@@ -1250,13 +1251,17 @@ public abstract class EntityLiving extends Entity {
@@ -1248,13 +1249,17 @@ public abstract class EntityLiving extends Entity {
if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback
if (this.dk()) {
if (!this.f(damagesource)) {
@ -161,7 +161,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09
}
} else if (flag1) {
this.c(damagesource);
@@ -1396,6 +1401,7 @@ public abstract class EntityLiving extends Entity {
@@ -1392,6 +1397,7 @@ public abstract class EntityLiving extends Entity {
Entity entity = damagesource.getEntity();
EntityLiving entityliving = this.getKillingEntity();
@ -169,7 +169,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09
if (this.aV >= 0 && entityliving != null) {
entityliving.a(this, this.aV, damagesource);
}
@@ -1407,16 +1413,36 @@ public abstract class EntityLiving extends Entity {
@@ -1403,16 +1409,36 @@ public abstract class EntityLiving extends Entity {
if (this.isSleeping()) {
this.entityWakeup();
}
@ -208,7 +208,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09
}
}
@@ -1424,7 +1450,7 @@ public abstract class EntityLiving extends Entity {
@@ -1420,7 +1446,7 @@ public abstract class EntityLiving extends Entity {
if (!this.world.isClientSide) {
boolean flag = false;
@ -217,7 +217,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
BlockPosition blockposition = this.getChunkCoordinates();
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
@@ -1445,7 +1471,8 @@ public abstract class EntityLiving extends Entity {
@@ -1441,7 +1467,8 @@ public abstract class EntityLiving extends Entity {
}
}
@ -227,7 +227,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09
Entity entity = damagesource.getEntity();
int i;
@@ -1458,22 +1485,26 @@ public abstract class EntityLiving extends Entity {
@@ -1454,22 +1481,26 @@ public abstract class EntityLiving extends Entity {
boolean flag = this.lastDamageByPlayerTime > 0;
this.dropInventory(); // CraftBukkit - from below

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 1b824bd3757b7e6723254c9cb2badaafbd2de2de..7c9b437d950623a978ca3d45c8ca57b39a897179 100644
index c23e634dca6aab051b432a5fee2756afa80fb776..5a61167999f7d2fc271659762de9f4e861564542 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1511,6 +1511,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1504,6 +1504,7 @@ public abstract class EntityInsentient extends EntityLiving {
}

View File

@ -29,10 +29,10 @@ index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c
private static void savePlayerData() {
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 02395d71bc8b457240720cc76a481f9ea1613d79..ce60435cc83dbe0ce0e791de256b67f82052e97b 100644
index 02dc825a40bc8f289cd4b93ba2e88ee534784730..b97e8c2a42c608b1798c4a1964111c312a125097 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2254,6 +2254,11 @@ public final class CraftServer implements Server {
@@ -2255,6 +2255,11 @@ public final class CraftServer implements Server {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add more Zombie API
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 7c9b437d950623a978ca3d45c8ca57b39a897179..dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34 100644
index 5a61167999f7d2fc271659762de9f4e861564542..513c987a56e8d2bda0bda8771285c7c8d5ca88e1 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1423,6 +1423,8 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1418,6 +1418,8 @@ public abstract class EntityInsentient extends EntityLiving {
this.datawatcher.set(EntityInsentient.b, flag ? (byte) (b0 | 2) : (byte) (b0 & -3));
}

View File

@ -338,10 +338,10 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..545dbe6ddcce1d172f465b4a7ab85654
return false;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index a6f0b39717164d6b3ab15843b13ef52a24dde5d6..3a5641f9187fc21f367f7a3cd12cec8e4c80dd97 100644
index f436f30c1e07ac42e35a007cde5a92cc0568e7ff..1950ca8af7335317ec40cf2dfd026115cc29054e 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -166,6 +166,7 @@ public abstract class PlayerList {
@@ -167,6 +167,7 @@ public abstract class PlayerList {
boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO);
// Spigot - view distance
@ -349,7 +349,7 @@ index a6f0b39717164d6b3ab15843b13ef52a24dde5d6..3a5641f9187fc21f367f7a3cd12cec8e
playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld()));
entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName())));
@@ -175,6 +176,7 @@ public abstract class PlayerList {
@@ -176,6 +177,7 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b()));
playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry()));
playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23))); // Paper - fix this rule not being initialized on the client

View File

@ -11,10 +11,10 @@ everything to the Whitelist object.
https://github.com/PaperMC/Paper/issues/1880
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 3a5641f9187fc21f367f7a3cd12cec8e4c80dd97..5c6ea9df899a0649abde8c54e6f844eaf53d27dd 100644
index 1950ca8af7335317ec40cf2dfd026115cc29054e..0815a8e580465c0fe2700efad67370d1ff514fbf 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -931,9 +931,9 @@ public abstract class PlayerList {
@@ -932,9 +932,9 @@ public abstract class PlayerList {
}
public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
boolean isOp = this.operators.d(gameprofile);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 5c6ea9df899a0649abde8c54e6f844eaf53d27dd..d4048812723bed08e5bb2aadc651a92570d4bb2a 100644
index 0815a8e580465c0fe2700efad67370d1ff514fbf..4d9c84348770dea9307488317cf5c36913367ca1 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1049,6 +1049,7 @@ public abstract class PlayerList {
@@ -1050,6 +1050,7 @@ public abstract class PlayerList {
}
public void setHasWhitelist(boolean flag) {

View File

@ -59,10 +59,10 @@ index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index d4048812723bed08e5bb2aadc651a92570d4bb2a..5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1 100644
index 4d9c84348770dea9307488317cf5c36913367ca1..4ae901a3516840574a1c31e1002e8c6b248a7d54 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -263,7 +263,7 @@ public abstract class PlayerList {
@@ -264,7 +264,7 @@ public abstract class PlayerList {
// CraftBukkit start
WorldServer finalWorldServer = worldserver1;
Entity entity = EntityTypes.a(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b24b91718 100644
index 4ae901a3516840574a1c31e1002e8c6b248a7d54..ce1768e1c47179dfc119d7fa315c30510715f1d6 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -665,9 +665,14 @@ public abstract class PlayerList {
@@ -666,9 +666,14 @@ public abstract class PlayerList {
// this.a(entityplayer1, entityplayer, worldserver1); // CraftBukkit - removed
boolean flag2 = false;
@ -24,7 +24,7 @@ index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b
WorldServer worldserver1 = this.server.getWorldServer(entityplayer.getSpawnDimension());
if (worldserver1 != null) {
Optional optional;
@@ -708,6 +713,7 @@ public abstract class PlayerList {
@@ -709,6 +714,7 @@ public abstract class PlayerList {
location = respawnEvent.getRespawnLocation();
if (!flag) entityplayer.reset(); // SPIGOT-4785
@ -32,7 +32,7 @@ index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b
} else {
location.setWorld(worldserver.getWorld());
}
@@ -765,6 +771,13 @@ public abstract class PlayerList {
@@ -766,6 +772,13 @@ public abstract class PlayerList {
if (entityplayer.playerConnection.isDisconnected()) {
this.savePlayerFile(entityplayer);
}

View File

@ -29,10 +29,10 @@ index cc493d5d8b621bb69aedc5d2c5121d9199074575..19680baafcc8a5a18ec3f58da6943721
public boolean isDebugging() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ce60435cc83dbe0ce0e791de256b67f82052e97b..d3a3b47fe86579abc1c5d17284717c79a43cf058 100644
index b97e8c2a42c608b1798c4a1964111c312a125097..1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1780,7 +1780,7 @@ public final class CraftServer implements Server {
@@ -1781,7 +1781,7 @@ public final class CraftServer implements Server {
@Override
public boolean isPrimaryThread() {

View File

@ -847,10 +847,10 @@ index 0000000000000000000000000000000000000000..e61421d87a19bf2f6ce8836b48c445ff
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
new file mode 100644
index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f423025ededbe8
index 0000000000000000000000000000000000000000..298ea423084dbcc1b61f991bcd82b8ae51bf0977
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
@@ -0,0 +1,56 @@
@@ -0,0 +1,51 @@
+package com.destroystokyo.paper.antixray;
+
+public final class DataBitsReader {
@ -891,28 +891,23 @@ index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f42302
+ }
+
+ public int read() {
+ int value = (int) (current >>> bitInLongIndex) & mask;
+ bitInLongIndex += bitsPerObject;
+
+ if (bitInLongIndex > 63) {
+ bitInLongIndex -= 64;
+ if (bitInLongIndex + bitsPerObject > 64) {
+ bitInLongIndex = 0;
+ longInDataBitsIndex += 8;
+ init();
+
+ if (bitInLongIndex > 0) {
+ value |= current << bitsPerObject - bitInLongIndex & mask;
+ }
+ }
+
+ int value = (int) (current >>> bitInLongIndex) & mask;
+ bitInLongIndex += bitsPerObject;
+ return value;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
new file mode 100644
index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e32c672a31
index 0000000000000000000000000000000000000000..333763936897befda5bb6c077944d2667f922799
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
@@ -0,0 +1,84 @@
@@ -0,0 +1,79 @@
+package com.destroystokyo.paper.antixray;
+
+public final class DataBitsWriter {
@ -969,29 +964,24 @@ index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e3
+ }
+
+ public void write(int value) {
+ if (bitInLongIndex + bitsPerObject > 64) {
+ finish();
+ bitInLongIndex = 0;
+ longInDataBitsIndex += 8;
+ init();
+ }
+
+ current = current & ~(mask << bitInLongIndex) | (value & mask) << bitInLongIndex;
+ dirty = true;
+ bitInLongIndex += bitsPerObject;
+
+ if (bitInLongIndex > 63) {
+ finish();
+ bitInLongIndex -= 64;
+ longInDataBitsIndex += 8;
+ init();
+
+ if (bitInLongIndex > 0) {
+ current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex;
+ dirty = true;
+ }
+ }
+ }
+
+ public void skip() {
+ bitInLongIndex += bitsPerObject;
+
+ if (bitInLongIndex > 63) {
+ if (bitInLongIndex > 64) {
+ finish();
+ bitInLongIndex -= 64;
+ bitInLongIndex = bitsPerObject;
+ longInDataBitsIndex += 8;
+ init();
+ }

View File

@ -3046,7 +3046,7 @@ index 3e1c1253ad5e2fa68fd8a0bac100c2e7536ea080..b6868b6b23a09e8e0dfe7a5e378dca22
completablefuture = (CompletableFuture) this.statusFutures.get(i);
if (completablefuture != null) {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f54989422e5281c 100644
index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..a10006efc52f093196e7d67a3281a87d4c5df19b 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -64,7 +64,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -3224,7 +3224,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
this.lightEngine.a(ichunkaccess.getPos());
this.lightEngine.queueUpdate();
this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null);
@@ -573,19 +641,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -573,19 +641,21 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> f(ChunkCoordIntPair chunkcoordintpair) {
@ -3241,6 +3241,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
+ if (ioThrowable != null) {
+ com.destroystokyo.paper.util.SneakyThrow.sneaky(ioThrowable);
+ }
+ chunkHolder.tasks.forEach(Runnable::run);
+ // Paper end
- if (nbttagcompound != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings
@ -3254,7 +3255,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
protochunk.setLastSaved(this.world.getTime());
this.a(chunkcoordintpair, protochunk.getChunkStatus().getType());
@@ -609,7 +678,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -609,7 +679,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.g(chunkcoordintpair);
return Either.left(new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.world)); // Paper - Anti-Xray - Add parameter
@ -3288,7 +3289,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
}
private void g(ChunkCoordIntPair chunkcoordintpair) {
@@ -836,6 +930,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -836,6 +931,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public boolean saveChunk(IChunkAccess ichunkaccess) {
@ -3296,7 +3297,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
this.m.a(ichunkaccess.getPos());
if (!ichunkaccess.isNeedsSaving()) {
return false;
@@ -848,6 +943,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -848,6 +944,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
ChunkStatus chunkstatus = ichunkaccess.getChunkStatus();
if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) {
@ -3304,7 +3305,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
if (this.h(chunkcoordintpair)) {
return false;
}
@@ -855,12 +951,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -855,12 +952,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (chunkstatus == ChunkStatus.EMPTY && ichunkaccess.h().values().stream().noneMatch(StructureStart::e)) {
return false;
}
@ -3327,7 +3328,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
this.a(chunkcoordintpair, chunkstatus.getType());
return true;
} catch (Exception exception) {
@@ -869,6 +973,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -869,6 +974,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return false;
}
}
@ -3335,7 +3336,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
}
private boolean h(ChunkCoordIntPair chunkcoordintpair) {
@@ -998,6 +1103,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -998,6 +1104,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
}
@ -3371,7 +3372,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
@Nullable
public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public
NBTTagCompound nbttagcompound = this.read(chunkcoordintpair);
@@ -1019,33 +1153,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1019,33 +1154,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Paper start - chunk status cache "api"
public ChunkStatus getChunkStatusOnDiskIfCached(ChunkCoordIntPair chunkPos) {
@ -3438,7 +3439,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
}
public IChunkAccess getUnloadingChunk(int chunkX, int chunkZ) {
@@ -1054,6 +1210,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1054,6 +1211,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
// Paper end
@ -3478,7 +3479,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
// Spigot start
return isOutsideOfRange(chunkcoordintpair, false);
@@ -1399,6 +1588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1399,6 +1589,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}

View File

@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it
was expired at that point, then it would be null.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 5b3d2bd35ca3f98b8c04ea841023d68b24b91718..18e6b4dad0e78c53e3e39544c343863f79c75274 100644
index ce1768e1c47179dfc119d7fa315c30510715f1d6..47ec41f114aa09a50f8876d11da7db981e2be2f2 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -532,8 +532,10 @@ public abstract class PlayerList {
@@ -533,8 +533,10 @@ public abstract class PlayerList {
Player player = entity.getBukkitEntity();
PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress());

View File

@ -617,7 +617,7 @@ index b9fe08301409bc1f0d61a7566c26e720ff720d80..18a806ebbf092b904983691529ce5edf
return this.bf;
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index cdb72b225226083ca45ade798f54989422e5281c..f7e57fd1ce5881c056c104d5a6a9a74e34e3ffc3 100644
index a10006efc52f093196e7d67a3281a87d4c5df19b..ab5413a39147180af2eb33512fc992a5dcbb69bf 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -80,7 +80,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -656,7 +656,7 @@ index cdb72b225226083ca45ade798f54989422e5281c..f7e57fd1ce5881c056c104d5a6a9a74e
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f237b5b2bf 100644
index 8130e14b5d6c3e8b0a1234668d5c855e82f3a5dc..c5845013a79036704d084cfb903589cb9e8767cd 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -29,6 +29,11 @@ public final class SpawnerCreature {
@ -683,7 +683,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2
});
}
}
@@ -120,13 +130,33 @@ public final class SpawnerCreature {
@@ -125,13 +135,33 @@ public final class SpawnerCreature {
continue;
}
@ -718,7 +718,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2
}
}
@@ -135,22 +165,34 @@ public final class SpawnerCreature {
@@ -140,22 +170,34 @@ public final class SpawnerCreature {
}
public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a) {
@ -755,7 +755,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2
int k = 0;
while (k < 3) {
@@ -190,13 +232,13 @@ public final class SpawnerCreature {
@@ -195,13 +237,13 @@ public final class SpawnerCreature {
// Paper start
Boolean doSpawning = a(worldserver, enumcreaturetype, structuremanager, chunkgenerator, biomebase_biomemeta, blockposition_mutableblockposition, d2);
if (doSpawning == null) {
@ -771,7 +771,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2
}
entityinsentient.setPositionRotation(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F);
@@ -204,13 +246,18 @@ public final class SpawnerCreature {
@@ -209,13 +251,18 @@ public final class SpawnerCreature {
groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
// CraftBukkit start
if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) {
@ -793,7 +793,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2
}
if (entityinsentient.c(k1)) {
@@ -232,6 +279,7 @@ public final class SpawnerCreature {
@@ -237,6 +284,7 @@ public final class SpawnerCreature {
}
}
@ -801,20 +801,18 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2
}
private static boolean a(WorldServer worldserver, IChunkAccess ichunkaccess, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, double d0) {
@@ -471,10 +519,10 @@ public final class SpawnerCreature {
@@ -476,8 +524,8 @@ public final class SpawnerCreature {
public static class d {
- private final int a;
- private final Object2IntOpenHashMap<EnumCreatureType> b;
+ private final int a; final int getSpawnerChunks() { return this.a; } // Paper - OBFHELPER
private final Object2IntOpenHashMap<EnumCreatureType> b;
+ private final Object2IntOpenHashMap<EnumCreatureType> b; final Object2IntMap<EnumCreatureType> getEntityCountsByType() { return this.b; } // Paper - OBFHELPER
private final SpawnerCreatureProbabilities c;
- private final Object2IntMap<EnumCreatureType> d;
+ private final Object2IntMap<EnumCreatureType> d; final Object2IntMap<EnumCreatureType> getEntityCountsByType() { return this.d; } // Paper - OBFHELPER
private final Object2IntMap<EnumCreatureType> d;
@Nullable
private BlockPosition e;
@Nullable
@@ -535,7 +583,7 @@ public final class SpawnerCreature {
@@ -540,7 +588,7 @@ public final class SpawnerCreature {
// CraftBukkit start
private boolean a(EnumCreatureType enumcreaturetype, int limit) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f74e9ffda092ef4a2e30c316e682af154921b5df..961a383174cd40da079869a2a1f0252c27fff6b4 100644
index eeca12bd7c6e59b872303fda1378a69d03dcf783..d354e9b504b6872f20a9e433522827589bd4778a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3068,10 +3068,13 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,12 +5,12 @@ Subject: [PATCH] Generator Settings
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index cf9d980e61be199a34cff98f805e511f9410dd51..547ec8d90425feb6089091a930a49a43bed01e1a 100644
index 3d9a48e56194225cf39e31d13d26ec17afedadaf..a9d7e81ef123a7da7785a4b8dc868a0e256a61d0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -567,4 +567,9 @@ public class PaperWorldConfig {
}
}
@@ -572,4 +572,9 @@ public class PaperWorldConfig {
private void perPlayerMobSpawns() {
perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false);
}
+
+ public boolean generateFlatBedrock;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d3a3b47fe86579abc1c5d17284717c79a43cf058..c8e79fc2593ba8a7465b06e7e91d1b645da0f84c 100644
index 1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e..ba3a3c487f0cefa1c0d7394998800a4c4d6486cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2277,5 +2277,10 @@ public final class CraftServer implements Server {
@@ -2278,5 +2278,10 @@ public final class CraftServer implements Server {
}
return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657)
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 3a3ffe5a544d9f73b0ac512f67629b1169110395..55675fafaaadd3739e51bccce1c66ffab2d2d5c2 100644
index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c75bb1fe7 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1012,6 +1012,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1018,6 +1018,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.lastHealthSent = -1.0F;
this.lastFoodSent = -1;
@ -18,10 +18,10 @@ index 3a3ffe5a544d9f73b0ac512f67629b1169110395..55675fafaaadd3739e51bccce1c66ffa
PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld());
this.world.getServer().getPluginManager().callEvent(changeEvent);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 18e6b4dad0e78c53e3e39544c343863f79c75274..2f96bf6af8ad4e13bfd9b8b6e00867eb89123a78 100644
index 47ec41f114aa09a50f8876d11da7db981e2be2f2..9e635fa562264ee9454adb6dd7fc47f45d8b3242 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -760,6 +760,8 @@ public abstract class PlayerList {
@@ -761,6 +761,8 @@ public abstract class PlayerList {
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect));
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable pillager patrols
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 547ec8d90425feb6089091a930a49a43bed01e1a..886c56fbe90559464439cec6198776cd5b037c74 100644
index a9d7e81ef123a7da7785a4b8dc868a0e256a61d0..f8a617a62e62d088077712bfb66656c28b82a3c5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -572,4 +572,9 @@ public class PaperWorldConfig {
@@ -577,4 +577,9 @@ public class PaperWorldConfig {
private void generatorSettings() {
generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false);
}

View File

@ -7,7 +7,7 @@ Fixes an AssertionError when setting the player's item in hand to null or a new
Fixes GH-2718
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 961a383174cd40da079869a2a1f0252c27fff6b4..dd7df1795eb0186e256c26684b7d9116de9bc9bf 100644
index d354e9b504b6872f20a9e433522827589bd4778a..12b27c44d77b72fa4a4d42cfe3db8394a47d9c9b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2040,6 +2040,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] MC-145656 Fix Follow Range Initial Target
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 886c56fbe90559464439cec6198776cd5b037c74..1a05e5169da4f21a88405cd8a36dec9fc868e059 100644
index f8a617a62e62d088077712bfb66656c28b82a3c5..5c5a79d0ea00c9c4c2e93d524291f48f92e77857 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -577,4 +577,9 @@ public class PaperWorldConfig {
@@ -582,4 +582,9 @@ public class PaperWorldConfig {
private void pillagerSettings() {
disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols);
}

View File

@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers
* Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins)
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 1a05e5169da4f21a88405cd8a36dec9fc868e059..3a63ed18c38030b7c0f1e681b9066283879592a1 100644
index 5c5a79d0ea00c9c4c2e93d524291f48f92e77857..4bfe2fb948ee204f8c5a8c316141904a8a6a8b16 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -582,4 +582,13 @@ public class PaperWorldConfig {
@@ -587,4 +587,13 @@ public class PaperWorldConfig {
private void entitiesTargetWithFollowRange() {
entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 55675fafaaadd3739e51bccce1c66ffab2d2d5c2..ce3ed590f96312e18d631afee40f3821dad986ae 100644
index b33041765051f519807081607d2a8f1c75bb1fe7..dd78cfd8e9031558a6986c1929da330458d28597 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -685,7 +685,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -691,7 +691,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.eW();
}
// SPIGOT-5478 must be called manually now

View File

@ -7,7 +7,7 @@ When the server is lagging, players will wait longer when eating.
Change to also use a time check instead if it passes.
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index dd7df1795eb0186e256c26684b7d9116de9bc9bf..415cec5f0435967dccd8df258d116b490a84276f 100644
index 12b27c44d77b72fa4a4d42cfe3db8394a47d9c9b..b213a13c18ad483472808f4fe9743f74821a25cd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -119,7 +119,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -68,7 +68,7 @@ index c94197a50269622e8995685119bac984c45e6833..11d384729326af693a9a679195acbd59
protected EntityCreature(EntityTypes<? extends EntityCreature> entitytypes, World world) {
super(entitytypes, world);
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c40846ba7c2f9 100644
index 513c987a56e8d2bda0bda8771285c7c8d5ca88e1..f638b21a3b457323600baeecab4a04ca76d0e813 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -47,7 +47,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -99,7 +99,7 @@ index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c4084
if (this.isPassenger() && this.getVehicle() instanceof EntityInsentient) {
EntityInsentient entityinsentient = (EntityInsentient) this.getVehicle();
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 415cec5f0435967dccd8df258d116b490a84276f..b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122 100644
index b213a13c18ad483472808f4fe9743f74821a25cd..66bca610fbb8afc6f5b4430318c66d29af55fc19 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -97,7 +97,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
Also ignores Enderdragon, defaulting it to Mojang's setting
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index cdb72b225226083ca45ade798f54989422e5281c..0e9de6f12b56db5eb8759798a686ba6c68172323 100644
index ab5413a39147180af2eb33512fc992a5dcbb69bf..b530316b582390c4c464bb1f3df48597c8bf7569 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1716,6 +1716,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1736,6 +1736,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
int j = entity.getEntityType().getChunkRange() * 16;

View File

@ -7,7 +7,7 @@ bypass the need to get a player chunk, then get the either,
then unwrap it...
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 707db4febac59a4d09d6420ea2add469cf54c2ec..a5325aef96117d569e95ff4a15650d6a1ab8ac49 100644
index 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b1977150d73f 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -447,6 +447,12 @@ public class ChunkProviderServer extends IChunkProvider {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Entity Jump API
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122..58e14a10f5424fefd7c2e1ce644e1712e49eea62 100644
index 66bca610fbb8afc6f5b4430318c66d29af55fc19..e0a4866048276c44079e0b9034c1acea1f0498fa 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2754,8 +2754,10 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 3a63ed18c38030b7c0f1e681b9066283879592a1..c1f7d7f0db97e1667917a00febabb043cd66dfc8 100644
index 4bfe2fb948ee204f8c5a8c316141904a8a6a8b16..3496f615aa9857aa704767f460b1b166295ccf39 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -591,4 +591,9 @@ public class PaperWorldConfig {
@@ -596,4 +596,9 @@ public class PaperWorldConfig {
disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents);
log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled"));
}

View File

@ -398,7 +398,7 @@ index d4d5bc19e167a5271f8eb8d010f8a52b23b942df..859e31c63f94bdc7729c6d475990750b
});
private final int[] b = new int[256];
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 620ee43ada7543e21f6c10afec424cff6017f2cd..3681bc9657b2ecbd27bb45153b4e608d077f36dc 100644
index 4207b2c2a1bed03e00d792015c15f32b2eca7085..aecc0fee6924922f1599a99a643c1d2437e22fc6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -106,7 +106,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index c1f7d7f0db97e1667917a00febabb043cd66dfc8..143fe59272dda1ecaf9c3b4493e13e8ef0762ee1 100644
index 3496f615aa9857aa704767f460b1b166295ccf39..101a473ff8979b37098fde7ac6ac66c6ed1b0282 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -385,6 +385,11 @@ public class PaperWorldConfig {

View File

@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where:
* On normal difficulty they will have a 50% of getting infected or dying.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 143fe59272dda1ecaf9c3b4493e13e8ef0762ee1..01bb16e35a7b737c0a8be5e37c22aa756388b268 100644
index 101a473ff8979b37098fde7ac6ac66c6ed1b0282..9e8485679bd36481c2bd2f0c7cfa49892f0e4baf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -601,4 +601,9 @@ public class PaperWorldConfig {
@@ -606,4 +606,9 @@ public class PaperWorldConfig {
private void nerfNetherPortalPigmen() {
nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen);
}

View File

@ -890,7 +890,7 @@ index 9fb776318c10f393eb6d94e5112c454a7cd246b9..adfeeefbbc307a77738c2cc8d82856cd
return this.b(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index a5325aef96117d569e95ff4a15650d6a1ab8ac49..db4ac5658844bcdb5a6a68ed74f862d055a5567d 100644
index 67d6facd37462beef49dac311019b1977150d73f..ba9f75bd8f6fe1990d485548f4481bd1762d93af 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -202,6 +202,13 @@ public class ChunkProviderServer extends IChunkProvider {

View File

@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
world and the world age for the start day.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 01bb16e35a7b737c0a8be5e37c22aa756388b268..69b3faf28d019fca90734c4d0944ead8fd97ab87 100644
index 9e8485679bd36481c2bd2f0c7cfa49892f0e4baf..2688b3018eaab4e7ba95754164f83065a98e53fc 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -579,10 +579,21 @@ public class PaperWorldConfig {
@@ -584,10 +584,21 @@ public class PaperWorldConfig {
}
public boolean disablePillagerPatrols = false;
@ -36,7 +36,7 @@ index 01bb16e35a7b737c0a8be5e37c22aa756388b268..69b3faf28d019fca90734c4d0944ead8
private void entitiesTargetWithFollowRange() {
entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange);
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index ce3ed590f96312e18d631afee40f3821dad986ae..f39a10a1fee5baf92d661b63c4487140eff244d2 100644
index dd78cfd8e9031558a6986c1929da330458d28597..59f5ef6e14b738a408dc8462ba99605ec1ae82e9 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -81,6 +81,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 0e9de6f12b56db5eb8759798a686ba6c68172323..00de0d10842006f4fe9f64e136d03fd06fef6d1b 100644
index b530316b582390c4c464bb1f3df48597c8bf7569..6ac39fc6cafdcbf7883e868ecb58a2ebfad41601 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1423,6 +1423,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1443,6 +1443,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
protected void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot

View File

@ -40,10 +40,10 @@ index b27260270de80de371a5a71fa0516aa43c44c83e..1cc40b1f0af9e617b2a71bcc442543e1
Stream<VoxelShape> c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate<Entity> predicate);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 2f96bf6af8ad4e13bfd9b8b6e00867eb89123a78..870b5352528384b0bb612cd5379683ee142fb99f 100644
index 9e635fa562264ee9454adb6dd7fc47f45d8b3242..4189c315176415b121c6e8f8d3c9682caded2189 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -723,6 +723,7 @@ public abstract class PlayerList {
@@ -724,6 +724,7 @@ public abstract class PlayerList {
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
// CraftBukkit end

View File

@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index f39a10a1fee5baf92d661b63c4487140eff244d2..418f8351f603acf1ceffa38d6010fc692b8f66e7 100644
index 59f5ef6e14b738a408dc8462ba99605ec1ae82e9..52b5c47452a46cd6e61e1dd7c135620e36472c73 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -466,7 +466,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -472,7 +472,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void playerTick() {
try {

View File

@ -7,7 +7,7 @@ This fixes a lot of game state issues where packets were delayed for processing
due to 1.15's new queue but processed while dead.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 5ef91da9733fd9276e7bd819a11a0548e01b17f0..2db0cfd6c32c58beadc71d4be487776500c1b8a6 100644
index 7916421fe1dd8eadfd1c9bd15c4bbbb7331faca6..22acfe1350eb122b7eaa7209f519e4f4f1469b6c 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -952,7 +952,7 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f6ff4d8132a95895680f5bc81f8f873e
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index db4ac5658844bcdb5a6a68ed74f862d055a5567d..76084e6dd282da8332bdafbf9a96bcc64827e705 100644
index ba9f75bd8f6fe1990d485548f4481bd1762d93af..e14e8bcf235339c1537a1e0a7702a364ee784c93 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -741,7 +741,7 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider {
entityPlayer.playerNaturallySpawnedEvent.callEvent();
};
// Paper end
@ -83,7 +83,7 @@ index 9615c4d324e42f7f91a7e60b6151c16d20e9c739..a68e4fc411ae84f12b1ca7443fa66f63
List<PlayerChunk> allChunks = new ArrayList<>(visibleChunks.values());
List<EntityPlayer> players = world.players;
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9fa3f92b21 100644
index 6ac39fc6cafdcbf7883e868ecb58a2ebfad41601..bb4d54ebee573964cf3026888da108584b12972f 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -56,8 +56,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -122,7 +122,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f
private final Long2ObjectLinkedOpenHashMap<PlayerChunk> pendingUnload;
final LongSet loadedChunks; // Paper - private -> package
public final WorldServer world;
@@ -129,7 +154,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -130,7 +155,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag);
@ -131,7 +131,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f
this.pendingUnload = new Long2ObjectLinkedOpenHashMap();
this.loadedChunks = new LongOpenHashSet();
this.unloadQueue = new LongOpenHashSet();
@@ -203,9 +228,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -222,9 +247,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return (PlayerChunk) this.updatingChunks.get(i);
}
@ -185,7 +185,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f
}
protected IntSupplier c(long i) {
@@ -393,8 +461,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -412,8 +480,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Paper end
protected void save(boolean flag) {
@ -196,7 +196,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f
MutableBoolean mutableboolean = new MutableBoolean();
do {
@@ -422,7 +491,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -441,7 +510,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// this.i(); // Paper - nuke IOWorker
PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName());
} else {
@ -205,7 +205,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f
IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkSave().getNow(null); // CraftBukkit - decompile error
if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) {
@@ -593,7 +662,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -612,7 +681,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (!this.updatingChunksModified) {
return false;
} else {
@ -227,7 +227,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f
this.updatingChunksModified = false;
return true;
}
@@ -1061,12 +1143,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1081,12 +1163,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
protected Iterable<PlayerChunk> f() {

View File

@ -14,10 +14,10 @@ light engine on shutdown...
The queue size only puts a cap on max loss, doesn't solve that problem.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 69b3faf28d019fca90734c4d0944ead8fd97ab87..21940f2034744ea417a43fcebc92b21298753d2d 100644
index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -617,4 +617,9 @@ public class PaperWorldConfig {
@@ -622,4 +622,9 @@ public class PaperWorldConfig {
private void zombieVillagerInfectionChance() {
zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance);
}

View File

@ -56,7 +56,7 @@ index 8508b3e10e60a4ce36d471b1d3f7ffc836a6ddf7..aad1420dc63c16b558ad1ca34accf8a7
+ }
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b770c0600d6 100644
index e14e8bcf235339c1537a1e0a7702a364ee784c93..d1f832db33f21f8ba910d2c0c163af78718d298f 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -694,6 +694,7 @@ public class ChunkProviderServer extends IChunkProvider {
@ -75,7 +75,7 @@ index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77
this.world.timings.doChunkUnload.stopTiming(); // Spigot
this.world.getMethodProfiler().exit();
this.clearCache();
@@ -741,7 +743,7 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -756,7 +758,7 @@ public class ChunkProviderServer extends IChunkProvider {
entityPlayer.playerNaturallySpawnedEvent.callEvent();
};
// Paper end
@ -84,7 +84,7 @@ index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77
Optional<Chunk> optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
if (optional.isPresent()) {
@@ -765,6 +767,7 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -780,6 +782,7 @@ public class ChunkProviderServer extends IChunkProvider {
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
this.world.a(chunk, k);
this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
@ -92,7 +92,7 @@ index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77
}
}
}
@@ -921,6 +924,41 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider {
super.executeTask(runnable);
}

View File

@ -10,10 +10,10 @@ larger than the keep loaded range.
By skipping this, we avoid potential for a large spike on server start.
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86fa144863d 100644
index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c3921296106a3bc 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -113,7 +113,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -118,7 +118,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.serverStatisticManager = minecraftserver.getPlayerList().getStatisticManager(this);
this.advancementDataPlayer = minecraftserver.getPlayerList().f(this);
this.G = 1.0F;
@ -22,7 +22,7 @@ index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86f
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
@@ -165,6 +165,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -171,6 +171,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
// CraftBukkit end
@ -30,7 +30,7 @@ index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86f
private void b(WorldServer worldserver) {
BlockPosition blockposition = worldserver.getSpawn();
@@ -340,7 +341,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -346,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
position = Vec3D.a(((WorldServer) world).getSpawn());
}
this.world = world;

View File

@ -147,10 +147,10 @@ index 98e3acdc618ceda35e8086746aed698d304321c0..5bef465bfe90b08524862b13f9e22dcf
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c8e79fc2593ba8a7465b06e7e91d1b645da0f84c..05730e5812536e7e2b8dce4bc794b46e9e412d29 100644
index ba3a3c487f0cefa1c0d7394998800a4c4d6486cb..e7414b9e2307171edc7b2b7583f7d2972b3a5503 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2127,6 +2127,16 @@ public final class CraftServer implements Server {
@@ -2128,6 +2128,16 @@ public final class CraftServer implements Server {
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
};
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 05730e5812536e7e2b8dce4bc794b46e9e412d29..71b5c80b462d2d4de737ab608650b0ec9965ace3 100644
index e7414b9e2307171edc7b2b7583f7d2972b3a5503..43f8a547ab40d427bdeac0edac4040f5ff5576b5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2292,5 +2292,10 @@ public final class CraftServer implements Server {
@@ -2293,5 +2293,10 @@ public final class CraftServer implements Server {
public int getCurrentTick() {
return net.minecraft.server.MinecraftServer.currentTick;
}

Some files were not shown because too many files have changed in this diff Show More