Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
some patches
Dieser Commit ist enthalten in:
Ursprung
c3f3edea07
Commit
a30aad98f7
@ -5,10 +5,10 @@ Subject: [PATCH] Block player logins during server shutdown
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 7a9094e69684c2d963411525a09872024c6f62e3..6e9e0385881c60c6921b06663869546f7c852804 100644
|
||||
index db07502d4d7b73c0e74814334be6603121f60673..a738f70c9c2f8832277a239e6d79d91d663d4cf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -72,6 +72,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -74,6 +74,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
@Override
|
||||
public void tick() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index bea207f8fc4cd1af06622e10ff904d9459d4bc66..4e20bdcd15b030b408a8ee640f36c51b45a90e26 100644
|
||||
index ffd38defdd9b56b1849a3b4e312de2cff7b964c2..ba96a1c657d4e81076536d0d6432e4d6584bda2c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -388,6 +388,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -393,6 +393,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// Spigot end
|
||||
// Paper start
|
||||
protected int numCollisions = 0; // Paper
|
||||
@ -16,18 +16,18 @@ index bea207f8fc4cd1af06622e10ff904d9459d4bc66..4e20bdcd15b030b408a8ee640f36c51b
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
@@ -2177,6 +2178,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2200,6 +2201,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
+ // Save entity's from mob spawner status
|
||||
+ if (spawnedViaMobSpawner) {
|
||||
+ nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||
+ }
|
||||
// Paper end
|
||||
return nbt;
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2317,6 +2322,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2340,6 +2345,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.originWorld = originWorld;
|
||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
}
|
||||
@ -37,10 +37,10 @@ index bea207f8fc4cd1af06622e10ff904d9459d4bc66..4e20bdcd15b030b408a8ee640f36c51b
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 7ae0465091db8e8061737bf93884afa3db49feeb..5d6403fa27521860a69a707dc4358b013adfafd7 100644
|
||||
index bd48f49d50709354abc5bcff155b5abb9ab20191..1a5fb001e28997a113ad8133e9dc946206b85c35 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -165,6 +165,7 @@ public abstract class BaseSpawner {
|
||||
@@ -167,6 +167,7 @@ public abstract class BaseSpawner {
|
||||
// Spigot End
|
||||
}
|
||||
|
||||
@ -49,10 +49,10 @@ index 7ae0465091db8e8061737bf93884afa3db49feeb..5d6403fa27521860a69a707dc4358b01
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
continue;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 68d00a158751d24c7f0e38920d78c0547f1928eb..cc858aa0bdcfca69c37f962137e8caf9a8e33fd2 100644
|
||||
index 6100b2e718954b40f63ed30ab32e1dea4edba9a6..09cae000b1ff23ab3a0f2a43d83bc7ec05b5623f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1317,5 +1317,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1361,5 +1361,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
//noinspection ConstantConditions
|
||||
return originVector.toLocation(world);
|
||||
}
|
@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
|
||||
to ensure it meets latest minecraft expectations.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index cae548dbb5a3027e2de0bfbe38918ec7c2803e8e..c95c51605ae75cf340c7b0a88ae9146d8b31063e 100644
|
||||
index e6a47317eb24fc65ed02a4d4f9c4b19b5abc920d..8e8bcf829818fbbaedb13d9eddca096d457c511a 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -206,7 +206,7 @@ public final class ItemStack {
|
||||
@@ -229,7 +229,7 @@ public final class ItemStack {
|
||||
|
||||
// Called to run this stack through the data converter to handle older storage methods and serialized items
|
||||
public void convertStack(int version) {
|
||||
@ -20,10 +20,10 @@ index cae548dbb5a3027e2de0bfbe38918ec7c2803e8e..c95c51605ae75cf340c7b0a88ae9146d
|
||||
this.save(savedStack);
|
||||
savedStack = (CompoundTag) MinecraftServer.getServer().fixerUpper.update(References.ITEM_STACK, new Dynamic(NbtOps.INSTANCE, savedStack), version, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index bb522d4b7485383186cb3ce82a48ae7160ae7e0e..e21999ac116d6788fb8c367cee67190cb49c5f63 100644
|
||||
index 4c5ef6472947baf2ca3cc294eed77ceebd6cd5af..edb3b4efb38a644e312bf4dde4c756bec21192f7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -508,4 +508,11 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -511,4 +511,11 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
||||
}
|
||||
// Paper end - Adventure
|
@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
|
||||
You must replace the language file embedded in the server jar.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index e21999ac116d6788fb8c367cee67190cb49c5f63..8a89fd0f771e0df439dc9070df7dfa6f2cbd5de2 100644
|
||||
index edb3b4efb38a644e312bf4dde4c756bec21192f7..b6f5e63c7e7e45dd3eb15bad5c6bee9d5417311e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -515,4 +515,19 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -518,4 +518,19 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
|
||||
}
|
||||
// Paper end - ensure server conversions API
|
@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index daabc5739b7bf6b1cbeb497fe0e9b7ed6ed30975..d767d9259877ecf250d624a489e3f322df318e55 100644
|
||||
index 486e9e3dca76c047753b87927735c98698d5ca5a..3564d97af63494ede27941b63a7255239fa8a126 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -633,9 +633,9 @@ public abstract class PlayerList {
|
||||
@@ -631,9 +631,9 @@ public abstract class PlayerList {
|
||||
|
||||
// return chatmessage;
|
||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
||||
@ -21,7 +21,7 @@ index daabc5739b7bf6b1cbeb497fe0e9b7ed6ed30975..d767d9259877ecf250d624a489e3f322
|
||||
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||
|
||||
@@ -1026,7 +1026,23 @@ public abstract class PlayerList {
|
||||
@@ -1024,7 +1024,23 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
@ -31,12 +31,12 @@ index 8ff786c366332588a2df053438f23cc9fb7e2b84..c887d34171f89c731d76c4ca92c70be2
|
||||
Bootstrap.isBootstrapped = true;
|
||||
Instant instant = Instant.now();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 6f359e225eb11f22c61beb6463f9918002ce0086..ec442f1a6437f449d55739b990a4b69fcd48e8e0 100644
|
||||
index de7f0db02cdc730ccc89111396c031a267198f04..bb2ed43dccac698ea7265739bc1ed253f345d314 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -258,10 +258,12 @@ public class Main {
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
- System.err.println("*** Error, this build is outdated ***");
|
||||
+ // Paper start - This is some stupid bullshit
|
@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
|
||||
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 2be4b3f8129e38f72c6c0013cc0de7060a78ae76..5c0c4051e2f63e923e99a621d04d6a5dd7c86b44 100644
|
||||
index afbf6af7198bc69053882ac200892b5b695a4d36..1d5b84449fb91dba87de040c1c37ad77e0741320 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -365,6 +365,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -366,6 +366,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Reset spawner timer when spawner event is cancelled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 5d6403fa27521860a69a707dc4358b013adfafd7..20c39481bcf05e0d43c97b7e841ec9f5f6a0d45d 100644
|
||||
index 1a5fb001e28997a113ad8133e9dc946206b85c35..393b77043cbaf58200fca6e56c22c36aa2aa2cfb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -166,6 +166,7 @@ public abstract class BaseSpawner {
|
||||
@@ -168,6 +168,7 @@ public abstract class BaseSpawner {
|
||||
}
|
||||
|
||||
entity.spawnedViaMobSpawner = true; // Paper
|
||||
@ -16,7 +16,7 @@ index 5d6403fa27521860a69a707dc4358b013adfafd7..20c39481bcf05e0d43c97b7e841ec9f5
|
||||
// CraftBukkit start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
|
||||
continue;
|
||||
@@ -182,7 +183,7 @@ public abstract class BaseSpawner {
|
||||
@@ -184,7 +185,7 @@ public abstract class BaseSpawner {
|
||||
((Mob) entity).spawnAnim();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 6e9e0385881c60c6921b06663869546f7c852804..85f1591d1f87b314d18b4eb46b6388b7c9d57be7 100644
|
||||
index a738f70c9c2f8832277a239e6d79d91d663d4cf9..2337d5f0a29201b5f2d3d1734d8feb6c6177b4b3 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -259,7 +259,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -255,7 +255,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
ServerLoginPacketListenerImpl.LOGGER.warn("Authentication servers are down but will let them in anyway!");
|
||||
ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(s1)); // Spigot
|
||||
} else {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 098d182cc8cf048eb7b4a4640dc2338150f48f2e..6e2957e31ad4be418bcd475b2e3a4e56b5be591e 100644
|
||||
index 268ce65aa944295b0107daa2824fc93b55afeb89..6b1885cd2dd03772e2a8f3ea2b58ce68e70e97e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1200,7 +1200,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1227,7 +1227,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
boolean flag = d7 > 0.0D;
|
||||
|
||||
if (this.player.onGround() && !packet.isOnGround() && flag) {
|
@ -15,7 +15,7 @@ also adding some additional logging in order to help work out what is causing
|
||||
random disconnections for clients.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index 1dec537f96cb612de73a2d682392f14c872d031c..aa4d8ccb9cd5af57ffd3a2b4ce34d22f6f3d632c 100644
|
||||
index 70168fb930c24689c98da064f7d04cc98d729358..75a61cab28928a145fd22159822dd04844c626ac 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -83,14 +83,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@ -90,10 +90,10 @@ index 0d9658b1c6b5912a34058c0ce53b8e7f8c28afac..203fc53142bb0c9b6e2d1876fe8dfbe3
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4a5f67c47b7ff2e47630bd78421dd103e6278ed4..3836c1d2c2565333072fbbae1fc163125663ba3c 100644
|
||||
index 6b8734cda9d1384d929795f69de36887acafd698..34d9f11430ac8502774458fe02118a5c5ca49b44 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -288,6 +288,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -295,6 +295,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ from networking or during connections flood of chunk packets on slower clients,
|
||||
at the cost of dead connections being kept open for longer.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index aa4d8ccb9cd5af57ffd3a2b4ce34d22f6f3d632c..4e450a3d7f2db7d7d346103cc9467654ca1b8a1f 100644
|
||||
index 75a61cab28928a145fd22159822dd04844c626ac..4286dcc7ec46b446f60e41acd2dcaaa8760fd8b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -48,11 +48,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index cd55aa48063fa4dc9646ab487b307b87b8b41315..cafcb53b9a35971a4c0c45fb20de072d2f07b829 100644
|
||||
index 9db07751cf1321c7fd15b2345729deaa6dd5a76f..a135b539a250966939370bba35261cf1bb276128 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1240,7 +1240,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1235,7 +1235,7 @@ public abstract class Player extends LivingEntity {
|
||||
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
|
||||
|
||||
if (this.isSprinting() && flag) {
|
||||
@ -18,7 +18,7 @@ index cd55aa48063fa4dc9646ab487b307b87b8b41315..cafcb53b9a35971a4c0c45fb20de072d
|
||||
++i;
|
||||
flag1 = true;
|
||||
}
|
||||
@@ -1315,7 +1315,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1310,7 +1310,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ index cd55aa48063fa4dc9646ab487b307b87b8b41315..cafcb53b9a35971a4c0c45fb20de072d
|
||||
this.sweepAttack();
|
||||
}
|
||||
|
||||
@@ -1343,15 +1343,15 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1338,15 +1338,15 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@ -46,7 +46,7 @@ index cd55aa48063fa4dc9646ab487b307b87b8b41315..cafcb53b9a35971a4c0c45fb20de072d
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1403,7 +1403,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1398,7 +1398,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
||||
} else {
|
||||
@ -55,7 +55,7 @@ index cd55aa48063fa4dc9646ab487b307b87b8b41315..cafcb53b9a35971a4c0c45fb20de072d
|
||||
if (flag4) {
|
||||
target.clearFire();
|
||||
}
|
||||
@@ -1877,6 +1877,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1792,6 +1792,14 @@ public abstract class Player extends LivingEntity {
|
||||
public int getXpNeededForNextLevel() {
|
||||
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 47726c9d2c5384d31983e53fd17d91cd12da8961..f687bfd7cf820c1e7443c8b86ef9ca28a4768b02 100644
|
||||
index b8ac19ae63579bf5325b0ebfa37293c170df6205..226afea543b581dd1b8ba0f81ff7dab7cce96395 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -15,7 +15,7 @@ index 47726c9d2c5384d31983e53fd17d91cd12da8961..f687bfd7cf820c1e7443c8b86ef9ca28
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -3050,6 +3051,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3047,6 +3048,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
|
||||
|
||||
if (this.equipmentHasChanged(itemstack, itemstack1)) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 85f1591d1f87b314d18b4eb46b6388b7c9d57be7..2ecc29755eb0e79d49f0713e56849d7971dd38ed 100644
|
||||
index 2337d5f0a29201b5f2d3d1734d8feb6c6177b4b3..b7ddb05d7b4ec66def973f15bb2408b0a4fc136a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -79,7 +79,9 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -81,7 +81,9 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
// Paper end
|
||||
if (this.state == ServerLoginPacketListenerImpl.State.VERIFYING) {
|
@ -5,19 +5,19 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 407607babfb200152bb0e5c6d56bb66c82217077..3f88b1caf5f99499adeaa8ba24e2c9d8647ea7d5 100644
|
||||
index c6e56303ec8ee466a6de7e6bd76c4f6814e8db30..35b6e7a0cf8ec57763858fa8e4f287769271a85b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -805,6 +805,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Spigot start
|
||||
// Iterator iterator = this.blockEntityTickers.iterator();
|
||||
@@ -816,6 +816,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
boolean flag = this.tickRateManager().runsNormally();
|
||||
|
||||
int tilesThisCycle = 0;
|
||||
+ var toRemove = new it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet<TickingBlockEntity>(net.minecraft.Util.identityStrategy()); // Paper - use removeAll
|
||||
+ toRemove.add(null);
|
||||
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
||||
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
|
||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
|
||||
@@ -812,7 +814,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -823,7 +825,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (tickingblockentity == null) {
|
||||
this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
|
||||
tilesThisCycle--;
|
||||
@ -25,14 +25,14 @@ index 407607babfb200152bb0e5c6d56bb66c82217077..3f88b1caf5f99499adeaa8ba24e2c9d8
|
||||
continue;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -820,12 +821,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -831,12 +832,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (tickingblockentity.isRemoved()) {
|
||||
// Spigot start
|
||||
tilesThisCycle--;
|
||||
- this.blockEntityTickers.remove(this.tileTickPosition--);
|
||||
+ toRemove.add(tickingblockentity); // Paper - use removeAll
|
||||
// Spigot end
|
||||
} else if (this.shouldTickBlocksAt(tickingblockentity.getPos())) {
|
||||
} else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) {
|
||||
tickingblockentity.tick();
|
||||
}
|
||||
}
|
@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping
|
||||
information on restoration when the event is cancelled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 3f88b1caf5f99499adeaa8ba24e2c9d8647ea7d5..be48f90db79509035a87103f20582fb2500449ad 100644
|
||||
index 35b6e7a0cf8ec57763858fa8e4f287769271a85b..82cd225802ecc518c34426c010525192ef544f34 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -154,7 +154,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -157,7 +157,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
|
||||
public boolean captureBlockStates = false;
|
||||
public boolean captureTreeGeneration = false;
|
||||
@ -30,7 +30,7 @@ index 3f88b1caf5f99499adeaa8ba24e2c9d8647ea7d5..be48f90db79509035a87103f20582fb2
|
||||
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
|
||||
public List<ItemEntity> captureDrops;
|
||||
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
|
||||
@@ -469,7 +469,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -472,7 +472,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
|
||||
// CraftBukkit start - tree generation
|
||||
if (this.captureTreeGeneration) {
|
||||
@ -39,7 +39,7 @@ index 3f88b1caf5f99499adeaa8ba24e2c9d8647ea7d5..be48f90db79509035a87103f20582fb2
|
||||
if (blockstate == null) {
|
||||
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
|
||||
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
||||
@@ -489,7 +489,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -492,7 +492,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit start - capture blockstates
|
||||
boolean captured = false;
|
||||
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
|
||||
@ -49,7 +49,7 @@ index 3f88b1caf5f99499adeaa8ba24e2c9d8647ea7d5..be48f90db79509035a87103f20582fb2
|
||||
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
||||
captured = true;
|
||||
}
|
||||
@@ -695,7 +696,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -698,7 +699,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
// CraftBukkit start - tree generation
|
||||
if (this.captureTreeGeneration) {
|
@ -51,10 +51,10 @@ index 63acd109a79ed752a05df3d4f1b99309297c2055..d156f7cc71050f13b2feca00c52ca6b6
|
||||
return null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index 1f5962457a15cae2162ce3899e0e7f167a854d11..9aa8c6c11d5aee83627cb91258c16844f791cd26 100644
|
||||
index 61d696a59d7bea0b1908fe4fb63e4143bb1e218d..29bbd44a0d15d78e13d91003fea1460efdf19e88 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -327,6 +327,13 @@ public class CraftBlock implements Block {
|
||||
@@ -328,6 +328,13 @@ public class CraftBlock implements Block {
|
||||
return CraftBlockStates.getBlockState(this);
|
||||
}
|
||||
|
||||
@ -114,10 +114,10 @@ index 22af1b41eec06d660dbe47c463014bcdd96fc5b6..f046f507a095e0cb8f839b9b4b06add3
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
||||
index 8561c16da0dccc55c89c7796cbe4f8792d01194f..c9ef19bdeeb130561659ff8161bf4e196cf4f53f 100644
|
||||
index 183d6146dec231629b4892fcb2fe96d88cc74b4c..2fe8f7dfefd6e1f9b06f1d4821894091a8e6400e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
|
||||
@@ -379,15 +379,30 @@ public final class CraftBlockStates {
|
||||
@@ -383,15 +383,30 @@ public final class CraftBlockStates {
|
||||
}
|
||||
|
||||
public static BlockState getBlockState(Block block) {
|
@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent
|
||||
Co-authored-by: Aikar <aikar@aikar.co>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6e2957e31ad4be418bcd475b2e3a4e56b5be591e..b5abb0d433322224ccbbed8755fb3ebf77b5a36c 100644
|
||||
index 6b1885cd2dd03772e2a8f3ea2b58ce68e70e97e7..9aa8c643d0a338afefeb8ff6a1f016cc0ffdb00f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -688,12 +688,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -691,12 +691,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ index 6e2957e31ad4be418bcd475b2e3a4e56b5be591e..b5abb0d433322224ccbbed8755fb3ebf
|
||||
return;
|
||||
}
|
||||
// Paper start
|
||||
@@ -704,18 +708,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -707,18 +711,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
@ -91,10 +91,10 @@ index 6e2957e31ad4be418bcd475b2e3a4e56b5be591e..b5abb0d433322224ccbbed8755fb3ebf
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6b9675a1170f9e536432826e52b3cb3fa5195272..3ceebd86f44d1997201c34559d1b63004a973282 100644
|
||||
index 4c3d6286a0718694df2bebb94f42082bb96dc4f0..781922298273c77ef92cf683034d4239deb02599 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2195,7 +2195,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2227,7 +2227,7 @@ public final class CraftServer implements Server {
|
||||
offers = this.tabCompleteChat(player, message);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] PlayerPickupExperienceEvent
|
||||
Allows plugins to cancel a player picking up an experience orb
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index 9d1cce3fb02bb2c3ff71055fbafc974b6b98625a..2a192d0c1de8ab5440daacf591ff08f74cff9ff3 100644
|
||||
index 627fcf000f40e1bda025da874c447a99c727b98b..7eb84b1aad4f031ad17a461d174b23c213014995 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -312,7 +312,7 @@ public class ExperienceOrb extends Entity {
|
@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
|
||||
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3836c1d2c2565333072fbbae1fc163125663ba3c..e4e36c273af4dc2253030823d51dd25a166c391e 100644
|
||||
index 34d9f11430ac8502774458fe02118a5c5ca49b44..168c1d20320f23182ff2de519d28e8401f12b6b3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1542,7 +1542,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1549,7 +1549,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
@Override
|
@ -40,13 +40,13 @@ index e580df88baadfd943756b1e440c7253a287fa0e9..ea520b828378c268d05425096c6493ca
|
||||
|
||||
return true;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index b2367f3836689f3aa27b1b4905219e07e6173c93..821b2c8860c1328e2ecc009deeb533648ce16540 100644
|
||||
index fe4fc7792ac1bfcde0980884a6369d08e81a6b65..d30373d369049827b5b7611d35c8b7fc8fc08d23 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -565,6 +565,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
@@ -557,6 +557,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
Collections.shuffle(list);
|
||||
Util.shuffle(list, this.level.random);
|
||||
+ // Paper start - call player naturally spawn event
|
||||
+ int chunkRange = level.spigotConfig.mobSpawnRange;
|
||||
+ chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
|
||||
@ -54,27 +54,20 @@ index b2367f3836689f3aa27b1b4905219e07e6173c93..821b2c8860c1328e2ecc009deeb53364
|
||||
+ for (ServerPlayer entityPlayer : this.level.players()) {
|
||||
+ entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange);
|
||||
+ entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
||||
+ };
|
||||
+ }
|
||||
+ // Paper end
|
||||
int l = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
|
||||
boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||
Iterator iterator1 = list.iterator();
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 43e454be3f18d092913739bb6a92d5b82059ba59..9b670eb2925caa275cae6f51eb75183a9f5208b0 100644
|
||||
index 75d2213aadcbd1d0a49fd4c8cef2d4d51669c73d..1b56d6b05fee0aa430dab666f50c5b886c3910d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.server.level;
|
||||
|
||||
+import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.net.InetAddresses;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
@@ -257,6 +258,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -265,6 +265,7 @@ public class ServerPlayer extends Player {
|
||||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
+ public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
+ public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
|
||||
// Paper start - replace player chunk loader
|
||||
private final java.util.concurrent.atomic.AtomicReference<io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances> viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1));
|
@ -59,10 +59,10 @@ index b77ebe04f1018962b85110258c8a0a2db8612485..028d69907a988e191213a17e072ef227
|
||||
|
||||
if (t0 != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index cea1a8eaae8dfc36efd09e3ac57a7062bf536aac..5981b2bd5745ac32cdb377c15c4384d074a47680 100644
|
||||
index 382b55167dede435b034866bd394455f0f6f2a00..9d16fc698b0771bcb3c95f5fb017879c37ebb39b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -414,6 +414,20 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -418,6 +418,20 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@Nullable
|
||||
public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Consumer<T> consumer, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
// CraftBukkit end
|
||||
@ -84,7 +84,7 @@ index cea1a8eaae8dfc36efd09e3ac57a7062bf536aac..5981b2bd5745ac32cdb377c15c4384d0
|
||||
|
||||
if (t0 != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index b3127238cea62c47d710abab44f6570103ba9364..7d7390dc76f683178fc332ea3c2c945ba8e9b84b 100644
|
||||
index a0a313fa5e7e4e1973c020d0262e34381a19dea7..0429b927e63ec12f53a6ce1ebe1e64d99bf7e129 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -975,7 +975,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@ -97,10 +97,10 @@ index b3127238cea62c47d710abab44f6570103ba9364..7d7390dc76f683178fc332ea3c2c945b
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 20c39481bcf05e0d43c97b7e841ec9f5f6a0d45d..fc7719d12b5f6011aec2e41a36b4bacd77672b6d 100644
|
||||
index 393b77043cbaf58200fca6e56c22c36aa2aa2cfb..04cce4380e6e833b1d5e0a613eb0a167fdfe4e16 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -128,6 +128,27 @@ public abstract class BaseSpawner {
|
||||
@@ -130,6 +130,27 @@ public abstract class BaseSpawner {
|
||||
} else if (!SpawnPlacements.checkSpawnRules((EntityType) optional.get(), world, MobSpawnType.SPAWNER, blockposition1, world.getRandom())) {
|
||||
continue;
|
||||
}
|
@ -38,15 +38,15 @@ index ea906c9942be4c37b0daf866c759771af0b1e0ed..48fcfe223f807ccb903804adfead4b97
|
||||
return super.fetchProfile(profileId, requireSecure);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
index f5162f7171c348ff523b18e577246561d79e1c20..238b6cd88cb24ca63770db607f2241fcd7210574 100644
|
||||
index 92b770d10f34596ce52392a0db1ccd825108730b..4430520d32024d897c93c1d9f8652ccb2c202c01 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
@@ -216,7 +216,7 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
MinecraftSessionService minecraftsessionservice = SkullBlockEntity.sessionService;
|
||||
@@ -74,7 +74,7 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
return apiServices.profileCache().getAsync(name).thenApplyAsync((optional) -> {
|
||||
if (optional.isPresent() && !booleansupplier.getAsBoolean()) {
|
||||
UUID uuid = ((GameProfile) optional.get()).getId();
|
||||
- ProfileResult profileresult = apiServices.sessionService().fetchProfile(uuid, true);
|
||||
+ ProfileResult profileresult = apiServices.sessionService() instanceof com.destroystokyo.paper.profile.PaperMinecraftSessionService paperMinecraftSessionService ? paperMinecraftSessionService.fetchProfile(optional.get(), true) : apiServices.sessionService().fetchProfile(uuid, true); // Paper
|
||||
|
||||
if (minecraftsessionservice != null) {
|
||||
- ProfileResult profileresult = minecraftsessionservice.fetchProfile(profile.getId(), true);
|
||||
+ ProfileResult profileresult = minecraftsessionservice instanceof com.destroystokyo.paper.profile.PaperMinecraftSessionService paperMinecraftSessionService ? paperMinecraftSessionService.fetchProfile(profile, true) : minecraftsessionservice.fetchProfile(profile.getId(), true); // Paper
|
||||
|
||||
return profileresult == null ? Optional.of(profile) : Optional.of(profileresult.profile());
|
||||
return profileresult != null ? Optional.ofNullable(profileresult.profile()) : optional;
|
||||
} else {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAdvancementCriterionGrantEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
index f5f26c0327f0dae47badcc914fc89a4019c784a3..6487bf016e646ca772b667a2a81c85e82c027c05 100644
|
||||
index dbd5f1d052348d6adae8b13ae1f2686553b7a4bf..f6daa77856f5d57b1a3b38e709bff47214372973 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -226,6 +226,12 @@ public class PlayerAdvancements {
|
||||
@@ -225,6 +225,12 @@ public class PlayerAdvancements {
|
||||
boolean flag1 = advancementprogress.isDone();
|
||||
|
||||
if (advancementprogress.grantProgress(criterionName)) {
|
@ -255,10 +255,10 @@ index b77f5832265be5aaf96d95fcac4737919720fa6e..e15723080445b09852512132039ca2cd
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 57bd07e7aa9d09e843bf33f4c6c2c610aca5401e..3d749e6d6193878f1b4f288946afcec9461dc8df 100644
|
||||
index cd0c885ed63a3c43b915da239a8dddfee2622c76..4c66a0357c06e0b286e38624c874e33e45933fc9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -1463,6 +1463,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1464,6 +1464,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
CraftMetaCrossbow.CHARGED.NBT,
|
||||
CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
|
||||
CraftMetaSuspiciousStew.EFFECTS.NBT,
|
@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds
|
||||
when cancelling interaction.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 61bc50ef899d2867d4f3c762b71012b27d74e7f6..5f79367fda576300c59774d69089f8f1c4408f8a 100644
|
||||
index 45236a077d798d6a257a2e982b58901167ecd06e..e3b7441d875b55ffce295c948f3dc867be09e042 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -519,7 +519,13 @@ public class ServerPlayerGameMode {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index cafcb53b9a35971a4c0c45fb20de072d2f07b829..695f19c77074f910fcd8c1a31d2e70cab10abb19 100644
|
||||
index a135b539a250966939370bba35261cf1bb276128..26ddbd14831f6d7f2f1e8fd460f6253245f32a04 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1247,6 +1247,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1242,6 +1242,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
|
||||
|
@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..6b0bdc266109cdfb874f08bf74323603
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 73155c8cb02a6156c1e48f9c75f512441f8b85a1..beebc3ed13b200a0d6585387bb7e06a6aaa07940 100644
|
||||
index 6e6a8a7d9af2e5de6782fd5935d22d7de3f248ee..65625a84de2980f4d719cf5a2bec205cd1f3d835 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3,6 +3,9 @@ package net.minecraft.server;
|
||||
@ -194,7 +194,7 @@ index 73155c8cb02a6156c1e48f9c75f512441f8b85a1..beebc3ed13b200a0d6585387bb7e06a6
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1328,7 +1331,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1430,7 +1433,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hidesOnlinePlayers()) {
|
||||
return new ServerStatus.Players(i, list.size(), List.of());
|
||||
} else {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
|
||||
This will allow you to change the players name or skin on login.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 2ecc29755eb0e79d49f0713e56849d7971dd38ed..41ba6f0c88b6205bf33de962c0bc545a0ac40c74 100644
|
||||
index b7ddb05d7b4ec66def973f15bb2408b0a4fc136a..827774b02136ec1862bc9ffabc76ba3a4eb87716 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -292,8 +292,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -288,8 +288,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
java.util.UUID uniqueId = gameprofile.getId();
|
||||
final org.bukkit.craftbukkit.CraftServer server = ServerLoginPacketListenerImpl.this.server.server;
|
||||
|
@ -9,10 +9,10 @@ This can be useful for changing name or skins after a player has logged in.
|
||||
public-f net.minecraft.world.entity.player.Player gameProfile
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index b5abb0d433322224ccbbed8755fb3ebf77b5a36c..598b442f84df4562811986cfb5e8614e74df2cc0 100644
|
||||
index 9aa8c643d0a338afefeb8ff6a1f016cc0ffdb00f..520de61cd21d71f8c77175977987091e3caa0be9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1438,7 +1438,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1465,7 +1465,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
|
||||
}
|
||||
|
||||
@ -22,10 +22,10 @@ index b5abb0d433322224ccbbed8755fb3ebf77b5a36c..598b442f84df4562811986cfb5e8614e
|
||||
if (Float.isNaN(f)) {
|
||||
f = 0;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 41ba6f0c88b6205bf33de962c0bc545a0ac40c74..03ff64ad395455f21f4ca30faae17fc6a1dc0501 100644
|
||||
index 827774b02136ec1862bc9ffabc76ba3a4eb87716..96ae1fd95956f5e5a1542dcce3fbd9d4b83d49ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -293,11 +293,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -289,11 +289,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
final org.bukkit.craftbukkit.CraftServer server = ServerLoginPacketListenerImpl.this.server.server;
|
||||
|
||||
// Paper start
|
||||
@ -55,10 +55,10 @@ index 477d3245facb5ae59c786d4f696f64226cb540a6..e8490a58dd4d9bc39a5bb2f9fc109526
|
||||
|
||||
public Server getServer() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e4e36c273af4dc2253030823d51dd25a166c391e..8b443e6f0bc593004ac91d8b92eb3c54add73291 100644
|
||||
index 168c1d20320f23182ff2de519d28e8401f12b6b3..22ed227ba141ffd232aed49ca673348f452d3983 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -271,11 +271,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -278,11 +278,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.server.getPlayer(this.getUniqueId()) != null;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ index e4e36c273af4dc2253030823d51dd25a166c391e..8b443e6f0bc593004ac91d8b92eb3c54
|
||||
@Override
|
||||
public InetSocketAddress getAddress() {
|
||||
if (this.getHandle().connection == null) return null;
|
||||
@@ -1692,8 +1687,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1699,8 +1694,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
|
||||
// Remove this entity from the hidden player's EntityTrackerEntry
|
||||
@ -87,7 +87,7 @@ index e4e36c273af4dc2253030823d51dd25a166c391e..8b443e6f0bc593004ac91d8b92eb3c54
|
||||
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
|
||||
if (entry != null) {
|
||||
entry.removePlayer(this.getHandle());
|
||||
@@ -1706,8 +1708,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1713,8 +1715,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
|
||||
}
|
||||
}
|
||||
@ -96,7 +96,7 @@ index e4e36c273af4dc2253030823d51dd25a166c391e..8b443e6f0bc593004ac91d8b92eb3c54
|
||||
}
|
||||
|
||||
void resetAndHideEntity(org.bukkit.entity.Entity entity) {
|
||||
@@ -1772,12 +1772,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1779,12 +1779,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
private void trackAndShowEntity(org.bukkit.entity.Entity entity) {
|
||||
@ -122,7 +122,7 @@ index e4e36c273af4dc2253030823d51dd25a166c391e..8b443e6f0bc593004ac91d8b92eb3c54
|
||||
}
|
||||
|
||||
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
|
||||
@@ -1787,6 +1800,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1794,6 +1807,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
|
||||
}
|
||||
@ -162,7 +162,7 @@ index e4e36c273af4dc2253030823d51dd25a166c391e..8b443e6f0bc593004ac91d8b92eb3c54
|
||||
|
||||
void resetAndShowEntity(org.bukkit.entity.Entity entity) {
|
||||
// SPIGOT-7312: Can't show/hide self
|
||||
@@ -1798,6 +1844,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1805,6 +1851,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.trackAndShowEntity(entity);
|
||||
}
|
||||
}
|
||||
@ -200,10 +200,10 @@ index e4e36c273af4dc2253030823d51dd25a166c391e..8b443e6f0bc593004ac91d8b92eb3c54
|
||||
public void onEntityRemove(Entity entity) {
|
||||
this.invertedVisibilityEntities.remove(entity.getUUID());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 3b6683e778a35d021d6189bf8ee5719684040665..4b209818a20e76e9d857c4bb822f6b24ec8e9f09 100644
|
||||
index 3720fa451cfd82d1df6461b88d12d2f53b364c92..afa93af41bf9b45dd7e49378b7fea088087993d5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -338,6 +338,12 @@ public class Commodore
|
||||
@@ -341,6 +341,12 @@ public class Commodore
|
||||
return;
|
||||
}
|
||||
|
@ -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 3ceebd86f44d1997201c34559d1b63004a973282..32f57ed7bb7c203ac126a4a0877e08c966c1638c 100644
|
||||
index 781922298273c77ef92cf683034d4239deb02599..91598abecda54206f177976d4c7eed99bd949993 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1793,6 +1793,25 @@ public final class CraftServer implements Server {
|
||||
@@ -1825,6 +1825,25 @@ public final class CraftServer implements Server {
|
||||
return recipients.size();
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
|
||||
provide an optional flag to disable this check, at your own risk.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8b443e6f0bc593004ac91d8b92eb3c54add73291..10c9ced5f306b71eeb77ecc9c4e95ef7de3460e8 100644
|
||||
index 22ed227ba141ffd232aed49ca673348f452d3983..f93e5812cc239ff69d22a53ac52be2c71203ad07 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -194,6 +194,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -195,6 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper start
|
||||
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
|
||||
private String resourcePackHash;
|
||||
@ -20,7 +20,7 @@ index 8b443e6f0bc593004ac91d8b92eb3c54add73291..10c9ced5f306b71eeb77ecc9c4e95ef7
|
||||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||
@@ -2096,7 +2097,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2111,7 +2112,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// Paper end
|
||||
|
||||
public void addChannel(String channel) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 32ad04d66b776aa1c300cca3c5eeb332d75ea5cc..602cf19007c622ab9bb12a7018643cf05688f33e 100644
|
||||
index a472bd00afb1ef4ee3043e8c8e2098014f67a888..7d6301ae9ee2added007b0c68ffabe5d79f7be62 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -626,6 +626,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -627,6 +627,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
}
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable sprint interruption on attack
|
||||
If the sprint interruption is disabled players continue sprinting when they attack entities.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 695f19c77074f910fcd8c1a31d2e70cab10abb19..502f42c81fb40bead619fb36f5caf2e0fe739c8b 100644
|
||||
index 26ddbd14831f6d7f2f1e8fd460f6253245f32a04..729c960a18a77b744eba0c9319cf5c2a9e84b707 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1296,7 +1296,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1291,7 +1291,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
|
||||
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b82f5d7eeb934d92f858a04f018c3bb05483fff6..39cabe9d047a44452de25be5937cdb2dd66c17ab 100644
|
||||
index 98ea55455d365b8d25ecb998daacbcbb1b45e5a7..146320ce5e9de7e4b081afca54c0c8aa45e6cfe4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2320,6 +2320,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2356,6 +2356,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTickingEnd(Entity entity) {
|
||||
ServerLevel.this.entityTickList.remove(entity);
|
||||
@ -33,10 +33,10 @@ index b82f5d7eeb934d92f858a04f018c3bb05483fff6..39cabe9d047a44452de25be5937cdb2d
|
||||
|
||||
public void onTrackingStart(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index b4a37d11e381d08c82945966ee5f969364f6e3ee..e9ae25a70c747c173ebd2e393818d205527d5314 100644
|
||||
index fbbb1fa3d5f4ace67fee96aa235cec3b39deb7b1..e8620ad6be2dda7fe288f884c4ae88a924be4a62 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -92,6 +92,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -101,6 +101,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
if (nbt.hasUUID("Owner")) {
|
||||
this.ownerUUID = nbt.getUUID("Owner");
|
||||
this.cachedOwner = null;
|
@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
|
||||
This adds a new Builder API which is much friendlier to use.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 39cabe9d047a44452de25be5937cdb2dd66c17ab..92c847fdd2a7e3e20c8607f287c3e1ad27b9e4f7 100644
|
||||
index 146320ce5e9de7e4b081afca54c0c8aa45e6cfe4..ac331aef54f9e595129bded04ff6d9c7b8b7d5b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1719,12 +1719,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1738,12 +1738,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
@ -34,10 +34,10 @@ index 39cabe9d047a44452de25be5937cdb2dd66c17ab..92c847fdd2a7e3e20c8607f287c3e1ad
|
||||
|
||||
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 78ed93a3bb321bcb30d9ca456a9deb5deeb4397c..d8066264008ade869414c505a2b55886bef74fbf 100644
|
||||
index 0d9a491487c098b37331a9b94605993118fae403..9d111f904d20c1694436ecf5dd9c3c7738be2681 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1891,13 +1891,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1897,13 +1897,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
index 5bd28e1f475aeadaa626a4e9e9e2a1b3a28675f4..148ea4089c4f67894b28e21e961a661a2d291925 100644
|
||||
index 0b5d988c6372ee5b7c2edd56f87ef604e76a2a5b..2d230e1f56be70f6373421c0649b0b9d3f2702e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
@@ -203,9 +203,9 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
@@ -201,9 +201,9 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
Style chatmodifier = signtext.getMessage(i, entityhuman.isTextFilteringEnabled()).getStyle();
|
||||
|
||||
if (entityhuman.isTextFilteringEnabled()) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
|
||||
1.17: Shouldn't be needed as blocks no longer tick without at least 1 radius chunk loaded.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||
index 331b642c36af97f7f05bd63f96d42d1af443e5a3..a3af96b2518b41f370d09cfda26dc589b9ee977b 100644
|
||||
index 0d08a9d5555ebc296a1461aefbf48e8eee6b462d..7f1946d371f9be2662788957c6f11a2e087df616 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
|
||||
@@ -38,7 +38,8 @@ public class FrostedIceBlock extends IceBlock {
|
||||
@@ -46,7 +46,8 @@ public class FrostedIceBlock extends IceBlock {
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
mutableBlockPos.setWithOffset(pos, direction);
|
||||
@ -19,7 +19,7 @@ index 331b642c36af97f7f05bd63f96d42d1af443e5a3..a3af96b2518b41f370d09cfda26dc589
|
||||
if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) {
|
||||
world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig().environment.frostedIce.delay.min, world.paperConfig().environment.frostedIce.delay.max)); // Paper - use configurable min/max delay
|
||||
}
|
||||
@@ -75,7 +76,10 @@ public class FrostedIceBlock extends IceBlock {
|
||||
@@ -83,7 +84,10 @@ public class FrostedIceBlock extends IceBlock {
|
||||
|
||||
for(Direction direction : Direction.values()) {
|
||||
mutableBlockPos.setWithOffset(pos, direction);
|
@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function
|
||||
Item can be set inside of the Consumer pre spawn function.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index b286deebacaf00ff21585cfbc75291a8d80965c4..f92f726d2ab63694bad0d6eb0ee718ae6194144f 100644
|
||||
index 4ce013d8715d2090420a369678f698a9ce1983cb..53385eb0fb6c79052f508f8feeff7cbd8559c19f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -593,6 +593,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@@ -623,6 +623,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
entity = net.minecraft.world.entity.EntityType.BOAT.create(world);
|
||||
}
|
||||
entity.moveTo(x, y, z, yaw, pitch);
|
@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index f42f6f5fb7a2398c183eb9fa1a964a7680b687b8..4fa1085532e9374aad3c877ca6aba1b251640cc8 100644
|
||||
index ee5989e52ce0b55d8bf867ab10801ba3252c88a5..550d3290c974eebdeb4bf9b90987448c5d3d2999 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -184,6 +184,13 @@ public final class CraftItemStack extends ItemStack {
|
@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle()
|
||||
However, replaced it too to make it clearer of intent.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index cc858aa0bdcfca69c37f962137e8caf9a8e33fd2..f1df0a172e7e1589b9a6af6fab87ce0251c5a557 100644
|
||||
index 09cae000b1ff23ab3a0f2a43d83bc7ec05b5623f..93363aabee8bafeb1bc1d0d5a94e80b647175509 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -840,14 +840,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -848,14 +848,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return false;
|
||||
}
|
||||
final CraftEntity other = (CraftEntity) obj;
|
@ -36,7 +36,7 @@ This change will result in some major changes to fishing formulas.
|
||||
I would love to see this change in Vanilla, so Mojang please pull :)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java b/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java
|
||||
index 7a52d03c488fb1e277228914b810e2d6e02beaef..4fbb0f7fefcb383c25c1c4df2e788d9a153ae376 100644
|
||||
index 6d5a2806345ff86e143e16ecedc2f1e8d80f5b85..d3de18b1f856a99aa4f2a556956af7e5511164bf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/entries/LootPoolSingletonContainer.java
|
||||
@@ -122,9 +122,35 @@ public abstract class LootPoolSingletonContainer extends LootPoolEntryContainer
|
@ -5,12 +5,12 @@ Subject: [PATCH] Print Error details when failing to save player data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
index 984b75e12b5feab63767e030df925b3cbf26d559..36af81f0957d17e170d229059c66f4eb4539dfeb 100644
|
||||
index 08f4cc47ec3aa4dd6980ba543219891a510b010b..b3a90d6ef0e17c236e0b3c46e2d0012671afdaa7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -43,7 +43,7 @@ public class PlayerDataStorage {
|
||||
@@ -47,7 +47,7 @@ public class PlayerDataStorage {
|
||||
|
||||
Util.safeReplaceFile(file1, file, file2);
|
||||
Util.safeReplaceFile(path2, path1, path3);
|
||||
} catch (Exception exception) {
|
||||
- PlayerDataStorage.LOGGER.warn("Failed to save player data for {}", player.getName().getString());
|
||||
+ PlayerDataStorage.LOGGER.warn("Failed to save player data for {}", player.getScoreboardName(), exception); // Paper
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index f687bfd7cf820c1e7443c8b86ef9ca28a4768b02..8892714b9e7776183da9d9253db2c56da43319c6 100644
|
||||
index 226afea543b581dd1b8ba0f81ff7dab7cce96395..2786b4322d32950153c489941e1aed7c4862e822 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3806,12 +3806,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3808,12 +3808,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.isUsingItem() && !this.useItem.isEmpty()) {
|
||||
Item item = this.useItem.getItem();
|
||||
|
||||
@ -35,10 +35,10 @@ index f687bfd7cf820c1e7443c8b86ef9ca28a4768b02..8892714b9e7776183da9d9253db2c56d
|
||||
return this.isShiftKeyDown();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 5c0c4051e2f63e923e99a621d04d6a5dd7c86b44..6544b8160af89e93e508c5d466c22ba389b7621c 100644
|
||||
index 1d5b84449fb91dba87de040c1c37ad77e0741320..c790cbdc16b1f5e3d59cdf58e2c9795fccdb758a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -810,5 +810,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -815,5 +815,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setArrowsStuck(final int arrows) {
|
||||
this.getHandle().setArrowCount(arrows);
|
||||
}
|
@ -7,10 +7,10 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
|
||||
Plugins can skip selection of certain arrows and control which is used.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 502f42c81fb40bead619fb36f5caf2e0fe739c8b..587e3529b5b658ab943b4e7ffaa235de34542e9c 100644
|
||||
index 729c960a18a77b744eba0c9319cf5c2a9e84b707..45098aa460370669abdb3619fa4b1adef6fbf282 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2262,18 +2262,29 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2177,18 +2177,29 @@ public abstract class Player extends LivingEntity {
|
||||
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ Co-authored-by: aerulion <aerulion@gmail.com>
|
||||
This event is called when an entity receives knockback by another entity.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 4e20bdcd15b030b408a8ee640f36c51b45a90e26..7c4569fd5b331576be43fbdab30721134ea101fa 100644
|
||||
index ba96a1c657d4e81076536d0d6432e4d6584bda2c..0141b58ed74234a63820b6557687a24611d463be 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1902,8 +1902,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1907,8 +1907,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public void push(double deltaX, double deltaY, double deltaZ) {
|
||||
@ -33,10 +33,10 @@ index 4e20bdcd15b030b408a8ee640f36c51b45a90e26..7c4569fd5b331576be43fbdab3072113
|
||||
|
||||
protected void markHurt() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 8892714b9e7776183da9d9253db2c56da43319c6..06318ffaa20b2682c99c767b1ff4b66f377796e1 100644
|
||||
index 2786b4322d32950153c489941e1aed7c4862e822..55a939c74dad301e866e0711d6ff8e0379bf73c6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1514,7 +1514,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1513,7 +1513,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
d0 = (Math.random() - Math.random()) * 0.01D;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ index 8892714b9e7776183da9d9253db2c56da43319c6..06318ffaa20b2682c99c767b1ff4b66f
|
||||
if (!flag) {
|
||||
this.indicateDamage(d0, d1);
|
||||
}
|
||||
@@ -1562,7 +1562,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1561,7 +1561,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
protected void blockedByShield(LivingEntity target) {
|
||||
@ -54,7 +54,7 @@ index 8892714b9e7776183da9d9253db2c56da43319c6..06318ffaa20b2682c99c767b1ff4b66f
|
||||
}
|
||||
|
||||
private boolean checkTotemDeathProtection(DamageSource source) {
|
||||
@@ -1823,6 +1823,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1820,6 +1820,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void knockback(double strength, double x, double z) {
|
||||
@ -66,7 +66,7 @@ index 8892714b9e7776183da9d9253db2c56da43319c6..06318ffaa20b2682c99c767b1ff4b66f
|
||||
strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
|
||||
if (strength > 0.0D) {
|
||||
this.hasImpulse = true;
|
||||
@@ -1830,6 +1835,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1827,6 +1832,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
Vec3 vec3d1 = (new Vec3(x, 0.0D, z)).normalize().scale(strength);
|
||||
|
||||
this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround() ? Math.min(0.4D, vec3d.y / 2.0D + strength) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
|
||||
@ -83,10 +83,10 @@ index 8892714b9e7776183da9d9253db2c56da43319c6..06318ffaa20b2682c99c767b1ff4b66f
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 2d0a188cca46a4d580fb76baa19e85a653e87687..1b4ff79a514dd67660f6f816b4552c5a33d73563 100644
|
||||
index fbcf5ddb655e6d070f24d71bd076115739cf0254..a6b89a12471a8c7277b7a5aa50447ff275a667c6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1645,7 +1645,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@@ -1646,7 +1646,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
|
||||
if (flag) {
|
||||
if (f1 > 0.0F && target instanceof LivingEntity) {
|
||||
@ -122,7 +122,7 @@ index 29cfd065f246bbd3d3c2a5bbd32c3f4813a02951..03ec02f9a2fb5abb5387cd0d83c9481d
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index f68aef2298c3b2994c46d34b0888f988af9190dc..12906de1ee386af4c63d53742042dead280eaaf0 100644
|
||||
index 2d8a8a9c8acfcac13e5a82cda9d7be59138b6407..d4832067f87491b8273b7957ce3eec1ad3ba9830 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -458,7 +458,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@ -161,10 +161,10 @@ index 81003ce3f05c6be6f52a92b86a4721235f4ce12a..004382377ee364143a34287e7b6546ae
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 587e3529b5b658ab943b4e7ffaa235de34542e9c..78fd8e1ba0e636914108eeef96b78304a63c39c6 100644
|
||||
index 45098aa460370669abdb3619fa4b1adef6fbf282..8d40021ce31d5f8fd8a5462a80e92fb919b4b162 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1290,9 +1290,9 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1285,9 +1285,9 @@ public abstract class Player extends LivingEntity {
|
||||
if (flag5) {
|
||||
if (i > 0) {
|
||||
if (target instanceof LivingEntity) {
|
||||
@ -176,7 +176,7 @@ index 587e3529b5b658ab943b4e7ffaa235de34542e9c..78fd8e1ba0e636914108eeef96b78304
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||
@@ -1314,7 +1314,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1309,7 +1309,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||
// CraftBukkit start - Only apply knockback if the damage hits
|
||||
if (entityliving.hurt(this.damageSources().playerAttack(this).sweep(), f4)) {
|
||||
@ -186,10 +186,10 @@ index 587e3529b5b658ab943b4e7ffaa235de34542e9c..78fd8e1ba0e636914108eeef96b78304
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 8d9e78efcd07e0fea627c2a5a128c7f15cf3413c..a8caa11bd0ef045b29cc3cb452dec9fd41948045 100644
|
||||
index b24f828d39fc26b4f85f5c76010f0ba47e9fe05f..385cbee1d30735152cccb0d85a77a12fabfd9427 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -401,7 +401,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -409,7 +409,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
Vec3 vec3d = this.getDeltaMovement().multiply(1.0D, 0.0D, 1.0D).normalize().scale((double) this.knockback * 0.6D * d0);
|
||||
|
||||
if (vec3d.lengthSqr() > 0.0D) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
|
||||
Add Entity as a Source capability, and add more API choices, and on Location.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index d8066264008ade869414c505a2b55886bef74fbf..f02cb628d6e2ef303d0f4c574ae5d67a0c92da0d 100644
|
||||
index 9d111f904d20c1694436ecf5dd9c3c7738be2681..025d7c5b96e6c8a13df3d5978a558fe735f1a202 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -719,6 +719,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -720,6 +720,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
|
||||
return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled;
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
||||
How long an entity has raised hands to charge an attack or use an item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 6544b8160af89e93e508c5d466c22ba389b7621c..754a4d026bdb9b3fc7781cd5e10bf01c70d2760e 100644
|
||||
index c790cbdc16b1f5e3d59cdf58e2c9795fccdb758a..3c5d297ff8125e2c7e0a1fd10ed4b859c3ae0496 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -820,5 +820,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -825,5 +825,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setShieldBlockingDelay(int delay) {
|
||||
getHandle().setShieldBlockingDelay(delay);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f02cb628d6e2ef303d0f4c574ae5d67a0c92da0d..c6fc48c30475708378bfd4a5d36999093e5382f6 100644
|
||||
index 025d7c5b96e6c8a13df3d5978a558fe735f1a202..e78e3c4ab76c3112dd78417ea413a30f15a96e7f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1043,6 +1043,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1049,6 +1049,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return list;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ 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/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 92c847fdd2a7e3e20c8607f287c3e1ad27b9e4f7..2268babbdcd023c1ec7b3746319acf4306845fee 100644
|
||||
index ac331aef54f9e595129bded04ff6d9c7b8b7d5b0..2d3091e8ad3058952895b7fcf19b9f543f8e4935 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1451,7 +1451,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1470,7 +1470,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
|
||||
@ -19,7 +19,7 @@ index 92c847fdd2a7e3e20c8607f287c3e1ad27b9e4f7..2268babbdcd023c1ec7b3746319acf43
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2410,7 +2410,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2446,7 +2446,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
|
||||
@ -29,10 +29,10 @@ index 92c847fdd2a7e3e20c8607f287c3e1ad27b9e4f7..2268babbdcd023c1ec7b3746319acf43
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 9b670eb2925caa275cae6f51eb75183a9f5208b0..0f5e616ebb90e187ea38b6489e6f4f5467f1a9c3 100644
|
||||
index 1b56d6b05fee0aa430dab666f50c5b886c3910d0..2584e8eb867dca35e945ec7ab83bc2181d7bde26 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -685,7 +685,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -692,7 +692,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// Paper end
|
||||
if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
|
||||
@ -41,7 +41,7 @@ index 9b670eb2925caa275cae6f51eb75183a9f5208b0..0f5e616ebb90e187ea38b6489e6f4f54
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -878,7 +878,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -885,7 +885,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@ -50,7 +50,7 @@ index 9b670eb2925caa275cae6f51eb75183a9f5208b0..0f5e616ebb90e187ea38b6489e6f4f54
|
||||
}
|
||||
|
||||
net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure
|
||||
@@ -1497,7 +1497,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1509,7 +1509,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (this.containerMenu != this.inventoryMenu) {
|
||||
@ -59,7 +59,7 @@ index 9b670eb2925caa275cae6f51eb75183a9f5208b0..0f5e616ebb90e187ea38b6489e6f4f54
|
||||
}
|
||||
|
||||
// this.nextContainerCounter(); // CraftBukkit - moved up
|
||||
@@ -1525,7 +1525,13 @@ public class ServerPlayer extends Player {
|
||||
@@ -1537,7 +1537,13 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public void closeContainer() {
|
||||
@ -75,10 +75,10 @@ index 9b670eb2925caa275cae6f51eb75183a9f5208b0..0f5e616ebb90e187ea38b6489e6f4f54
|
||||
this.doCloseContainer();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 598b442f84df4562811986cfb5e8614e74df2cc0..04d1aee392330301bdc14966dccd11f5aad610d6 100644
|
||||
index 520de61cd21d71f8c77175977987091e3caa0be9..9c8d5ccc82aafe455ec39e61af60d8a634278d1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -215,6 +215,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType;
|
||||
import org.bukkit.event.inventory.CraftItemEvent;
|
||||
import org.bukkit.event.inventory.InventoryAction;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
@ -86,7 +86,7 @@ index 598b442f84df4562811986cfb5e8614e74df2cc0..04d1aee392330301bdc14966dccd11f5
|
||||
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.inventory.SmithItemEvent;
|
||||
@@ -2524,10 +2525,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2532,10 +2533,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleContainerClose(ServerboundContainerClosePacket packet) {
|
||||
@ -104,10 +104,10 @@ index 598b442f84df4562811986cfb5e8614e74df2cc0..04d1aee392330301bdc14966dccd11f5
|
||||
this.player.doCloseContainer();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d767d9259877ecf250d624a489e3f322df318e55..12448b92ffe848c540fffbc58f8e377ee631ff48 100644
|
||||
index 3564d97af63494ede27941b63a7255239fa8a126..577d427defdb82f5c6c1d8f766c51653f7b6de52 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -520,7 +520,7 @@ public abstract class PlayerList {
|
||||
@@ -518,7 +518,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
||||
// See SPIGOT-5799, SPIGOT-6145
|
||||
if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
|
||||
@ -117,10 +117,10 @@ index d767d9259877ecf250d624a489e3f322df318e55..12448b92ffe848c540fffbc58f8e377e
|
||||
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 78fd8e1ba0e636914108eeef96b78304a63c39c6..c2935b00737418749fc8c20624a1f6792ba7d071 100644
|
||||
index 8d40021ce31d5f8fd8a5462a80e92fb919b4b162..0d8261e15a1a66df17727788c387dca8fbe2ae84 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -270,7 +270,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -265,7 +265,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.updateIsUnderwater();
|
||||
super.tick();
|
||||
if (!this.level().isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) {
|
||||
@ -144,10 +144,10 @@ index 78fd8e1ba0e636914108eeef96b78304a63c39c6..c2935b00737418749fc8c20624a1f679
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 602cf19007c622ab9bb12a7018643cf05688f33e..607dc510ac856a0bf3a54bf1004bdf98825131e7 100644
|
||||
index 7d6301ae9ee2added007b0c68ffabe5d79f7be62..801dca6bbafd6e1825a1291fc128efc165f4c8d1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -376,7 +376,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -377,7 +377,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (((ServerPlayer) this.getHandle()).connection == null) return;
|
||||
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
|
||||
// fire INVENTORY_CLOSE if one already open
|
||||
@ -156,7 +156,7 @@ index 602cf19007c622ab9bb12a7018643cf05688f33e..607dc510ac856a0bf3a54bf1004bdf98
|
||||
}
|
||||
ServerPlayer player = (ServerPlayer) this.getHandle();
|
||||
AbstractContainerMenu container;
|
||||
@@ -446,8 +446,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -447,8 +447,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
@ -173,10 +173,10 @@ index 602cf19007c622ab9bb12a7018643cf05688f33e..607dc510ac856a0bf3a54bf1004bdf98
|
||||
@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 10c9ced5f306b71eeb77ecc9c4e95ef7de3460e8..3ec5ce75a12f7463b73fb11692b545f13ed109dd 100644
|
||||
index f93e5812cc239ff69d22a53ac52be2c71203ad07..32ab12fb28f334258d1c612cddf25a82cebc27a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1193,7 +1193,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1200,7 +1200,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
// Close any foreign inventory
|
||||
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
|
||||
@ -186,7 +186,7 @@ index 10c9ced5f306b71eeb77ecc9c4e95ef7de3460e8..3ec5ce75a12f7463b73fb11692b545f1
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index a85c6e0fe88d285908578f05562ede92a0ae336b..8267af8592cf09051a17f594b98b50dce3493767 100644
|
||||
index 3b267a9a22a735af6f12427136816578c4a1e681..4d795ac868879a78d6893f9e93090038e3f1c678 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1334,7 +1334,7 @@ public class CraftEventFactory {
|
||||
@ -198,7 +198,7 @@ index a85c6e0fe88d285908578f05562ede92a0ae336b..8267af8592cf09051a17f594b98b50dc
|
||||
}
|
||||
|
||||
CraftServer server = player.level().getCraftServer();
|
||||
@@ -1522,8 +1522,18 @@ public class CraftEventFactory {
|
||||
@@ -1521,8 +1521,18 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
|
||||
cancelled to avoid this problem.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 04d1aee392330301bdc14966dccd11f5aad610d6..6de25b8230da167afb363f443597df383d3b8ca6 100644
|
||||
index 9c8d5ccc82aafe455ec39e61af60d8a634278d1a..9bc84ea2fbbc2f6f6e7358a5d595aafd20c10d74 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2405,6 +2405,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2413,6 +2413,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
||||
UUID, ticks lived, valid, dead
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7c4569fd5b331576be43fbdab30721134ea101fa..ef806837fd58a75d64da95e00e843a5ea0f32613 100644
|
||||
index 0141b58ed74234a63820b6557687a24611d463be..5389230ffb27480012f86e882bf53cf24aa31686 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3173,7 +3173,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3202,7 +3202,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public String toString() {
|
||||
String s = this.level() == null ? "~NULL~" : this.level().toString();
|
||||
|
@ -151,7 +151,7 @@ index f17e9c6c91c02e0d36f58851522a5d3e5e423121..82b0bda3e35ec2157a477e1a17b2b46b
|
||||
|
||||
return InteractionResult.sidedSuccess(level.isClientSide);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/LingeringPotionItem.java b/src/main/java/net/minecraft/world/item/LingeringPotionItem.java
|
||||
index db0492f6337de562210ef062f46e98992c908200..f2d1b4e3fc08f6a06beb391bc6e60f62a9bf82b9 100644
|
||||
index 04370590e6c8051ad17f937576b4cd88f6afb5d9..95ee59a831bdbf7364d917e7169d736fecf76076 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/LingeringPotionItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/LingeringPotionItem.java
|
||||
@@ -23,7 +23,12 @@ public class LingeringPotionItem extends ThrowablePotionItem {
|
||||
@ -267,10 +267,10 @@ index 0673f62f25532955f3552b64f122e644d42027e4..de5bdceb4c8578fb972a2fd5ee0dfdae
|
||||
return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
index 216ae3fbc6d64538255ad404ad7e9915d6694f81..8078f127ff4b6e0aafb5804b9c02e237f79445b5 100644
|
||||
index 2ccbba4775d7550c5c7277aee9cab9ff7d665693..5fab851b319847035fb1eefd0ab999de3ccc2cd8 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
|
||||
@@ -83,21 +83,25 @@ public class TridentItem extends Item implements Vanishable {
|
||||
@@ -83,21 +83,26 @@ public class TridentItem extends Item implements Vanishable {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@ -284,13 +284,13 @@ index 216ae3fbc6d64538255ad404ad7e9915d6694f81..8078f127ff4b6e0aafb5804b9c02e237
|
||||
}
|
||||
return;
|
||||
}
|
||||
-
|
||||
|
||||
+ if (event.shouldConsume()) { // Paper
|
||||
stack.hurtAndBreak(1, entityhuman, (entityhuman1) -> {
|
||||
entityhuman1.broadcastBreakEvent(user.getUsedItemHand());
|
||||
});
|
||||
+ } // Paper
|
||||
entitythrowntrident.tridentItem = stack.copy(); // SPIGOT-4511 update since damage call moved
|
||||
entitythrowntrident.pickupItemStack = stack.copy(); // SPIGOT-4511 update since damage call moved
|
||||
// CraftBukkit end
|
||||
|
||||
world.playSound((Player) null, (Entity) entitythrowntrident, SoundEvents.TRIDENT_THROW, SoundSource.PLAYERS, 1.0F, 1.0F);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 5a838c7070fc5ed8f8f2fdb0073221f4c22e1334..228aed6b75296cf0eb9d611c2396b6a8b6e8018b 100644
|
||||
index c9c773cce59e795ed0d8449a6e70b4b968a4e5e8..eb4f8d3a0012f5732a2faa53d0b886da593ed43a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -337,6 +337,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@ -17,10 +17,10 @@ index 5a838c7070fc5ed8f8f2fdb0073221f4c22e1334..228aed6b75296cf0eb9d611c2396b6a8
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index be48f90db79509035a87103f20582fb2500449ad..b52a761e84e00f2ccac7b1b9db73e70ffa1c681b 100644
|
||||
index 82cd225802ecc518c34426c010525192ef544f34..0dce77c1e773d2dd9c3471b2a71ba6aaa76f9054 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -849,6 +849,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -860,6 +860,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end
|
||||
}
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Vanished players don't have rights
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index e9ae25a70c747c173ebd2e393818d205527d5314..f49dd279ba9e8970f116f956466feb072c4f8420 100644
|
||||
index e8620ad6be2dda7fe288f884c4ae88a924be4a62..01a2c6c3ee4e1500b6ee9986943f84dbe8663860 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -217,6 +217,15 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -237,6 +237,15 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
} else {
|
||||
Entity entity1 = this.getOwner();
|
||||
|
||||
@ -39,10 +39,10 @@ index a6638e626600e4304a973497a39e3fac52203b16..e68b7a1b03783e4f9de24c5ae8773fc3
|
||||
|
||||
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index b52a761e84e00f2ccac7b1b9db73e70ffa1c681b..f17cc5da4eb4b4e5bcfae8b234358464f6188f4a 100644
|
||||
index 0dce77c1e773d2dd9c3471b2a71ba6aaa76f9054..7181c3cf67e367cc8f2d0ef3bf8a74ff6c8ff2aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -273,6 +273,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -276,6 +276,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ index b52a761e84e00f2ccac7b1b9db73e70ffa1c681b..f17cc5da4eb4b4e5bcfae8b234358464
|
||||
public boolean isClientSide() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 8267af8592cf09051a17f594b98b50dce3493767..653fef73f60f4312b59533b4edc72020d3875d78 100644
|
||||
index 4d795ac868879a78d6893f9e93090038e3f1c678..f55b1ccaab6f6bec89d92f79995abf331ea87c98 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1371,6 +1371,14 @@ public class CraftEventFactory {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling armour stand ticking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 228aed6b75296cf0eb9d611c2396b6a8b6e8018b..1047d9a46314e264ab3f72122aedefd161c7851d 100644
|
||||
index eb4f8d3a0012f5732a2faa53d0b886da593ed43a..f542119628051b20afc0780a3bfa2125b68fdc58 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -93,9 +93,16 @@ public class ArmorStand extends LivingEntity {
|
||||
@ -54,7 +54,7 @@ index 228aed6b75296cf0eb9d611c2396b6a8b6e8018b..1047d9a46314e264ab3f72122aedefd1
|
||||
CompoundTag nbttagcompound1 = nbt.getCompound("Pose");
|
||||
|
||||
this.readPose(nbttagcompound1);
|
||||
@@ -671,7 +686,29 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -658,7 +673,29 @@ public class ArmorStand extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -84,7 +84,7 @@ index 228aed6b75296cf0eb9d611c2396b6a8b6e8018b..1047d9a46314e264ab3f72122aedefd1
|
||||
Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE);
|
||||
|
||||
if (!this.headPose.equals(vector3f)) {
|
||||
@@ -800,31 +837,37 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -787,31 +824,37 @@ public class ArmorStand extends LivingEntity {
|
||||
public void setHeadPose(Rotations angle) {
|
||||
this.headPose = angle;
|
||||
this.entityData.set(ArmorStand.DATA_HEAD_POSE, angle);
|
@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set.
|
||||
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 4fa1085532e9374aad3c877ca6aba1b251640cc8..221a2ccc4bf840aa301931f26c1198b36ec317fe 100644
|
||||
index 550d3290c974eebdeb4bf9b90987448c5d3d2999..93a9d53c29d9b359d9d8618254085b7fcebe8cdf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -678,7 +678,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
@@ -681,7 +681,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
|
||||
@Override
|
||||
public boolean hasItemMeta() {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 12906de1ee386af4c63d53742042dead280eaaf0..65e1aa3b2d3a8af997ccf8e259ca60e0fd73f34d 100644
|
||||
index d4832067f87491b8273b7957ce3eec1ad3ba9830..c00d4b8e39ef90bb06098bee290203502bd4225b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -558,6 +558,11 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@ -21,10 +21,10 @@ index 12906de1ee386af4c63d53742042dead280eaaf0..65e1aa3b2d3a8af997ccf8e259ca60e0
|
||||
|
||||
this.level().removeBlock(blockposition, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
index 3804490e93bb43444ab3236205888792b54f7074..9cda3353c033b3fb4e34a8a0e2cc4085fec9cdaa 100644
|
||||
index 016c8b7762c2b4eacb95a455940db4684b34e03c..80e90bae3c05bbaf978a66629d9c4132c22efd1a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -295,12 +295,19 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -302,12 +302,19 @@ public class FireBlock extends BaseFireBlock {
|
||||
|
||||
world.setBlock(blockposition, this.getStateWithAge(world, blockposition, l), 3);
|
||||
} else {
|
||||
@ -46,10 +46,10 @@ index 3804490e93bb43444ab3236205888792b54f7074..9cda3353c033b3fb4e34a8a0e2cc4085
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java
|
||||
index e9c04432c0252a019644f439e513e89fd01837a3..ed90d126e317612f40b101b559a94aabf9ad7ee2 100644
|
||||
index cc20c320cbb3420e5e302a94571bab374c8553c8..443a8a8e2f0791a1455193cb125e1560f5d1edab 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TntBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java
|
||||
@@ -42,6 +42,12 @@ public class TntBlock extends Block {
|
||||
@@ -49,6 +49,12 @@ public class TntBlock extends Block {
|
||||
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
||||
if (!oldState.is(state.getBlock())) {
|
||||
if (world.hasNeighborSignal(pos) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent
|
||||
@ -62,7 +62,7 @@ index e9c04432c0252a019644f439e513e89fd01837a3..ed90d126e317612f40b101b559a94aab
|
||||
TntBlock.explode(world, pos);
|
||||
world.removeBlock(pos, false);
|
||||
}
|
||||
@@ -52,6 +58,12 @@ public class TntBlock extends Block {
|
||||
@@ -59,6 +65,12 @@ public class TntBlock extends Block {
|
||||
@Override
|
||||
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
||||
if (world.hasNeighborSignal(pos) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.REDSTONE, null, sourcePos)) { // CraftBukkit - TNTPrimeEvent
|
||||
@ -75,7 +75,7 @@ index e9c04432c0252a019644f439e513e89fd01837a3..ed90d126e317612f40b101b559a94aab
|
||||
TntBlock.explode(world, pos);
|
||||
world.removeBlock(pos, false);
|
||||
}
|
||||
@@ -70,6 +82,13 @@ public class TntBlock extends Block {
|
||||
@@ -77,6 +89,13 @@ public class TntBlock extends Block {
|
||||
@Override
|
||||
public void wasExploded(Level world, BlockPos pos, Explosion explosion) {
|
||||
if (!world.isClientSide) {
|
||||
@ -89,7 +89,7 @@ index e9c04432c0252a019644f439e513e89fd01837a3..ed90d126e317612f40b101b559a94aab
|
||||
PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosion.getIndirectSourceEntity());
|
||||
int i = entitytntprimed.getFuse();
|
||||
|
||||
@@ -104,6 +123,12 @@ public class TntBlock extends Block {
|
||||
@@ -111,6 +130,12 @@ public class TntBlock extends Block {
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -102,7 +102,7 @@ index e9c04432c0252a019644f439e513e89fd01837a3..ed90d126e317612f40b101b559a94aab
|
||||
TntBlock.explode(world, pos, player);
|
||||
world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11);
|
||||
Item item = itemstack.getItem();
|
||||
@@ -135,6 +160,12 @@ public class TntBlock extends Block {
|
||||
@@ -142,6 +167,12 @@ public class TntBlock extends Block {
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
|
||||
plugins doing unsafe things.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6de25b8230da167afb363f443597df383d3b8ca6..3e6430d5769afbe308703e61f7fb7474811fdf38 100644
|
||||
index 9bc84ea2fbbc2f6f6e7358a5d595aafd20c10d74..01ae910d5997981ddbe400a057bb83932e89cbc0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -253,6 +253,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -257,6 +257,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
private int ackBlockChangesUpTo = -1;
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||
@ -33,7 +33,7 @@ index 6de25b8230da167afb363f443597df383d3b8ca6..3e6430d5769afbe308703e61f7fb7474
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -372,6 +373,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -375,6 +376,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.keepConnectionAlive();
|
||||
// CraftBukkit start
|
||||
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
|
||||
@ -41,7 +41,7 @@ index 6de25b8230da167afb363f443597df383d3b8ca6..3e6430d5769afbe308703e61f7fb7474
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -697,7 +699,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -700,7 +702,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async
|
||||
// CraftBukkit start
|
@ -8,7 +8,7 @@ Addresses two issues:
|
||||
- Allay duplication cooldown is saved and exposed as a long, but loaded as an int
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index 2a192d0c1de8ab5440daacf591ff08f74cff9ff3..37cd883f4920d5e1e58900ebdcfd4495a0abd2ae 100644
|
||||
index 7eb84b1aad4f031ad17a461d174b23c213014995..cab5636fe6be9ee7f23ffbd5a399d2aeea1cd538 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -295,7 +295,7 @@ public class ExperienceOrb extends Entity {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary itemmeta handling
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
index 9c211b0db837b16d50aee63d0caf45e1a12bcc83..2e395962b555bef0ce1a98e1d768e7738f011535 100644
|
||||
index 00beadec2ad995d724758d051457a3d780d9d813..ff794499df6a2b65db2ca5956d2b98317592057f 100644
|
||||
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
@@ -641,7 +641,7 @@ public class FriendlyByteBuf extends ByteBuf {
|
@ -29,10 +29,10 @@ index ea520b828378c268d05425096c6493ca1c7ad385..8d3a9f8210bf529484aeaf84ef9a55b5
|
||||
|
||||
protected void tick() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2268babbdcd023c1ec7b3746319acf4306845fee..c9f22e24223c409a7a3aec668f02a59ed5102524 100644
|
||||
index 2d3091e8ad3058952895b7fcf19b9f543f8e4935..08a1fdd0b6fb688897a7813e8c298265afedf02b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -221,6 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -223,6 +223,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
@ -42,7 +42,7 @@ index 2268babbdcd023c1ec7b3746319acf4306845fee..c9f22e24223c409a7a3aec668f02a59e
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
@@ -1413,7 +1416,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1432,7 +1435,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||
@ -72,10 +72,10 @@ index 2268babbdcd023c1ec7b3746319acf4306845fee..c9f22e24223c409a7a3aec668f02a59e
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ef806837fd58a75d64da95e00e843a5ea0f32613..d8528c84c9cc1724b5100276ba624cf8627dc6ce 100644
|
||||
index 5389230ffb27480012f86e882bf53cf24aa31686..c8e0d0126c1a6eaded7c4a37f2da8ce1bf9bfadd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -238,6 +238,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -239,6 +239,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
@ -85,10 +85,10 @@ index ef806837fd58a75d64da95e00e843a5ea0f32613..d8528c84c9cc1724b5100276ba624cf8
|
||||
if (this.bukkitEntity == null) {
|
||||
this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index f17cc5da4eb4b4e5bcfae8b234358464f6188f4a..baee74186c6349efb8e5e9ff087a114c08c7ae72 100644
|
||||
index 7181c3cf67e367cc8f2d0ef3bf8a74ff6c8ff2aa..eec83b6c00fee271fdeb12bd8b812439d1dc4d3b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -150,6 +150,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -153,6 +153,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean pvpMode;
|
||||
public boolean keepSpawnInMemory = true;
|
||||
public org.bukkit.generator.ChunkGenerator generator;
|
@ -9,19 +9,19 @@ thread dumps at an interval until the point of crash.
|
||||
This will help diagnose what was going on in that time before the crash.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index beebc3ed13b200a0d6585387bb7e06a6aaa07940..88c1c7d0dd8efddcde6d8d81cb89b09c2f6fee2a 100644
|
||||
index 65625a84de2980f4d719cf5a2bec205cd1f3d835..a2daac80fcbe51b7b68ab01416f052d01267f3fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1029,6 +1029,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1075,6 +1075,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
// Spigot start
|
||||
+ org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( this.recentTps, 20 );
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
long tickSection = Util.getNanos(), curTime, tickCount = 1; // Paper
|
||||
while (this.running) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 567c8fdbb0e21ec9cfc511f8c7487340785d3c62..3e0217cb096ba7a8f589c052db170b84e4d41ddf 100644
|
||||
index fc2a55735b22f5a25d009a7157624fb0cdc853c0..adae2d7f9ced8ce6d2e15aafb8b53ef85e79b6d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -197,6 +197,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -33,10 +33,10 @@ index 567c8fdbb0e21ec9cfc511f8c7487340785d3c62..3e0217cb096ba7a8f589c052db170b84
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 32f57ed7bb7c203ac126a4a0877e08c966c1638c..5c39a02cb9db3d6c45b5cfe845a9be79cf7a1574 100644
|
||||
index 91598abecda54206f177976d4c7eed99bd949993..b0de5cfd60a61fcea681f95dabbdc16beeb4242d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -919,6 +919,7 @@ public final class CraftServer implements Server {
|
||||
@@ -914,6 +914,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
@ -44,7 +44,7 @@ index 32f57ed7bb7c203ac126a4a0877e08c966c1638c..5c39a02cb9db3d6c45b5cfe845a9be79
|
||||
this.reloadCount++;
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
||||
@@ -1008,6 +1009,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1003,6 +1004,7 @@ public final class CraftServer implements Server {
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
|
@ -23,10 +23,10 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
|
||||
The point of this is readability, but does have a side-benefit of a small microptimization
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 12448b92ffe848c540fffbc58f8e377ee631ff48..3cd1563480d40ff358dce52891ba4bdc8d119888 100644
|
||||
index 577d427defdb82f5c6c1d8f766c51653f7b6de52..b76024a8dce1ef79f6cbff7403daffd214d7b850 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -636,7 +636,7 @@ public abstract class PlayerList {
|
||||
@@ -634,7 +634,7 @@ public abstract class PlayerList {
|
||||
} else if (!this.isWhiteListed(gameprofile, event)) { // Paper
|
||||
//ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
|
||||
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands
|
||||
Lists are bad as Queues mmmkay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 3e0217cb096ba7a8f589c052db170b84e4d41ddf..97f80226793e700c8b05e41005bb2751a6b00f33 100644
|
||||
index adae2d7f9ced8ce6d2e15aafb8b53ef85e79b6d1..90b261b23f6731f60a7d4f412a6bf4c6c6aa7095 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -69,7 +69,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren