Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
304e83eb PR-1002: Improve documentation and implementation of getMaxStackSize
e8215ea2 SPIGOT-7638: Library loader does not seem to resolve every dependency
79c595c0 SPIGOT-7637: Bad logic in checking nullability of AttributeModifier slots

CraftBukkit Changes:
91b1fc3f1 SPIGOT-7644: Fix ItemMeta#getAsString
4e77a81e1 SPIGOT-7615: PlayerLeashEntityEvent cancelled eats lead
996f660f3 Do not remove leash knot if leasing to an existing leash knot gets cancelled
f70367d42 SPIGOT-7643: Fix inverted leash event cancelled usage and remove leash knot if no entity gets leashed
7ddb48294 SPIGOT-7640: Abnormal jumping height of wind charge
080c8711e SPIGOT-7639: Incoming plugin channels not working
ad549847e Open a direct connection instead of pinging mojang server to check if it is reachable
38e2926c5 SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime
This commit is contained in:
Jake Potrebic 2024-04-27 18:00:01 -07:00
parent d964c15e15
commit 3e90a19183
No known key found for this signature in database
GPG Key ID: ECE0B3C133C016C5
196 changed files with 435 additions and 439 deletions

View File

@ -3,7 +3,7 @@ version=1.20.5-R0.1-SNAPSHOT
mcVersion=1.20.5
# Set to true while updating Minecraft version
updatingMinecraft=true
updatingMinecraft=false
org.gradle.caching=true
org.gradle.parallel=true

View File

@ -21,6 +21,7 @@ dependencies {
}
tasks.register<JavaExec>("generate") {
dependsOn(tasks.check)
mainClass.set("io.papermc.generator.Main")
classpath(sourceSets.main.map { it.runtimeClasspath })
args(projectDir.toPath().resolve("generated").toString())

View File

@ -4323,7 +4323,7 @@ index 60ebfab9596f26cfd2d75a43f3f88f2dd56575f3..dbaf54018a7dd392378869a5a302a880
+ // Paper end - Adventure
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index cf1733bc76d1e29ad0f533f6e49818f83e8e3358..f2a6f62f0344684668febc0999b81748c6737826 100644
index 257b5db1aa58d57cfbf5bd1f17f9df6c509bef90..53cc84d1ef6e281e8637ec7406236e1185ad7d82 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable;
@ -4335,7 +4335,7 @@ index cf1733bc76d1e29ad0f533f6e49818f83e8e3358..f2a6f62f0344684668febc0999b81748
private Material type = Material.AIR;
private int amount = 0;
private MaterialData data = null;
@@ -614,4 +614,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -617,4 +617,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public String getTranslationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}

View File

@ -2062,7 +2062,7 @@ index 047c0304fd617cec990f80815b43916c6ef5a94c..ab04ffe4cd05315a2ee0f64c553b4c67
throw ex;
} catch (Throwable ex) {
diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
index 6d634b0ea813ccb19f1562a7d0e5a59cea4eab21..653135352c104a6ddeb74a1b6d4916c6952d6271 100644
index 160f8c348271154c672adf936b358ffeb3b63e69..f4d655a158410039305ac68cebe0d79000f73df8 100644
--- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
@@ -36,7 +36,10 @@ import org.eclipse.aether.transport.http.HttpTransporterFactory;
@ -2085,7 +2085,7 @@ index 6d634b0ea813ccb19f1562a7d0e5a59cea4eab21..653135352c104a6ddeb74a1b6d4916c6
session.setChecksumPolicy( RepositoryPolicy.CHECKSUM_POLICY_FAIL );
session.setLocalRepositoryManager( repository.newLocalRepositoryManager( session, new LocalRepository( "libraries" ) ) );
session.setTransferListener( new AbstractTransferListener()
@@ -79,7 +83,7 @@ class LibraryLoader
@@ -84,7 +88,7 @@ class LibraryLoader
}
logger.log( Level.INFO, "[{0}] Loading {1} libraries... please wait", new Object[]
{
@ -2094,7 +2094,7 @@ index 6d634b0ea813ccb19f1562a7d0e5a59cea4eab21..653135352c104a6ddeb74a1b6d4916c6
} );
List<Dependency> dependencies = new ArrayList<>();
@@ -117,7 +121,7 @@ class LibraryLoader
@@ -122,7 +126,7 @@ class LibraryLoader
jarFiles.add( url );
logger.log( Level.INFO, "[{0}] Loaded library {1}", new Object[]
{

View File

@ -33,10 +33,10 @@ index dbaf54018a7dd392378869a5a302a880c7a56338..213e3f3de731d85f788a4bfa8d912e1b
+ // Paper end - add getI18NDisplayName
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index f2a6f62f0344684668febc0999b81748c6737826..d1bce73317fa1dfd35c8b3f94415ba8721c758d6 100644
index 53cc84d1ef6e281e8637ec7406236e1185ad7d82..22bb39a8f124d55b1dce1bcb981a94d763959e59 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -630,5 +630,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -633,5 +633,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public net.kyori.adventure.text.@NotNull Component displayName() {
return Bukkit.getServer().getItemFactory().displayName(this);
}

View File

@ -30,10 +30,10 @@ index 213e3f3de731d85f788a4bfa8d912e1b59c3c045..898c256140cc7fee2c0cc65cca33a0e8
+ // Paper end - ensure server conversions API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index d1bce73317fa1dfd35c8b3f94415ba8721c758d6..a71b7f418ca3edb4695b57e5021732c591cfb13f 100644
index 22bb39a8f124d55b1dce1bcb981a94d763959e59..0586a64b780f0dee9899a42ca4ee28d12efd749a 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -549,7 +549,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -552,7 +552,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
}
}
@ -42,7 +42,7 @@ index d1bce73317fa1dfd35c8b3f94415ba8721c758d6..a71b7f418ca3edb4695b57e5021732c5
}
/**
@@ -631,6 +631,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -634,6 +634,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return Bukkit.getServer().getItemFactory().displayName(this);
}

View File

@ -6,10 +6,10 @@ 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/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index a71b7f418ca3edb4695b57e5021732c591cfb13f..7afb1b4fde29d09ad2289956531daded56b02147 100644
index 0586a64b780f0dee9899a42ca4ee28d12efd749a..b92a86e9d128b1ce6f02962574e30ced74e44bc8 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -658,5 +658,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -661,5 +661,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public String getI18NDisplayName() {
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 7afb1b4fde29d09ad2289956531daded56b02147..c1e64e09d792da7c7918e401b306f8945a0ff32d 100644
index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a655b2a94a 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -3,6 +3,7 @@ package org.bukkit.inventory;
@ -16,7 +16,7 @@ index 7afb1b4fde29d09ad2289956531daded56b02147..c1e64e09d792da7c7918e401b306f894
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@@ -666,5 +667,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -669,5 +670,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
// Requires access to NMS
return ensureServerConversions().getMaxItemUseDuration();
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index fe9c5ccdbaf4a83367f2d1c9c18044665eadf81d..ab4c1d853ed030c6cf2945793e7655509c954f0b 100644
index 2750e143a3ac20797e16a15b687952157197d562..c2808db693647bdf3b9617cb6c665e8499874485 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -123,6 +123,7 @@ import org.jetbrains.annotations.Nullable;
@@ -125,6 +125,7 @@ import org.jetbrains.annotations.Nullable;
/**
* An enum of all material IDs accepted by the official server and client
*/
@ -16,7 +16,7 @@ index fe9c5ccdbaf4a83367f2d1c9c18044665eadf81d..ab4c1d853ed030c6cf2945793e765550
public enum Material implements Keyed, Translatable {
//<editor-fold desc="Materials" defaultstate="collapsed">
AIR(9648, 0),
@@ -4723,6 +4724,22 @@ public enum Material implements Keyed, Translatable {
@@ -4725,6 +4726,22 @@ public enum Material implements Keyed, Translatable {
}
}

View File

@ -300,10 +300,10 @@ index 02b4ffa6b918269bd64f7c518fcceef1f6990737..f0878c7539696cc0676e6010e88914d3
if (this.world == null) {
return null;
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index ab4c1d853ed030c6cf2945793e7655509c954f0b..22459bc96a97734b06985dc3a8ff4358f280f505 100644
index c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332c992d3d1 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4744,20 +4744,20 @@ public enum Material implements Keyed, Translatable {
@@ -4746,20 +4746,20 @@ public enum Material implements Keyed, Translatable {
* Do not use for any reason.
*
* @return ID of this material
@ -328,7 +328,7 @@ index ab4c1d853ed030c6cf2945793e7655509c954f0b..22459bc96a97734b06985dc3a8ff4358
public boolean isLegacy() {
return legacy;
}
@@ -4828,8 +4828,10 @@ public enum Material implements Keyed, Translatable {
@@ -4835,8 +4835,10 @@ public enum Material implements Keyed, Translatable {
* Gets the MaterialData class associated with this Material
*
* @return MaterialData associated with this Material
@ -339,7 +339,7 @@ index ab4c1d853ed030c6cf2945793e7655509c954f0b..22459bc96a97734b06985dc3a8ff4358
public Class<? extends MaterialData> getData() {
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
return ctor.getDeclaringClass();
@@ -9096,7 +9098,11 @@ public enum Material implements Keyed, Translatable {
@@ -9103,7 +9105,11 @@ public enum Material implements Keyed, Translatable {
* material.
*
* @return true if this material can be interacted with.
@ -1412,7 +1412,7 @@ index 898c256140cc7fee2c0cc65cca33a0e86275f115..e34c89a945a0f12cdc4be8cc232c8de9
/**
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index c1e64e09d792da7c7918e401b306f8945a0ff32d..aa8c6a57fb78fcb2e5ecff01f5d2f5871ac4161a 100644
index e388239d6d960af2102111d2ae90b2a655b2a94a..276cfd52817115981fe7dc46363278f8b8c5aee3 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -8,6 +8,7 @@ import java.util.Map;
@ -1444,7 +1444,7 @@ index c1e64e09d792da7c7918e401b306f8945a0ff32d..aa8c6a57fb78fcb2e5ecff01f5d2f587
public void setData(@Nullable MaterialData data) {
if (data == null) {
this.data = data;
@@ -558,7 +563,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -561,7 +566,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
*
* @return a copy of the current ItemStack's ItemData
*/

View File

@ -20,10 +20,10 @@ index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index aa8c6a57fb78fcb2e5ecff01f5d2f5871ac4161a..65fc0bca47ea32069ddc6e838a0db28f13638390 100644
index 276cfd52817115981fe7dc46363278f8b8c5aee3..e82eeadc7cb53572351670761c4e592a33345c6b 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -650,6 +650,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -653,6 +653,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
}

View File

@ -144,10 +144,10 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 22459bc96a97734b06985dc3a8ff4358f280f505..afdd4288b0df3e4d89ed4701ea9ec742028fc956 100644
index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa3074560d1459e 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -124,7 +124,7 @@ import org.jetbrains.annotations.Nullable;
@@ -126,7 +126,7 @@ import org.jetbrains.annotations.Nullable;
* An enum of all material IDs accepted by the official server and client
*/
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
@ -156,7 +156,7 @@ index 22459bc96a97734b06985dc3a8ff4358f280f505..afdd4288b0df3e4d89ed4701ea9ec742
//<editor-fold desc="Materials" defaultstate="collapsed">
AIR(9648, 0),
STONE(22948),
@@ -4738,6 +4738,15 @@ public enum Material implements Keyed, Translatable {
@@ -4740,6 +4740,15 @@ public enum Material implements Keyed, Translatable {
}
return false;
}
@ -172,7 +172,7 @@ index 22459bc96a97734b06985dc3a8ff4358f280f505..afdd4288b0df3e4d89ed4701ea9ec742
// Paper end
/**
@@ -11474,9 +11483,11 @@ public enum Material implements Keyed, Translatable {
@@ -11481,9 +11490,11 @@ public enum Material implements Keyed, Translatable {
* material
* @see #getBlockTranslationKey()
* @see #getItemTranslationKey()
@ -480,7 +480,7 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
+
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 65fc0bca47ea32069ddc6e838a0db28f13638390..96b6052c198454f06f877fc7cda85a98c0ddba7c 100644
index e82eeadc7cb53572351670761c4e592a33345c6b..645cff10eef90826bb44bbe937b141289f182cde 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
@ -492,7 +492,7 @@ index 65fc0bca47ea32069ddc6e838a0db28f13638390..96b6052c198454f06f877fc7cda85a98
private Material type = Material.AIR;
private int amount = 0;
private MaterialData data = null;
@@ -617,6 +617,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -620,6 +620,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@Override
@NotNull
@ -500,7 +500,7 @@ index 65fc0bca47ea32069ddc6e838a0db28f13638390..96b6052c198454f06f877fc7cda85a98
public String getTranslationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}
@@ -876,5 +877,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -879,5 +880,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
ItemMeta itemMeta = getItemMeta();
return itemMeta != null && itemMeta.hasItemFlag(flag);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Cache the result of Material#isBlock
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index afdd4288b0df3e4d89ed4701ea9ec742028fc956..3ee36de0ee975dc300e594b17d0dc2c06edf2a16 100644
index 61e0739f002a949a204c7591dfa3074560d1459e..5aa595860c73e78cf3c9f2a8984c62744cfe5612 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4682,6 +4682,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4684,6 +4684,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public final Class<?> data;
private final boolean legacy;
private final NamespacedKey key;
@ -16,7 +16,7 @@ index afdd4288b0df3e4d89ed4701ea9ec742028fc956..3ee36de0ee975dc300e594b17d0dc2c0
private Material(final int id) {
this(id, 64);
@@ -4880,6 +4881,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4887,6 +4888,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* @return true if this material is a block
*/
public boolean isBlock() {
@ -28,7 +28,7 @@ index afdd4288b0df3e4d89ed4701ea9ec742028fc956..3ee36de0ee975dc300e594b17d0dc2c0
switch (this) {
//<editor-fold defaultstate="collapsed" desc="isBlock">
case ACACIA_BUTTON:
@@ -6124,6 +6130,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -6131,6 +6137,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
static {
for (Material material : values()) {
BY_NAME.put(material.name(), material);

View File

@ -43,10 +43,10 @@ index 0000000000000000000000000000000000000000..f1cd5a4f37eee8975ac3d0421b524afc
+ }
+}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 3ee36de0ee975dc300e594b17d0dc2c06edf2a16..2ce1d9239d08c799d53873563646f933211a902e 100644
index 5aa595860c73e78cf3c9f2a8984c62744cfe5612..1e4ebe9bdc6aadf18029377e7ce70ca0d88bd1a1 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4748,6 +4748,19 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4750,6 +4750,19 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
return Bukkit.getUnsafe().getBlockTranslationKey(this);
}
}
@ -108,10 +108,10 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 96b6052c198454f06f877fc7cda85a98c0ddba7c..f9b0b463f9920524eab7f328bc456a30eebc6910 100644
index 645cff10eef90826bb44bbe937b141289f182cde..a92421bbf0ee40ecbe4f272459c6a918dc45344c 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -888,5 +888,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -891,5 +891,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public @NotNull String translationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}

View File

@ -25,10 +25,10 @@ index a874faec93468c83fc475b60629fc36f933bd11c..4130481843c9e0b847bd656622b0c110
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index f9b0b463f9920524eab7f328bc456a30eebc6910..2fb521dc2b4d991f56288e2faba978d9d7d29a0b 100644
index a92421bbf0ee40ecbe4f272459c6a918dc45344c..04ff6579282708c48edee419381c698707fe0a3b 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -900,5 +900,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -903,5 +903,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public io.papermc.paper.inventory.ItemRarity getRarity() {
return io.papermc.paper.inventory.ItemRarity.valueOf(this.getItemMeta().getRarity().name());
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack#editMeta
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 2fb521dc2b4d991f56288e2faba978d9d7d29a0b..455e633edc19d29559e66b1d52c532ef1a0fa8df 100644
index 04ff6579282708c48edee419381c698707fe0a3b..351f5c0feec38377fccf09bfc1cef2df88fc2dcd 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -558,6 +558,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -561,6 +561,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return result.ensureServerConversions(); // Paper
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Attributes API for item defaults
(Now replaced by upstream's API)
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 2ce1d9239d08c799d53873563646f933211a902e..401645f5e0dfe6c9a0d082b5a76112a882b058ee 100644
index 1e4ebe9bdc6aadf18029377e7ce70ca0d88bd1a1..3cb658023d738617a310099fa3759af253a9f4c2 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4761,6 +4761,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4763,6 +4763,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
return new org.bukkit.inventory.ItemStack(this).getRarity();
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 401645f5e0dfe6c9a0d082b5a76112a882b058ee..8283eccf2578bae50a4c6fd86318e0d5f7cf09df 100644
index 3cb658023d738617a310099fa3759af253a9f4c2..1ca448c9e3a3178663a033617d9414ec085c246a 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4776,6 +4776,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4778,6 +4778,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
return this.getDefaultAttributeModifiers(equipmentSlot);
}

View File

@ -70,10 +70,10 @@ index dbebaf8172ec6872f56958b9583affde4f8400a4..98a970a6582dca22e719a31559c7bece
+ // Paper end - enchantWithLevels API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 455e633edc19d29559e66b1d52c532ef1a0fa8df..637b9067973aadece2806cc2b6200a4d3b8d97a1 100644
index 351f5c0feec38377fccf09bfc1cef2df88fc2dcd..7eb4cf0b2f162d650252d81e9d38393f69a69046 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -667,6 +667,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -670,6 +670,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
}
// Paper start

View File

@ -5,12 +5,12 @@ Subject: [PATCH] Add EquipmentSlot convenience methods
diff --git a/src/main/java/org/bukkit/inventory/EquipmentSlot.java b/src/main/java/org/bukkit/inventory/EquipmentSlot.java
index d776a0c183737efcaf94f0911f3a8c1adc2c5ada..e19e708e9bda10e99c07763d162cb140d0189147 100644
index 5642d8af60b6649497aba9b0f6ab7bba7702b9ee..adf0a94f98eb66b3957d4009d83ad5f741e0aa79 100644
--- a/src/main/java/org/bukkit/inventory/EquipmentSlot.java
+++ b/src/main/java/org/bukkit/inventory/EquipmentSlot.java
@@ -32,4 +32,27 @@ public enum EquipmentSlot {
@@ -33,4 +33,27 @@ public enum EquipmentSlot {
public EquipmentSlotGroup getGroup() {
return group;
return group.get();
}
+ // Paper start
+ /**

View File

@ -66,10 +66,10 @@ index 6bfc8a2148f504370df938447f4f6b757f1a516b..208bab1f5a3200f54141c38ee4272629
+ // Paper end - ItemStack damage API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 637b9067973aadece2806cc2b6200a4d3b8d97a1..d2162e53cefb8f9dc5c52bc1904e860066f43a41 100644
index 7eb4cf0b2f162d650252d81e9d38393f69a69046..6195ac25e7a46542659a263c85f7adac745c2ce4 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -984,5 +984,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -987,5 +987,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public boolean canRepair(@NotNull ItemStack toBeRepaired) {
return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this);
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow proper checking of empty item stacks
This adds a method to check if an item stack is empty or not. This mirrors vanilla's implementation of the same method.
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index d2162e53cefb8f9dc5c52bc1904e860066f43a41..db02c04a8e9a0b8e1e4518a629d5703398d4ef72 100644
index 6195ac25e7a46542659a263c85f7adac745c2ce4..7cecb04de7d55dcdec1fa3dd255c844e92b1abdb 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -998,5 +998,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -1001,5 +1001,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public @NotNull ItemStack damage(int amount, @NotNull org.bukkit.entity.LivingEntity livingEntity) {
return livingEntity.damageItemStack(this, amount);
}

View File

@ -9,10 +9,10 @@ By removing this check we avoid unnecessarily allocating useless `ItemMeta` obje
This is a leftover from when checking for the item's durability was "free" because the durability was stored in the `ItemStack` itself, this [was changed in Minecraft 1.13](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/f8b2086d60942eb2cd7ac25a2a1408cb790c222c#src/main/java/org/bukkit/inventory/ItemStack.java).
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index db02c04a8e9a0b8e1e4518a629d5703398d4ef72..0611f19bcdd8230b439b5055713221318dce98e2 100644
index 7cecb04de7d55dcdec1fa3dd255c844e92b1abdb..a1d0e479b9f28378f858f86ba8b0e9b7ddf71446 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -295,7 +295,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -298,7 +298,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return true;
}
Material comparisonType = (this.type.isLegacy()) ? Bukkit.getUnsafe().fromLegacy(this.getData(), true) : this.type; // This may be called from legacy item stacks, try to get the right material

View File

@ -27,10 +27,10 @@ index 6b68c92ec894451d99ded3e3df5965cb31d68ed2..fd5e433f930963c102c9c977523a0036
public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21"));
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0aa99af28d 100644
index 1ca448c9e3a3178663a033617d9414ec085c246a..82d009c0bbe4b3026a535e02d6e0ed20c7bd525d 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -146,54 +146,67 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -148,54 +148,67 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link Slab}
*/
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -98,7 +98,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
CHISELED_TUFF_BRICKS(8601),
DRIPSTONE_BLOCK(26227),
/**
@@ -300,6 +313,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -302,6 +315,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link Waterlogged}
*/
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -106,7 +106,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
HEAVY_CORE(15788, Waterlogged.class),
AMETHYST_BLOCK(18919),
BUDDING_AMETHYST(13963),
@@ -312,12 +326,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -314,12 +328,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
WEATHERED_COPPER(19699),
OXIDIZED_COPPER(19490),
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -123,7 +123,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
OXIDIZED_CHISELED_COPPER(27719),
CUT_COPPER(32519),
EXPOSED_CUT_COPPER(18000),
@@ -360,12 +378,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -362,12 +380,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
WAXED_WEATHERED_COPPER(5960),
WAXED_OXIDIZED_COPPER(25626),
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -140,7 +140,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
WAXED_OXIDIZED_CHISELED_COPPER(7735),
WAXED_CUT_COPPER(11030),
WAXED_EXPOSED_CUT_COPPER(30043),
@@ -2107,41 +2129,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -2109,41 +2131,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link Door}
*/
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -190,7 +190,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
WAXED_OXIDIZED_COPPER_DOOR(23888, Door.class),
/**
* BlockData: {@link TrapDoor}
@@ -2195,41 +2225,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -2197,41 +2227,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link TrapDoor}
*/
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -240,7 +240,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
WAXED_OXIDIZED_COPPER_TRAPDOOR(21450, TrapDoor.class),
/**
* BlockData: {@link Gate}
@@ -2531,6 +2569,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -2533,6 +2571,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
EGG(21603, 16),
COMPASS(24139),
RECOVERY_COMPASS(12710),
@ -249,7 +249,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
BUNDLE(16835, 1),
FISHING_ROD(4167, 1, 64),
CLOCK(14980),
@@ -2637,6 +2677,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -2639,6 +2679,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link Crafter}
*/
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -257,7 +257,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
CRAFTER(25243, Crafter.class),
FILLED_MAP(23504),
SHEARS(27971, 1, 238),
@@ -2677,8 +2718,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -2679,8 +2720,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
BEE_SPAWN_EGG(22924),
BLAZE_SPAWN_EGG(4759),
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -268,7 +268,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
BREEZE_SPAWN_EGG(7580),
CAT_SPAWN_EGG(29583),
CAMEL_SPAWN_EGG(14760),
@@ -2755,10 +2798,12 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -2757,10 +2800,12 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
EXPERIENCE_BOTTLE(12858),
FIRE_CHARGE(4842),
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -281,7 +281,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
MACE(4771, 1, 250),
ITEM_FRAME(27318),
GLOW_ITEM_FRAME(26473),
@@ -3157,8 +3202,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -3159,8 +3204,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
RAISER_ARMOR_TRIM_SMITHING_TEMPLATE(29116),
HOST_ARMOR_TRIM_SMITHING_TEMPLATE(12165),
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -292,7 +292,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
BOLT_ARMOR_TRIM_SMITHING_TEMPLATE(9698),
ANGLER_POTTERY_SHERD(9952),
ARCHER_POTTERY_SHERD(21629),
@@ -3169,9 +3216,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -3171,9 +3218,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
DANGER_POTTERY_SHERD(30506),
EXPLORER_POTTERY_SHERD(5124),
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -304,7 +304,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
GUSTER_POTTERY_SHERD(28193),
HEART_POTTERY_SHERD(17607),
HEARTBREAK_POTTERY_SHERD(21108),
@@ -3181,6 +3230,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -3183,6 +3232,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
PLENTY_POTTERY_SHERD(28236),
PRIZE_POTTERY_SHERD(4341),
@MinecraftExperimental(Requires.UPDATE_1_21)
@ -312,7 +312,7 @@ index 8283eccf2578bae50a4c6fd86318e0d5f7cf09df..c892610f2127f7415c287fa007ddda0a
SCRAPE_POTTERY_SHERD(30034),
SHEAF_POTTERY_SHERD(23652),
SHELTER_POTTERY_SHERD(28390),
@@ -3190,99 +3240,121 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -3192,99 +3242,121 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* BlockData: {@link Waterlogged}
*/
@MinecraftExperimental(Requires.UPDATE_1_21)

View File

@ -119,10 +119,10 @@ index 7e6bdf3333537491b3421d196779a4eb502f7314..a3ba9249e636d1fb8dad98fab4134360
+ @NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 0611f19bcdd8230b439b5055713221318dce98e2..9440cffffa1d7e75d2d76d55d5608bafd69b645b 100644
index a1d0e479b9f28378f858f86ba8b0e9b7ddf71446..b669df4bd1ff0ecba575d42415973e81bccddbbe 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1018,4 +1018,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -1021,4 +1021,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return type.isAir() || amount <= 0;
}
// Paper end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate ItemStack#setType
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 9440cffffa1d7e75d2d76d55d5608bafd69b645b..91083a135a7e979e32cbb3531b5ef69b7a28f305 100644
index b669df4bd1ff0ecba575d42415973e81bccddbbe..1294f7ce50977dfe72daf535b611386844c205e0 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -134,8 +134,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -47,10 +47,10 @@ index a435f6c8947e4ac50b8c04f37b107055970937dd..92e30c281eab4801298b280bd388a039
/**
* Setting to show/hide item-specific information, including, but not limited to:
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 91083a135a7e979e32cbb3531b5ef69b7a28f305..2b465bd3264cccd5203775e1aa99dcfa6226368d 100644
index 1294f7ce50977dfe72daf535b611386844c205e0..84a7bf0936d35bf42b5ed038d295d5c31740f472 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -572,6 +572,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -575,6 +575,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
Object raw = args.get("meta");
if (raw instanceof ItemMeta) {
((ItemMeta) raw).setVersion(version);

View File

@ -6950,10 +6950,10 @@ index c4bd9be9d1884be1f5040ff1417f44f8ac4b655f..319cb644c0a42e9cc0d3ce9d1cbaa93b
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index bc263349531d70886d5eee37a196c78dd70c9b30..5631621f16fdda723cb3e1de7d3a6646d768a863 100644
index 374db2337574f8b799c1a6ffef1cf62a82c0f802..240d7831d7f05e245e4103ec22f4967657e1040b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -275,6 +275,8 @@ public class ServerPlayer extends Player {
@@ -276,6 +276,8 @@ public class ServerPlayer extends Player {
public boolean sentListPacket = false;
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
// CraftBukkit end
@ -6962,7 +6962,7 @@ index bc263349531d70886d5eee37a196c78dd70c9b30..5631621f16fdda723cb3e1de7d3a6646
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
@@ -343,6 +345,8 @@ public class ServerPlayer extends Player {
@@ -344,6 +346,8 @@ public class ServerPlayer extends Player {
this.updateOptions(clientOptions);
this.object = null;
@ -7061,7 +7061,7 @@ index 803f8e80d616ac7f9a51e4cdd6a7a3ce690b791e..9c54bc3897d1fa3c88a5a7d55224eb4c
public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 09a3d06f1c613662283eb6688bf2c3eeb4778208..dcf53dbecc1873994b171cfd1eb313545d6cfdcd 100644
index 24368386db4c4eb1f6b83730570146f50d6b389b..c675fe1c2363248b034bdc27bb3a6a0e65adf19c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -270,6 +270,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -7073,7 +7073,7 @@ index 09a3d06f1c613662283eb6688bf2c3eeb4778208..dcf53dbecc1873994b171cfd1eb31354
@Override
public float getBukkitYaw() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 113440cd203c1273934b9b7ad7a0fe36f44d0c88..2e83e5779d5bdfc150257d3394669d53eba5c5c3 100644
index 04d9e3aced11c54b8f464ae7faba1b4aaf81e093..39e71ff8528622f640950d1a9b33483a7eb68957 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -287,6 +287,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti

View File

@ -2682,10 +2682,10 @@ index 977275f767c374a1be9055e4aa9e124025d55828..953e28f0cf60412a4ec9e311daa98f9d
public boolean logIPs() {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b26016bccd7c 100644
index 240d7831d7f05e245e4103ec22f4967657e1040b..8292f45aa100e2788584f568430d76560c2fa9a8 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -169,6 +169,7 @@ import net.minecraft.world.damagesource.CombatTracker;
@@ -170,6 +170,7 @@ import net.minecraft.world.damagesource.CombatTracker;
import net.minecraft.world.scores.Scoreboard;
import net.minecraft.world.scores.Team;
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
@ -2693,7 +2693,7 @@ index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b260
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.WeatherType;
@@ -232,6 +233,7 @@ public class ServerPlayer extends Player {
@@ -233,6 +234,7 @@ public class ServerPlayer extends Player {
private boolean disconnected;
private int requestedViewDistance;
public String language = "en_us"; // CraftBukkit - default
@ -2701,7 +2701,7 @@ index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b260
@Nullable
private Vec3 startingToFallPosition;
@Nullable
@@ -264,6 +266,7 @@ public class ServerPlayer extends Player {
@@ -265,6 +267,7 @@ public class ServerPlayer extends Player {
// CraftBukkit start
public CraftPlayer.TransferCookieConnection transferCookieConnection;
public String displayName;
@ -2709,7 +2709,7 @@ index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b260
public Component listName;
public org.bukkit.Location compassTarget;
public int newExp = 0;
@@ -349,6 +352,7 @@ public class ServerPlayer extends Player {
@@ -350,6 +353,7 @@ public class ServerPlayer extends Player {
// CraftBukkit start
this.displayName = this.getScoreboardName();
@ -2717,7 +2717,7 @@ index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b260
this.bukkitPickUpLoot = true;
this.maxHealthCache = this.getMaxHealth();
}
@@ -893,22 +897,17 @@ public class ServerPlayer extends Player {
@@ -903,22 +907,17 @@ public class ServerPlayer extends Player {
String deathmessage = defaultMessage.getString();
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
@ -2744,7 +2744,7 @@ index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b260
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getId(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
boolean flag1 = true;
@@ -1975,8 +1974,13 @@ public class ServerPlayer extends Player {
@@ -1985,8 +1984,13 @@ public class ServerPlayer extends Player {
}
public void sendChatMessage(OutgoingChatMessage message, boolean filterMaskEnabled, ChatType.Bound params) {
@ -2759,7 +2759,7 @@ index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b260
}
}
@@ -2003,6 +2007,7 @@ public class ServerPlayer extends Player {
@@ -2013,6 +2017,7 @@ public class ServerPlayer extends Player {
}
// CraftBukkit end
this.language = clientOptions.language();
@ -2872,7 +2872,7 @@ index bd7107279ca004f35c932e5d6e82f8302ec781ae..970d1ddf0a014b47b0ac974404897061
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d17358e391060c674d0b83b1619e0de8190c6791..86d0207a36df67bf0554193bf050e035aeecc5c9 100644
index dfeb64d614e0da9f1bc0df9dcae71b509cf4178f..97b5e3cc18dbf712f5f60d92a4f9beabd90f2e0f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -44,6 +44,7 @@ import net.minecraft.core.registries.Registries;
@ -5141,7 +5141,7 @@ index 9c57b883783145ad4483481a2c2e7f0f188cd174..b653c2c80e8e8524ea6d7625c6a86f82
+ // 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 2a0803ed63be1adafec3e6e1cf57a84c867d0b57..6b63fec6bc646b6faf2151a786ef47c87848520e 100644
index 7a5110efc5af1be6644b7afecd6ac025c20e6794..3cb5685a97f67d759537fc92bb4cb376bb2905a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -843,6 +843,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

View File

@ -1230,7 +1230,7 @@ index 319cb644c0a42e9cc0d3ce9d1cbaa93b9c3dcd5b..a6e78b8a6ced8ec84273e2c5d18ffcca
this.entityManager.saveAll();
} else {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 86d0207a36df67bf0554193bf050e035aeecc5c9..e63aadfe5209978f5d515ef9c37df01e08cd8fdb 100644
index 97b5e3cc18dbf712f5f60d92a4f9beabd90f2e0f..72f3717d931a6635d991d93619c9896ea22e1912 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -330,7 +330,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -1379,7 +1379,7 @@ index 1099a85ab7e98d8652cdd1c318f269ca31f4d783..606dbc398745b689f957e62ebd9eaa56
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd036c8f7c2d 100644
index c675fe1c2363248b034bdc27bb3a6a0e65adf19c..a2cbe1fd8aef67cc9c71ef22bf4c7efd9d8d6a95 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -149,7 +149,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1391,7 +1391,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
public abstract class LivingEntity extends Entity implements Attackable {
@@ -2945,7 +2945,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2951,7 +2951,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void tick() {
@ -1399,7 +1399,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
super.tick();
this.updatingUsingItem();
this.updateSwimAmount();
@@ -2987,9 +2986,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2993,9 +2992,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (!this.isRemoved()) {
@ -1409,7 +1409,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
}
double d0 = this.getX() - this.xo;
@@ -3080,7 +3077,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3086,7 +3083,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.refreshDimensions();
}
@ -1417,7 +1417,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
}
public void detectEquipmentUpdatesPublic() { // CraftBukkit
@@ -3279,7 +3275,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3285,7 +3281,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.setDeltaMovement(d0, d1, d2);
this.level().getProfiler().push("ai");
@ -1425,7 +1425,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
if (this.isImmobile()) {
this.jumping = false;
this.xxa = 0.0F;
@@ -3289,7 +3284,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3295,7 +3290,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.serverAiStep();
this.level().getProfiler().pop();
}
@ -1433,7 +1433,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
this.level().getProfiler().pop();
this.level().getProfiler().push("jump");
@@ -3329,7 +3323,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3335,7 +3329,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.resetFallDistance();
}
@ -1441,7 +1441,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
label104:
{
LivingEntity entityliving = this.getControllingPassenger();
@@ -3343,7 +3336,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3349,7 +3342,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.travel(vec3d1);
}
@ -1449,7 +1449,7 @@ index dcf53dbecc1873994b171cfd1eb313545d6cfdcd..e72ca3af948aa223e6ef31bb0972dd03
this.level().getProfiler().pop();
this.level().getProfiler().push("freezing");
@@ -3370,9 +3362,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3376,9 +3368,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 6b63fec6bc646b6faf2151a786ef47c87848520e..d8804be1f36872d12484d9b4327d669d19e7c573 100644
index 3cb5685a97f67d759537fc92bb4cb376bb2905a7..e967d6b32d9538d8456d73a67a73e3d3ea16b831 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -860,11 +860,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -69,7 +69,7 @@ index 6b63fec6bc646b6faf2151a786ef47c87848520e..d8804be1f36872d12484d9b4327d669d
@Override
public boolean hasCustomModelData() {
return this.customModelData != null;
@@ -1661,6 +1696,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1663,6 +1698,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Object object : addFrom) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 2e83e5779d5bdfc150257d3394669d53eba5c5c3..895971f238b693afbf382d9951adb636d1efef2d 100644
index 39e71ff8528622f640950d1a9b33483a7eb68957..17c9f99e777e211437cb5d693fe247a22ae51c7d 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -126,6 +126,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add configurable entity despawn distances
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 895971f238b693afbf382d9951adb636d1efef2d..a61f25425893024571a85cf563ec41cfc7b52325 100644
index 17c9f99e777e211437cb5d693fe247a22ae51c7d..c8ff4b01186f924473b9ffde948d7f0573e8d56f 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -911,14 +911,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti

View File

@ -21,7 +21,7 @@ index 3126e8cab3c40e3af47f4c8925e1c6a9523309ba..3207166061bf9c4d7bf3f38e5a9f7aff
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
double d4 = max * max;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index a61f25425893024571a85cf563ec41cfc7b52325..0e88a2212435ff70b5ee661de3977df2b456b29b 100644
index c8ff4b01186f924473b9ffde948d7f0573e8d56f..426fa1798087ab1fb4198bd036f498606dce7c3f 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -907,7 +907,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 4277f7c477efe01d4ef917515178b26016bccd7c..d75c3c10dcbd777796e479b9538e5254857ac07c 100644
index 8292f45aa100e2788584f568430d76560c2fa9a8..244be33d0000189556ce7c6714e5a9768c16ba6b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1097,6 +1097,7 @@ public class ServerPlayer extends Player {
@@ -1107,6 +1107,7 @@ public class ServerPlayer extends Player {
this.unRide();
this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.wonGame) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 230bd20a7a8923f4a4bd4023aeac91ea5908ccd4..cd6d831d8519b406571e6f626053afb662799ad9 100644
index 73cc11cf4732ede545e924d07480cae14c3ef226..8307c3e77ddc80a02f420503d67ae06fb973dc09 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -226,7 +226,7 @@ public class Explosion {

View File

@ -22,7 +22,7 @@ index fcb2d06f088a938b5bb76e6b42581d8f292d2eaf..231fba80a25601cdfba4f6f44ac7c288
this.profiler.popPush("connection");
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index cd6d831d8519b406571e6f626053afb662799ad9..8a4c086d7ac4bf59f39ab37e583b0e8d6dba6bf4 100644
index 8307c3e77ddc80a02f420503d67ae06fb973dc09..c769da15f1d0bdbd2bce412aa9fae6d10d1177f7 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -278,7 +278,7 @@ public class Explosion {
@ -34,7 +34,7 @@ index cd6d831d8519b406571e6f626053afb662799ad9..8a4c086d7ac4bf59f39ab37e583b0e8d
double d13;
if (entity instanceof LivingEntity) {
@@ -529,4 +529,84 @@ public class Explosion {
@@ -532,4 +532,84 @@ public class Explosion {
private BlockInteraction() {}
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 8a4c086d7ac4bf59f39ab37e583b0e8d6dba6bf4..111e6a7ab25e5513154984545c1737d2f7fd7d5f 100644
index c769da15f1d0bdbd2bce412aa9fae6d10d1177f7..94f72ff58ac5206878a81e89d32e81c17b1bd1fb 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -284,7 +284,7 @@ public class Explosion {
@ -17,7 +17,7 @@ index 8a4c086d7ac4bf59f39ab37e583b0e8d6dba6bf4..111e6a7ab25e5513154984545c1737d2
} else {
d13 = d12;
}
@@ -306,7 +306,7 @@ public class Explosion {
@@ -309,7 +309,7 @@ public class Explosion {
if (entity instanceof Player) {
Player entityhuman = (Player) entity;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d75c3c10dcbd777796e479b9538e5254857ac07c..ab2336a30c1ffc1698c327c031a648d4121c116e 100644
index 244be33d0000189556ce7c6714e5a9768c16ba6b..abc8c7928eed1ba385e9ebb0b0cd059c9048d439 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -232,7 +232,7 @@ public class ServerPlayer extends Player {
@@ -233,7 +233,7 @@ public class ServerPlayer extends Player {
private int levitationStartTime;
private boolean disconnected;
private int requestedViewDistance;
@ -17,7 +17,7 @@ index d75c3c10dcbd777796e479b9538e5254857ac07c..ab2336a30c1ffc1698c327c031a648d4
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
@Nullable
private Vec3 startingToFallPosition;
@@ -288,7 +288,7 @@ public class ServerPlayer extends Player {
@@ -289,7 +289,7 @@ public class ServerPlayer extends Player {
this.lastActionTime = Util.getMillis();
this.recipeBook = new ServerRecipeBook();
this.requestedViewDistance = 2;
@ -26,7 +26,7 @@ index d75c3c10dcbd777796e479b9538e5254857ac07c..ab2336a30c1ffc1698c327c031a648d4
this.lastSectionPos = SectionPos.of(0, 0, 0);
this.chunkTrackingView = ChunkTrackingView.EMPTY;
this.respawnDimension = Level.OVERWORLD;
@@ -2002,9 +2002,10 @@ public class ServerPlayer extends Player {
@@ -2012,9 +2012,10 @@ public class ServerPlayer extends Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable container update tick rate
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ab2336a30c1ffc1698c327c031a648d4121c116e..532282ba4432f55596337f7a0898ecc3d5dc2148 100644
index abc8c7928eed1ba385e9ebb0b0cd059c9048d439..1cda7166fe8974f05d20fdbfbced72f101663d56 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -262,6 +262,7 @@ public class ServerPlayer extends Player {
@@ -263,6 +263,7 @@ public class ServerPlayer extends Player {
public final Object object;
private int containerCounter;
public boolean wonGame;
@ -16,7 +16,7 @@ index ab2336a30c1ffc1698c327c031a648d4121c116e..532282ba4432f55596337f7a0898ecc3
// CraftBukkit start
public CraftPlayer.TransferCookieConnection transferCookieConnection;
@@ -679,7 +680,12 @@ public class ServerPlayer extends Player {
@@ -689,7 +690,12 @@ public class ServerPlayer extends Player {
--this.invulnerableTime;
}

View File

@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e63aadfe5209978f5d515ef9c37df01e08cd8fdb..84c53376312e5f2253521ce2fcac756bc1e5365f 100644
index 72f3717d931a6635d991d93619c9896ea22e1912..255d39a57e6b440317cb885c1c40f3b116d916ed 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1996,7 +1996,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -23,7 +23,7 @@ index 406d69220b315b47bd3d03a0dacc39addaaf9294..1cd40266418a3805f05b09c554d561e2
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e72ca3af948aa223e6ef31bb0972dd036c8f7c2d..70ac2c957341b363246a9165804471d2668e6492 100644
index a2cbe1fd8aef67cc9c71ef22bf4c7efd9d8d6a95..8f13f53b14209542283586c437e5cbf549ec8e46 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -873,6 +873,7 @@ public abstract class LivingEntity extends Entity implements Attackable {

View File

@ -150,7 +150,7 @@ index b6521462d193bff83ace1dc694c6d957a7173969..d302767e8f01fdfcba9c22e2e35677af
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index d8804be1f36872d12484d9b4327d669d19e7c573..122142125dcba97572b1e0b9195e534a0e2257d9 100644
index e967d6b32d9538d8456d73a67a73e3d3ea16b831..e88364dfe067c605856390d2cce07ba320632df9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
@ -239,7 +239,7 @@ index d8804be1f36872d12484d9b4327d669d19e7c573..122142125dcba97572b1e0b9195e534a
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1492,7 +1495,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1494,7 +1497,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData;
clone.blockData = this.blockData;
if (this.enchantments != null) {
@ -248,7 +248,7 @@ index d8804be1f36872d12484d9b4327d669d19e7c573..122142125dcba97572b1e0b9195e534a
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
@@ -1812,4 +1815,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1814,4 +1817,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return (result != null) ? result : Optional.empty();
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 70ac2c957341b363246a9165804471d2668e6492..53da8935e076d56f0a5423e5c1bdcdddc7cbd882 100644
index 8f13f53b14209542283586c437e5cbf549ec8e46..801577d2c9e6eacd8e3038f5b3cdb026c62a5d09 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3802,10 +3802,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3808,10 +3808,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@ -21,7 +21,7 @@ index 70ac2c957341b363246a9165804471d2668e6492..53da8935e076d56f0a5423e5c1bdcddd
this.level().getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -3819,6 +3820,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3825,6 +3826,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else {
itemstack = this.useItem.finishUsingItem(this.level(), this);
}
@ -34,7 +34,7 @@ index 70ac2c957341b363246a9165804471d2668e6492..53da8935e076d56f0a5423e5c1bdcddd
// CraftBukkit end
if (itemstack != this.useItem) {
@@ -3826,6 +3833,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3832,6 +3839,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();

View File

@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 53da8935e076d56f0a5423e5c1bdcdddc7cbd882..f02b12f3853bf4bf29b59a505f06cb98bddb40ff 100644
index 801577d2c9e6eacd8e3038f5b3cdb026c62a5d09..24e6d6c356cccf656cd20bcea069f5fdf123e4c8 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -833,7 +833,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -34,7 +34,7 @@ index 53da8935e076d56f0a5423e5c1bdcdddc7cbd882..f02b12f3853bf4bf29b59a505f06cb98
// CraftBukkit start - Handle scaled health
if (this instanceof ServerPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
@@ -3637,7 +3647,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3643,7 +3653,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public final void setAbsorptionAmount(float absorptionAmount) {

View File

@ -28,7 +28,7 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5
+ // Paper end - PlayerUseUnknownEntityEvent
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 84c53376312e5f2253521ce2fcac756bc1e5365f..444c3d396c117be4de314aafa1625ef69fabf601 100644
index 255d39a57e6b440317cb885c1c40f3b116d916ed..0d0bc67bd019c6a203cdb46a778d2963359e43f7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2480,7 +2480,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -6,7 +6,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
Don't even get me started
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f02b12f3853bf4bf29b59a505f06cb98bddb40ff..399c12a2b14df4786c8e13484a54a73ad8571410 100644
index 24e6d6c356cccf656cd20bcea069f5fdf123e4c8..7ac642aaf39a73f18c89be2b0c412b57a96e99d9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1344,10 +1344,16 @@ public abstract class LivingEntity extends Entity implements Attackable {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 444c3d396c117be4de314aafa1625ef69fabf601..e95251f21dd500850767a9bd3e9512c87bdaaec2 100644
index 0d0bc67bd019c6a203cdb46a778d2963359e43f7..5af3e01efd4176c828043ffaba341ae21fad3a73 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1522,13 +1522,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e95251f21dd500850767a9bd3e9512c87bdaaec2..f75216148bc8b3e357111ff624d8b43592d5d16b 100644
index 5af3e01efd4176c828043ffaba341ae21fad3a73..31ccca2a4e94cb1b3f43de38907634f7e6e18aa5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -346,7 +346,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 532282ba4432f55596337f7a0898ecc3d5dc2148..82498ec7f0de4c1b82c7882824587ed3ba7fd5d6 100644
index 1cda7166fe8974f05d20fdbfbced72f101663d56..a5122de4602db3b93a9221e1a9a33bcb73dbe771 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2549,7 +2549,7 @@ public class ServerPlayer extends Player {
@@ -2559,7 +2559,7 @@ public class ServerPlayer extends Player {
@Override
public boolean isImmobile() {

View File

@ -127,10 +127,10 @@ index 1f29ed95ef3d1904a014715028d9d591fe39231f..1a829f79e6f9e03ead745e13ece4d1b5
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 399c12a2b14df4786c8e13484a54a73ad8571410..b51f4172b7135689fcd99b380f1a78bf8e723cfa 100644
index 7ac642aaf39a73f18c89be2b0c412b57a96e99d9..c6e666f57c199b4408b32e076622ba05b42fcea9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1813,7 +1813,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1819,7 +1819,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void dropExperience() {
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time

View File

@ -24,10 +24,10 @@ index 10687787a5fd1a81ad5a625848db4649381eab67..9f906e51f236e84f6cee8eba4b7587ed
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index b51f4172b7135689fcd99b380f1a78bf8e723cfa..177ad43b62c6e1efc0ae6298e464debdf66b1055 100644
index c6e666f57c199b4408b32e076622ba05b42fcea9..134106c7c98c87e593157a794287973327d055fc 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3454,10 +3454,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3460,10 +3460,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
Iterator iterator1 = list.iterator();

View File

@ -14,7 +14,7 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f75216148bc8b3e357111ff624d8b43592d5d16b..9e26cd52dfe77049019a417cd3999103647c037f 100644
index 31ccca2a4e94cb1b3f43de38907634f7e6e18aa5..385dd65af8b526d128ac4c99cecdb69aad9f9a07 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2242,6 +2242,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 0e88a2212435ff70b5ee661de3977df2b456b29b..2f33036a78a120898b18301bae1585c65fdb69dc 100644
index 426fa1798087ab1fb4198bd036f498606dce7c3f..e159da8a8dcff686e93d09a15141233915c264bf 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -715,6 +715,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti

View File

@ -5,7 +5,7 @@ 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 9e26cd52dfe77049019a417cd3999103647c037f..f6019435a90979ed6f966cc6e8288f05ff889d5e 100644
index 385dd65af8b526d128ac4c99cecdb69aad9f9a07..74c7a690f654558baf12ba2085d0e897a45c0baa 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1204,7 +1204,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,10 +5,10 @@ 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 177ad43b62c6e1efc0ae6298e464debdf66b1055..45eef550358b0f3e6780d98c43c5856ff44ae313 100644
index 134106c7c98c87e593157a794287973327d055fc..4f742679669aea2a19267f3774da1f8b094a45cf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3137,6 +3137,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3143,6 +3143,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
ItemStack itemstack2 = this.getItemBySlot(enumitemslot);
if (this.equipmentHasChanged(itemstack1, itemstack2)) {

View File

@ -16,7 +16,7 @@ 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 f6019435a90979ed6f966cc6e8288f05ff889d5e..ae0e3694f3971908cb472b1165d2649265e1bdca 100644
index 74c7a690f654558baf12ba2085d0e897a45c0baa..1b563aa6be76286c49ad3f037cb70b01d33c4458 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -708,21 +708,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -60,10 +60,10 @@ index 3f60a3289ec58d5eb3c0c5634ca62ef2fa287ce7..bc81649b09c39188697b8851abedafca
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();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 82498ec7f0de4c1b82c7882824587ed3ba7fd5d6..84e8ab9bdd4911412732e490ff8d10ba93d67f45 100644
index a5122de4602db3b93a9221e1a9a33bcb73dbe771..785c7e56a053acffa79fb11a32849d99961e35a4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -281,6 +281,7 @@ public class ServerPlayer extends Player {
@@ -282,6 +282,7 @@ public class ServerPlayer extends Player {
// CraftBukkit end
public boolean isRealPlayer; // Paper
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper

View File

@ -9,7 +9,7 @@ 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 ae0e3694f3971908cb472b1165d2649265e1bdca..66ca4d1f28143d1e4ce99532c6c2bd64cde67024 100644
index 1b563aa6be76286c49ad3f037cb70b01d33c4458..c3bd22a0a4220d14aaad3821ffc920001c0b290b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1459,7 +1459,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -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 45eef550358b0f3e6780d98c43c5856ff44ae313..dce35cc6f81440cd7c6af330d5dc5416e6faf179 100644
index 4f742679669aea2a19267f3774da1f8b094a45cf..3f50533b89345a74392e0e6ef0407e6aa544876e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3911,12 +3911,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3917,12 +3917,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.isUsingItem() && !this.useItem.isEmpty()) {
Item item = this.useItem.getItem();

View File

@ -39,10 +39,10 @@ index e612921a7fb68dd74d8fd4084a8beccc299ff6ea..49b100e2cf9868c4f06aae0bf538fcd4
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 dce35cc6f81440cd7c6af330d5dc5416e6faf179..7d44d4563e39f279cf335f307a4d84d0758858ee 100644
index 3f50533b89345a74392e0e6ef0407e6aa544876e..b153247b4be38e8ecaf3df64db55df88b7501cfd 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1587,7 +1587,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1593,7 +1593,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
protected void blockedByShield(LivingEntity target) {
@ -51,7 +51,7 @@ index dce35cc6f81440cd7c6af330d5dc5416e6faf179..7d44d4563e39f279cf335f307a4d84d0
}
private boolean checkTotemDeathProtection(DamageSource source) {
@@ -1850,7 +1850,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1856,7 +1856,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.knockback(strength, x, z, null, EntityKnockbackEvent.KnockbackCause.UNKNOWN);
}
@ -60,7 +60,7 @@ index dce35cc6f81440cd7c6af330d5dc5416e6faf179..7d44d4563e39f279cf335f307a4d84d0
d0 *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
if (true || d0 > 0.0D) { // CraftBukkit - Call event even when force is 0
//this.hasImpulse = true; // CraftBukkit - Move down
@@ -1862,8 +1862,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1868,8 +1868,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
return;
}
@ -218,16 +218,14 @@ index 9f9b7373c9a714597858ddcd8932e31b902cf5a1..f7f26d595072372004143c4e26506ed5
public abstract void explode();
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 111e6a7ab25e5513154984545c1737d2f7fd7d5f..146f5a33e1d538e46e4f7034a498d30f742a96f7 100644
index 94f72ff58ac5206878a81e89d32e81c17b1bd1fb..b5b29210d9a6125d98e7dd737ca25f40545e512b 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -299,7 +299,17 @@ public class Explosion {
Vec3 result = entity.getDeltaMovement().add(vec3d1);
org.bukkit.event.entity.EntityKnockbackEvent event = CraftEventFactory.callEntityKnockbackEvent((org.bukkit.craftbukkit.entity.CraftLivingEntity) entity.getBukkitEntity(), this.source, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.EXPLOSION, d13, vec3d1, result.x, result.y, result.z);
- vec3d1 = (event.isCancelled()) ? Vec3.ZERO : new Vec3(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ());
@@ -303,6 +303,16 @@ public class Explosion {
// since the code below (the setDeltaMovement call as well as the hitPlayers map)
// want the vector to be the relative velocity will the event provides the absolute velocity
vec3d1 = (event.isCancelled()) ? Vec3.ZERO : new Vec3(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ()).subtract(entity.getDeltaMovement());
+ // Paper start - call EntityKnockbackByEntityEvent for explosions
+ vec3d1 = (event.isCancelled()) ? Vec3.ZERO : new Vec3(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ()).subtract(entity.getDeltaMovement()); // changes on this line fix a bug where vec3d1 wasn't reassigned with the "change", but instead the final deltaMovement
+ if (this.damageSource.getEntity() != null || this.source != null) {
+ final org.bukkit.entity.Entity hitBy = this.damageSource.getEntity() != null ? this.damageSource.getEntity().getBukkitEntity() : this.source.getBukkitEntity();
+ com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent paperEvent = new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent(((LivingEntity) entity).getBukkitLivingEntity(), hitBy, (float) event.getForce(), org.bukkit.craftbukkit.util.CraftVector.toBukkit(vec3d1));

View File

@ -29,10 +29,10 @@ index 82947c9743433df9c03732e0a3229563de0ab53c..6f2e316480c4cd1ffb32e8d01009a18c
}
// 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 84e8ab9bdd4911412732e490ff8d10ba93d67f45..e073b48ed6cbefc503216615f54d09b309217d80 100644
index 785c7e56a053acffa79fb11a32849d99961e35a4..c8084bdb20f1f21efc713c58d441096a31d79988 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -688,7 +688,7 @@ public class ServerPlayer extends Player {
@@ -698,7 +698,7 @@ public class ServerPlayer extends Player {
}
// Paper end - Configurable container update tick rate
if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
@ -41,7 +41,7 @@ index 84e8ab9bdd4911412732e490ff8d10ba93d67f45..e073b48ed6cbefc503216615f54d09b3
this.containerMenu = this.inventoryMenu;
}
@@ -908,7 +908,7 @@ public class ServerPlayer extends Player {
@@ -918,7 +918,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 84e8ab9bdd4911412732e490ff8d10ba93d67f45..e073b48ed6cbefc503216615f54d09b3
}
net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure
@@ -1549,7 +1549,7 @@ public class ServerPlayer extends Player {
@@ -1559,7 +1559,7 @@ public class ServerPlayer extends Player {
}
// CraftBukkit end
if (this.containerMenu != this.inventoryMenu) {
@ -59,7 +59,7 @@ index 84e8ab9bdd4911412732e490ff8d10ba93d67f45..e073b48ed6cbefc503216615f54d09b3
}
// this.nextContainerCounter(); // CraftBukkit - moved up
@@ -1577,7 +1577,13 @@ public class ServerPlayer extends Player {
@@ -1587,7 +1587,13 @@ public class ServerPlayer extends Player {
@Override
public void closeContainer() {
@ -75,7 +75,7 @@ index 84e8ab9bdd4911412732e490ff8d10ba93d67f45..e073b48ed6cbefc503216615f54d09b3
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 66ca4d1f28143d1e4ce99532c6c2bd64cde67024..18a0dc407331cc3c85dc84580419e0c241e72435 100644
index c3bd22a0a4220d14aaad3821ffc920001c0b290b..b0066e5ccd5b11a3a31c41dce513905c23459088 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2606,10 +2606,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -16,7 +16,7 @@ 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 18a0dc407331cc3c85dc84580419e0c241e72435..6755bc8f53253e5fcaaa94f7b505cdbe82d43a57 100644
index b0066e5ccd5b11a3a31c41dce513905c23459088..a8c48cc286807a742838d372dc6dc2d2bb843f89 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2483,6 +2483,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -22,7 +22,7 @@ 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 6755bc8f53253e5fcaaa94f7b505cdbe82d43a57..dfaed8544c84f00d6092f7acab2193ee0228f9cf 100644
index a8c48cc286807a742838d372dc6dc2d2bb843f89..b74bee4fa7bd222e5bb707f00aebe437dfa0886a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -265,6 +265,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 7d44d4563e39f279cf335f307a4d84d0758858ee..67ba23c66e253d3a96f6b08a5580387859652aa2 100644
index b153247b4be38e8ecaf3df64db55df88b7501cfd..337fda9f87ece1fc2264ae6a2af2b7abbb23d788 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3932,6 +3932,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3938,6 +3938,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
// Paper start - Make shield blocking delay configurable

View File

@ -19,10 +19,10 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index e073b48ed6cbefc503216615f54d09b309217d80..c97410f580f31389987ef944fc410e44459a4693 100644
index c8084bdb20f1f21efc713c58d441096a31d79988..4c0afa2589606d2748e54961f2a25e28a5309073 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -263,6 +263,10 @@ public class ServerPlayer extends Player {
@@ -264,6 +264,10 @@ public class ServerPlayer extends Player {
private int containerCounter;
public boolean wonGame;
private int containerUpdateDelay; // Paper - Configurable container update tick rate
@ -33,7 +33,7 @@ index e073b48ed6cbefc503216615f54d09b309217d80..c97410f580f31389987ef944fc410e44
// CraftBukkit start
public CraftPlayer.TransferCookieConnection transferCookieConnection;
@@ -877,7 +881,7 @@ public class ServerPlayer extends Player {
@@ -887,7 +891,7 @@ public class ServerPlayer extends Player {
@Override
public void die(DamageSource damageSource) {
@ -42,7 +42,7 @@ index e073b48ed6cbefc503216615f54d09b309217d80..c97410f580f31389987ef944fc410e44
boolean flag = this.level().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES);
// CraftBukkit start - fire PlayerDeathEvent
if (this.isRemoved()) {
@@ -905,6 +909,16 @@ public class ServerPlayer extends Player {
@@ -915,6 +919,16 @@ public class ServerPlayer extends Player {
String deathmessage = defaultMessage.getString();
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure
@ -59,7 +59,7 @@ index e073b48ed6cbefc503216615f54d09b309217d80..c97410f580f31389987ef944fc410e44
// SPIGOT-943 - only call if they have an inventory open
if (this.containerMenu != this.inventoryMenu) {
@@ -1053,8 +1067,17 @@ public class ServerPlayer extends Player {
@@ -1063,8 +1077,17 @@ public class ServerPlayer extends Player {
}
}
}
@ -80,7 +80,7 @@ index e073b48ed6cbefc503216615f54d09b309217d80..c97410f580f31389987ef944fc410e44
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6e4cbb2cb 100644
index 337fda9f87ece1fc2264ae6a2af2b7abbb23d788..21d2c43a97122025edd91662e39d44cc867593a3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -271,6 +271,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -91,7 +91,7 @@ index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6
@Override
public float getBukkitYaw() {
@@ -1543,11 +1544,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1549,11 +1550,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.isDeadOrDying()) {
if (!this.checkTotemDeathProtection(source)) {
@ -107,7 +107,7 @@ index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6
}
} else if (flag1) {
this.playHurtSound(source);
@@ -1706,6 +1708,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1712,6 +1714,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = damageSource.getEntity();
LivingEntity entityliving = this.getKillCredit();
@ -115,7 +115,7 @@ index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6
if (this.deathScore >= 0 && entityliving != null) {
entityliving.awardKillScore(this, this.deathScore, damageSource);
}
@@ -1717,24 +1720,59 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1723,24 +1726,59 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.level().isClientSide && this.hasCustomName()) {
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
}
@ -180,7 +180,7 @@ index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6
}
}
@@ -1742,7 +1780,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1748,7 +1786,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.level().isClientSide) {
boolean flag = false;
@ -189,7 +189,7 @@ index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6
if (this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
BlockPos blockposition = this.blockPosition();
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
@@ -1771,7 +1809,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1777,7 +1815,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
@ -202,7 +202,7 @@ index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6
Entity entity = source.getEntity();
int i;
@@ -1786,18 +1828,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1792,18 +1834,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropEquipment(); // CraftBukkit - from below
if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
this.dropFromLootTable(source, flag);
@ -232,7 +232,7 @@ index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6
// CraftBukkit start
public int getExpReward() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 2f33036a78a120898b18301bae1585c65fdb69dc..f91d6cc59f203fc67e38ba92159dbae22b6dbfac 100644
index e159da8a8dcff686e93d09a15141233915c264bf..4c0f7741e199e4bb03767effda669bbbc9f0d233 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1170,6 +1170,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a770d2bda45cee739a5371119018e6f6e4cbb2cb..9f97c1c18d7f7e084897f584be77b128c5cbfa13 100644
index 21d2c43a97122025edd91662e39d44cc867593a3..bac78415e34d41e3a5de482b86185f2202ecf068 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -121,6 +121,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@ -16,7 +16,7 @@ index a770d2bda45cee739a5371119018e6f6e4cbb2cb..9f97c1c18d7f7e084897f584be77b128
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam;
@@ -3996,6 +3997,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4002,6 +4003,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.level().clip(raytrace);
}

View File

@ -19,10 +19,10 @@ spectate the target entity.
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c97410f580f31389987ef944fc410e44459a4693..b331af6de6a23dedf6cd21b97cb81048db215f10 100644
index 4c0afa2589606d2748e54961f2a25e28a5309073..bea2c72cf0f4bed73984cde8f7d06cef797cd769 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2123,6 +2123,21 @@ public class ServerPlayer extends Player {
@@ -2133,6 +2133,21 @@ public class ServerPlayer extends Player {
this.camera = (Entity) (entity == null ? this : entity);
if (entity1 != this.camera) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dfaed8544c84f00d6092f7acab2193ee0228f9cf..edf138c1671592fecfbb532015cda3542dd3f690 100644
index b74bee4fa7bd222e5bb707f00aebe437dfa0886a..2cfd937f30e481038483a6ba2c552f5da316c66e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -494,9 +494,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index b331af6de6a23dedf6cd21b97cb81048db215f10..3b71ea8263b2049c54432a64c7f01aed3848d1c7 100644
index bea2c72cf0f4bed73984cde8f7d06cef797cd769..91ce1788e2a019c15fba2daf9ee383618f874fd4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2614,6 +2614,7 @@ public class ServerPlayer extends Player {
@@ -2624,6 +2624,7 @@ public class ServerPlayer extends Player {
this.setHealth(this.getMaxHealth());
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset

View File

@ -59,7 +59,7 @@ index 5f2dec1917f1c1c3bb69446832321f3fc21dc129..cd6f34ee326228036f8c025e4e6d04e0
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index edf138c1671592fecfbb532015cda3542dd3f690..578d70b6962201237069aba1208923fb7465e388 100644
index 2cfd937f30e481038483a6ba2c552f5da316c66e..b137faaf3a6f12b532555bfeebf245f0d6b38c59 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1583,6 +1583,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -72,10 +72,10 @@ index d39aec1b3233e91aa5b953396d876e7466a9a5bc..28708e1e8ade8fbfec24120478d250dd
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9f97c1c18d7f7e084897f584be77b128c5cbfa13..709bcc209299fcc5a593c1b4c93a179af2b5eff1 100644
index bac78415e34d41e3a5de482b86185f2202ecf068..a4eee658ecfc0f25e854c17a7715cb16715859b1 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3579,9 +3579,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3585,9 +3585,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void stopRiding() {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 578d70b6962201237069aba1208923fb7465e388..b277029f20f27431d62f05bf8fbd65095c5b15a8 100644
index b137faaf3a6f12b532555bfeebf245f0d6b38c59..8892e4a7ba98421cc41d5cabdb45ff8de755a442 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1040,6 +1040,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 3b71ea8263b2049c54432a64c7f01aed3848d1c7..05379ea4581db4277e6cc625ed0f3228bd0130fd 100644
index 91ce1788e2a019c15fba2daf9ee383618f874fd4..74da4c332045cb749104f2bc573e3116df91d01f 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -263,6 +263,7 @@ public class ServerPlayer extends Player {
@@ -264,6 +264,7 @@ public class ServerPlayer extends Player {
private int containerCounter;
public boolean wonGame;
private int containerUpdateDelay; // Paper - Configurable container update tick rate

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 05379ea4581db4277e6cc625ed0f3228bd0130fd..e5d8384830c83694a3560fc743dc38e645cf9cfd 100644
index 74da4c332045cb749104f2bc573e3116df91d01f..8fa241f2f229a8b0950bc1f8a7de61a02bc1020c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1789,6 +1789,13 @@ public class ServerPlayer extends Player {
@@ -1799,6 +1799,13 @@ public class ServerPlayer extends Player {
public void disconnect() {
this.disconnected = true;
this.ejectPassengers();

View File

@ -131,7 +131,7 @@ index b754c0b3e2cd878fca5f702daca64f837ec83451..f15c388434a0a501f86868de35cc1387
if (commandnode2.canUse(source)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b277029f20f27431d62f05bf8fbd65095c5b15a8..afe102a677546dd16b91433c7a50c62a05a00b20 100644
index 8892e4a7ba98421cc41d5cabdb45ff8de755a442..e241e0cae476ba963aff70b4f7ab038f07207303 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -766,19 +766,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -22,7 +22,7 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index afe102a677546dd16b91433c7a50c62a05a00b20..4e649fe68c6d0cf42e35f821457064656410d823 100644
index e241e0cae476ba963aff70b4f7ab038f07207303..fedc4654178a3771004394665914efd2b842432a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -11,10 +11,10 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
public net.minecraft.world.entity.player.Inventory compartments
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index e5d8384830c83694a3560fc743dc38e645cf9cfd..209d9f294a387e63b725be76cb645ca8925fa5a4 100644
index 8fa241f2f229a8b0950bc1f8a7de61a02bc1020c..0fd8af120734973d425dbd286a59d2b9c1a05162 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -880,6 +880,46 @@ public class ServerPlayer extends Player {
@@ -890,6 +890,46 @@ public class ServerPlayer extends Player {
});
}
@ -61,7 +61,7 @@ index e5d8384830c83694a3560fc743dc38e645cf9cfd..209d9f294a387e63b725be76cb645ca8
@Override
public void die(DamageSource damageSource) {
// this.gameEvent(GameEvent.ENTITY_DIE); // Paper - move below event cancellation check
@@ -964,7 +1004,12 @@ public class ServerPlayer extends Player {
@@ -974,7 +1014,12 @@ public class ServerPlayer extends Player {
this.dropExperience();
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 709bcc209299fcc5a593c1b4c93a179af2b5eff1..ba18e2decde409b40ac73c66b015419e219c759a 100644
index a4eee658ecfc0f25e854c17a7715cb16715859b1..d88b13be2d72cc40c5ca846a55eece1d9ca5fd37 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3815,9 +3815,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3821,9 +3821,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void startUsingItem(InteractionHand hand) {
@ -24,7 +24,7 @@ index 709bcc209299fcc5a593c1b4c93a179af2b5eff1..ba18e2decde409b40ac73c66b015419e
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration();
if (!this.level().isClientSide) {
@@ -3897,6 +3902,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3903,6 +3908,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@ -32,7 +32,7 @@ index 709bcc209299fcc5a593c1b4c93a179af2b5eff1..ba18e2decde409b40ac73c66b015419e
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -3931,8 +3937,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3937,8 +3943,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 209d9f294a387e63b725be76cb645ca8925fa5a4..9d08ff6024c6036dce57c833c1413033c8b2ef2c 100644
index 0fd8af120734973d425dbd286a59d2b9c1a05162..760ec9a315ff254b4c1e44310e3c1e2f7ab57125 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1001,7 +1001,7 @@ public class ServerPlayer extends Player {
@@ -1011,7 +1011,7 @@ public class ServerPlayer extends Player {
this.tellNeutralMobsThatIDied();
}
// SPIGOT-5478 must be called manually now

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Optimize call to getFluid for explosions
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 146f5a33e1d538e46e4f7034a498d30f742a96f7..b54a5c496ea7f1999c1b10219e72e9ce79921c99 100644
index b5b29210d9a6125d98e7dd737ca25f40545e512b..30109db978563fab1a33b450f0ca82e176539703 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -192,7 +192,7 @@ public class Explosion {

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ba18e2decde409b40ac73c66b015419e219c759a..67aa02a223345a91fe0b30b36966995e304c82bb 100644
index d88b13be2d72cc40c5ca846a55eece1d9ca5fd37..c2934dc1d87bd8211714ab8af8ddfc32695b7953 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3395,8 +3395,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3401,8 +3401,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
this.jumpInLiquid(FluidTags.LAVA);
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {

View File

@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
world and the world age for the start day.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 9d08ff6024c6036dce57c833c1413033c8b2ef2c..9f88d1771cefc4700911f1cd9841eb80fc7278a4 100644
index 760ec9a315ff254b4c1e44310e3c1e2f7ab57125..2c9494fb52c39a6aacd4d1dd553ca08e96abca78 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -264,6 +264,7 @@ public class ServerPlayer extends Player {
@@ -265,6 +265,7 @@ public class ServerPlayer extends Player {
public boolean wonGame;
private int containerUpdateDelay; // Paper - Configurable container update tick rate
public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed

View File

@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 9f88d1771cefc4700911f1cd9841eb80fc7278a4..74e8aef45702eef0dcabc7841a7c7125cc066cbe 100644
index 2c9494fb52c39a6aacd4d1dd553ca08e96abca78..4a9b5238cd1ab99920756d72c2ff32e04b35935a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -748,7 +748,7 @@ public class ServerPlayer extends Player {
@@ -758,7 +758,7 @@ public class ServerPlayer extends Player {
public void doTick() {
try {

View File

@ -13,10 +13,10 @@ By skipping this, we avoid potential for a large spike on server start.
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 74e8aef45702eef0dcabc7841a7c7125cc066cbe..618efe10752c968142fcc0f28a533d3515ef3367 100644
index 4a9b5238cd1ab99920756d72c2ff32e04b35935a..af40929f5d90973d8e624b98d5059fcce237b659 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -352,7 +352,7 @@ public class ServerPlayer extends Player {
@@ -353,7 +353,7 @@ public class ServerPlayer extends Player {
this.server = server;
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
@ -25,7 +25,7 @@ index 74e8aef45702eef0dcabc7841a7c7125cc066cbe..618efe10752c968142fcc0f28a533d35
this.updateOptions(clientOptions);
this.object = null;
@@ -611,7 +611,7 @@ public class ServerPlayer extends Player {
@@ -621,7 +621,7 @@ public class ServerPlayer extends Player {
position = Vec3.atCenterOf(world.getSharedSpawnPos());
}
this.setLevel(world);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 618efe10752c968142fcc0f28a533d3515ef3367..f6e4172f1c7ad38128e77e53f099e67a4c4be620 100644
index af40929f5d90973d8e624b98d5059fcce237b659..4492d082b172a8bfc65405bfa73865237d02dd3f 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -693,7 +693,7 @@ public class ServerPlayer extends Player {
@@ -703,7 +703,7 @@ public class ServerPlayer extends Player {
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
}
// Paper end - Configurable container update tick rate
@ -17,7 +17,7 @@ index 618efe10752c968142fcc0f28a533d3515ef3367..f6e4172f1c7ad38128e77e53f099e67a
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
this.containerMenu = this.inventoryMenu;
}
@@ -1592,7 +1592,7 @@ public class ServerPlayer extends Player {
@@ -1602,7 +1602,7 @@ public class ServerPlayer extends Player {
} else {
// CraftBukkit start
this.containerMenu = container;

View File

@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 67aa02a223345a91fe0b30b36966995e304c82bb..bca65fe3b38da83ce5f8fe67867b7cf19d02adbb 100644
index c2934dc1d87bd8211714ab8af8ddfc32695b7953..a54024b88555bd6a47314dcc42deae1252be7125 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3506,10 +3506,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3512,10 +3512,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.level().isClientSide()) {
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
} else {

View File

@ -87,10 +87,10 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index f6e4172f1c7ad38128e77e53f099e67a4c4be620..62bdc3016120271da2ca3a1f6ac46757e2e1dab4 100644
index 4492d082b172a8bfc65405bfa73865237d02dd3f..9f74168b0dd9392d2f4164fc7011e98623e28882 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -353,7 +353,7 @@ public class ServerPlayer extends Player {
@@ -354,7 +354,7 @@ public class ServerPlayer extends Player {
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
// this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn
@ -99,7 +99,7 @@ index f6e4172f1c7ad38128e77e53f099e67a4c4be620..62bdc3016120271da2ca3a1f6ac46757
this.object = null;
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
@@ -2086,7 +2086,23 @@ public class ServerPlayer extends Player {
@@ -2096,7 +2096,23 @@ public class ServerPlayer extends Player {
}
}
@ -123,7 +123,7 @@ index f6e4172f1c7ad38128e77e53f099e67a4c4be620..62bdc3016120271da2ca3a1f6ac46757
// CraftBukkit start
if (this.getMainArm() != clientOptions.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
@@ -2098,6 +2114,11 @@ public class ServerPlayer extends Player {
@@ -2108,6 +2124,11 @@ public class ServerPlayer extends Player {
this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper
}
// CraftBukkit end

View File

@ -43,10 +43,10 @@ index 66936834a80ef6b645ab44f3439defcb90237bfa..406c78dcb97d954f16f05d379d4dbf74
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 62bdc3016120271da2ca3a1f6ac46757e2e1dab4..e3f73ccbc2d62eef386adc6c66428c6081a68b8b 100644
index 9f74168b0dd9392d2f4164fc7011e98623e28882..a8c9a9cea8d527f2bb4393c0539b3c8f3b25e06e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -283,6 +283,7 @@ public class ServerPlayer extends Player {
@@ -284,6 +284,7 @@ public class ServerPlayer extends Player {
public double maxHealthCache;
public boolean joining = true;
public boolean sentListPacket = false;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index bca65fe3b38da83ce5f8fe67867b7cf19d02adbb..10e337fc1fb23d9eaab54f92021a7d95a14468f8 100644
index a54024b88555bd6a47314dcc42deae1252be7125..022ff3f125b7fe4f59b8c4bf75533d9b6cac4189 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2258,7 +2258,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2264,7 +2264,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {

View File

@ -80,10 +80,10 @@ index 04bd6d6bc6af0e423f56329dc3554b04170932f9..af49ff55865b327c167efedcb7413c27
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 10e337fc1fb23d9eaab54f92021a7d95a14468f8..8daaadbc524ee8d7c4a4ddd1d2a822f3b697abd0 100644
index 022ff3f125b7fe4f59b8c4bf75533d9b6cac4189..be1eff193cd0d581209d34e2ae81d1db67e5a153 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1734,9 +1734,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1740,9 +1740,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
if (deathEvent == null || !deathEvent.isCancelled()) {
@ -96,7 +96,7 @@ index 10e337fc1fb23d9eaab54f92021a7d95a14468f8..8daaadbc524ee8d7c4a4ddd1d2a822f3
// Paper start - clear equipment if event is not cancelled
if (this instanceof Mob) {
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
@@ -1837,8 +1837,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1843,8 +1843,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropCustomDeathLoot(source, i, flag);
this.clearEquipmentSlots = prev; // Paper
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4e649fe68c6d0cf42e35f821457064656410d823..997bf1c7bed5f78b017827acb6339f5e07791f7f 100644
index fedc4654178a3771004394665914efd2b842432a..b3026d2c70419a9de11f5887cbc998f29b7820eb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -892,7 +892,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleporting dead entities
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 997bf1c7bed5f78b017827acb6339f5e07791f7f..652e9e31cbda3551f6ddd5c697a0fa47ce1382b7 100644
index b3026d2c70419a9de11f5887cbc998f29b7820eb..b715e7b3230dba24d10230d5e4d8dd5589f93018 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1540,6 +1540,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -13,7 +13,7 @@ behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 652e9e31cbda3551f6ddd5c697a0fa47ce1382b7..a8155150c75f17b56ab5ebdb435d61d2b0ee576f 100644
index b715e7b3230dba24d10230d5e4d8dd5589f93018..2e27141c6cc2dec758f294381da39a683c4e194d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1355,6 +1355,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a8155150c75f17b56ab5ebdb435d61d2b0ee576f..8cb7b1c6ce0d0cc5bbd9d373772ef3aae3f62c7f 100644
index 2e27141c6cc2dec758f294381da39a683c4e194d..a6cd53e08a0770b93876f98efa7ebfe5b77a2f15 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3045,16 +3045,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -18,7 +18,7 @@ index cd6f34ee326228036f8c025e4e6d04e0c15ba06f..2f0d56c78584abe27ef050258827103f
return false;
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8cb7b1c6ce0d0cc5bbd9d373772ef3aae3f62c7f..5bc22e58a6ddfc0a5459c68e99fdf1095f23f0d8 100644
index a6cd53e08a0770b93876f98efa7ebfe5b77a2f15..8011266f5fe082c0a81a7a828fe2cf7445fba0f7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -803,7 +803,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -76,10 +76,10 @@ index 3d33504eac6af17c8833de11226968d52f96232f..4d7c2832a9cd9a88b99c837a02df7fa9
@Override
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index e3f73ccbc2d62eef386adc6c66428c6081a68b8b..0019e5313523521b4f1607dfc391d47c55961a48 100644
index a8c9a9cea8d527f2bb4393c0539b3c8f3b25e06e..7ecd6707c1325afb9f9c01699badefb4ea059501 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1228,7 +1228,7 @@ public class ServerPlayer extends Player {
@@ -1238,7 +1238,7 @@ public class ServerPlayer extends Player {
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
this.connection.send(new ClientboundRespawnPacket(this.createCommonSpawnInfo(worldserver), (byte) 3));
@ -89,7 +89,7 @@ index e3f73ccbc2d62eef386adc6c66428c6081a68b8b..0019e5313523521b4f1607dfc391d47c
playerlist.sendPlayerPermissionLevel(this);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5bc22e58a6ddfc0a5459c68e99fdf1095f23f0d8..324229e960c6fdf3de2a8d5c0c5516e262985efc 100644
index 8011266f5fe082c0a81a7a828fe2cf7445fba0f7..688579464e1f6e34f07e37f80efcd31a1a8a0538 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3248,7 +3248,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -30,7 +30,7 @@ index de40e522960469b98f987bd688489740446d9f85..a0a34f680e21007ebf2c2497d2e6505e
public CraftAttributeMap(AttributeMap handle) {
this.handle = handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 122142125dcba97572b1e0b9195e534a0e2257d9..a3ae3203e04dfb791b8aa537a303f4a4bd6cbab6 100644
index e88364dfe067c605856390d2cce07ba320632df9..069666c797c39b5119e41a3c18727f89fcc3b8c5 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -607,7 +607,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Do not accept invalid client settings
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 324229e960c6fdf3de2a8d5c0c5516e262985efc..ec5e4e6eb1de7e134e30247a0c43e73af7263e47 100644
index 688579464e1f6e34f07e37f80efcd31a1a8a0538..33c53c0b2dd755cb63288e9df5bb3dc11b3af55e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3240,6 +3240,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8daaadbc524ee8d7c4a4ddd1d2a822f3b697abd0..914c6499eb94665f0e3c4654dd05fc10d93f87d4 100644
index be1eff193cd0d581209d34e2ae81d1db67e5a153..81838056cacb9f2fd2d3c05b125461ac3013e82b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3618,7 +3618,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3624,7 +3624,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation

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