Updated Upstream (Bukkit/CraftBukkit/Spigot)

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:
cc9aa21a SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities
f23325b6 Add API for per-world simulation distances
26e1774e Add API for per-world view distances
0b541e60 Add PlayerLoginEvent#getRealAddress
5f027d2d PR-949: Add Vector#fromJOML() overloads for read-only vector types

CraftBukkit Changes:
bcf56171a PR-1321: Clean up some stuff which got missed during previous PRs
7f833a2d1 SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
752aac669 Implement APIs for per world view and simulation distances
57d7ef433 Preserve empty enchantment tags for glow effect
465ec3fb4 Remove connected check on setScoreboard
f90ce621e Use one PermissibleBase for all command blocks
5876cca44 SPIGOT-7550: Fix creation of Arrow instances
f03fc3aa3 SPIGOT-7549: ServerTickManager#setTickRate incorrect Precondition
9d7f49b01 SPIGOT-7548: Fix wrong spawn location for experience orb and dropped item

Spigot Changes:
ed9ba9a4 Drop no longer required patch ignoring -o option
86b5dd6a SPIGOT-7546: Fix hardcoded check for outdated client message
aa7cde7a Remove obsolete APIs for per world view and simulation distances
6dff577e Remove obsolete patch preserving empty `ench` tags
a3bf95b8 Remove obsolete PlayerLoginEvent#getRealAddress
1b02f5d6 Remove obsolete connected check on setScoreboard patch
acf717eb Remove obsolete command block PermissibleBase patch
053fa2a9 Remove redundant patch dealing with null tile entities
This commit is contained in:
Nassim Jahnke 2023-12-25 23:51:56 +01:00
parent 61768e08e7
commit e035fd7034
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
524 changed files with 578 additions and 622 deletions

View File

@ -1512,7 +1512,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
return warning == null || warning.value();
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index cd000a064732ebaa8802f3d7b7ba9bd7ba101f14..30dc2f85b60877930cab68230d3259ce92c08618 100644
index 6e7d5545e0f79d81832ccd5c8405a70d8daa256f..d59acc729ad5af515b8ef4c98a3edeb440854820 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -45,7 +45,7 @@ import org.jetbrains.annotations.Nullable;
@ -3601,27 +3601,27 @@ index 36b436e145a7215682b692a87ab894df25752c1d..c5e8bffef736365881953161ff812c98
return locale;
}
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674c58a98cf 100644
index 2bc81b0aa73f7f5b0352121f6bf18fa63acf7a83..eaa0548cf430bf5b58ff84e0a4403c451699db28 100644
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -17,7 +17,7 @@ public class PlayerLoginEvent extends PlayerEvent {
private final InetAddress address;
@@ -18,7 +18,7 @@ public class PlayerLoginEvent extends PlayerEvent {
private final InetAddress realAddress;
private final String hostname;
private Result result = Result.ALLOWED;
- private String message = "";
+ private net.kyori.adventure.text.Component message = net.kyori.adventure.text.Component.empty();
private final InetAddress realAddress; // Spigot
/**
@@ -53,12 +53,52 @@ public class PlayerLoginEvent extends PlayerEvent {
* This constructor defaults message to an empty string, and result to
@@ -60,13 +60,53 @@ public class PlayerLoginEvent extends PlayerEvent {
* @param result The result status for this event
* @param message The message to be displayed if result denies login
* @param realAddress the actual, unspoofed connecting address
+ * @deprecated in favour of {@link #PlayerLoginEvent(Player, String, InetAddress, Result, net.kyori.adventure.text.Component, InetAddress)}
*/
+ @Deprecated // Paper
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot
this(player, hostname, address, realAddress); // Spigot
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) {
this(player, hostname, address, realAddress);
this.result = result;
+ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper
+ }
@ -3638,12 +3638,12 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
+ * @param message The message to be displayed if result denies login
+ * @param realAddress the actual, unspoofed connecting address
+ */
+ public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) { // Spigot
+ public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) {
+ this(player, hostname, address, realAddress); // Spigot
+ this.result = result;
+ this.message = message;
+ }
+
this.message = message;
}
+ /**
+ * Gets the current kick message that will be used if getResult() !=
+ * Result.ALLOWED
@ -3660,13 +3660,14 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
+ * @param message New kick message
+ */
+ public void kickMessage(net.kyori.adventure.text.@NotNull Component message) {
this.message = message;
}
+ this.message = message;
+ }
+ // Paper end
// Spigot start
+
/**
@@ -96,19 +136,23 @@ public class PlayerLoginEvent extends PlayerEvent {
* Gets the current result of the login, as an enum
*
@@ -91,19 +131,23 @@ public class PlayerLoginEvent extends PlayerEvent {
* Result.ALLOWED
*
* @return Current kick message
@ -3692,7 +3693,7 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
}
/**
@@ -127,7 +171,7 @@ public class PlayerLoginEvent extends PlayerEvent {
@@ -122,7 +166,7 @@ public class PlayerLoginEvent extends PlayerEvent {
*/
public void allow() {
result = Result.ALLOWED;
@ -3701,7 +3702,7 @@ index 084ca8cfcb7381bfa4fa6280748cf9b81210a9c1..62fb782baad5c80a3daaa557c0faa674
}
/**
@@ -135,8 +179,21 @@ public class PlayerLoginEvent extends PlayerEvent {
@@ -130,8 +174,21 @@ public class PlayerLoginEvent extends PlayerEvent {
*
* @param result New result for disallowing the player
* @param message Kick message to display to the user

View File

@ -8,12 +8,12 @@ Add per player no-tick, tick, and send view distances.
Also add send/no-tick view distance to World.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 30dc2f85b60877930cab68230d3259ce92c08618..2867faf0acbbbb2e99c5b503f0c6bc83f3bfe80f 100644
index d59acc729ad5af515b8ef4c98a3edeb440854820..33f0cecdcd28efd721c58ebf1eb664bb5dba3803 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2745,6 +2745,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
int getSimulationDistance();
// Spigot end
@@ -2869,6 +2869,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Set<FeatureFlag> getFeatureFlags();
+ // Paper start - view distance api
+ /**
@ -71,11 +71,11 @@ index 30dc2f85b60877930cab68230d3259ce92c08618..2867faf0acbbbb2e99c5b503f0c6bc83
+ void setSendViewDistance(int viewDistance);
+ // Paper end - view distance api
+
// Spigot start
public class Spigot {
/**
* Represents various map environment types that a world may be
*/
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6cf37df9c12510846b40d37d71577de061d058de..6ed90056c16f8f3c0b844d378147397be94c3b58 100644
index c03b5f24304d28a5ebabdf6301165cf04dd5176c..15d73986499cc190de925c1024cea6dfdf930065 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2391,6 +2391,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -7,10 +7,10 @@ Upstream added methods for this so the original methods
are now deprecated
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 7c82644de3c438f45476ac02ce2c51c6fdbd543a..390bb294d09389877937ee2c6c3f346e65dfb178 100644
index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..1fdbfb14eaef0550363c5dd9793f933d8ece16ac 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -215,12 +215,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -217,12 +217,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
public int getArrowsInBody();
@ -38,7 +38,7 @@ index 7c82644de3c438f45476ac02ce2c51c6fdbd543a..390bb294d09389877937ee2c6c3f346e
/**
* Returns the living entity's current maximum no damage ticks.
@@ -722,4 +736,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -749,4 +763,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @return Whether the entity is invisible
*/
public boolean isInvisible();

View File

@ -142,10 +142,10 @@ index 1c088886add66f1e99bee42f70e5bc742c912e88..5a8f15195b0a87bb7a49983e5ee0dee6
* @return an array containing all previous players
*/
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index f5a398aa5f7a7e6280167fd723f78f4d72e2b1dd..faedd3857023513340b6e9fc67b78c79e3989cbe 100644
index 61639a865b8b8a845c78dcaf0a866082ef54bf63..f3607ab95f7f725283e8317c426dbc11bcc15cde 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2659,7 +2659,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2673,7 +2673,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Find the closest nearby structure of a given {@link StructureType}.
* Finding unexplored structures can, and will, block if the world is
@ -154,7 +154,7 @@ index f5a398aa5f7a7e6280167fd723f78f4d72e2b1dd..faedd3857023513340b6e9fc67b78c79
* temporarily freezing while locating an unexplored structure.
* <p>
* The {@code radius} is not a rigid square radius. Each structure may alter
@@ -2693,7 +2693,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2707,7 +2707,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Find the closest nearby structure of a given {@link StructureType}.
* Finding unexplored structures can, and will, block if the world is
@ -163,7 +163,7 @@ index f5a398aa5f7a7e6280167fd723f78f4d72e2b1dd..faedd3857023513340b6e9fc67b78c79
* temporarily freezing while locating an unexplored structure.
* <p>
* The {@code radius} is not a rigid square radius. Each structure may alter
@@ -2726,7 +2726,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2740,7 +2740,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
/**
* Find the closest nearby structure of a given {@link Structure}. Finding
* unexplored structures can, and will, block if the world is looking in
@ -386,7 +386,7 @@ index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218
@Override
public int getConversionTime();
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 732acee61a0a0c894df1b040dfd1d8a05141b5c4..4fd0ec2d6e520f60d20832325a8d171125ed9eef 100644
index 27d5503638d13ca2998ce4a4c6589ea62066128e..0c5f57e7530430de22a5eeb861032f04b2bc66c4 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -432,15 +432,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 390bb294d09389877937ee2c6c3f346e65dfb178..6a9df4ec0eee205bcd37de9c4d04a6c67eb21644 100644
index 1fdbfb14eaef0550363c5dd9793f933d8ece16ac..f0dd1a3d2d03366de104ba7d07f19fc9a2221925 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -319,6 +319,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -321,6 +321,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@Nullable
public Player getKiller();

View File

@ -523,10 +523,10 @@ index ca6d0eaa9d9a37c07f3e1630b83a79bf98211edb..26d02aa5da444112f8fa84c07e3080bb
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 58a15d8fd57d55848b37bfc8fffa101692efce87..93c46d40efd73293d84c7eaadf4e360cc3706e2a 100644
index 27b6825a04e7857e7924ba32f9cc43e960edd238..89d948229eee47c90d078ffa26b019bfe24a8115 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2841,7 +2841,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -2855,7 +2855,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 6a9df4ec0eee205bcd37de9c4d04a6c67eb21644..b470d86c00be238a430e64d349a247e2740cfeec 100644
index f0dd1a3d2d03366de104ba7d07f19fc9a2221925..9be2901986b14bc4a66a25fa3be231e2738b3792 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -764,5 +764,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -791,5 +791,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@Deprecated
void setArrowsStuck(int arrows);

View File

@ -20,10 +20,10 @@ index b3aa3dc6aa5afbc36cc86741b4cba56f463c2234..9e012c3c0671e5d0e55c243fdb4e1405
public ItemStack getItemInUse();
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b470d86c00be238a430e64d349a247e2740cfeec..97d0f82041a229e85217a7e575bf003eddc31b70 100644
index 9be2901986b14bc4a66a25fa3be231e2738b3792..3a2f5ba52c6be8930f7b411476b36afc161834c9 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -778,5 +778,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -805,5 +805,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param delay Delay in ticks
*/
void setShieldBlockingDelay(int delay);

View File

@ -78,10 +78,10 @@ index 0000000000000000000000000000000000000000..c896d172519a8552a132031cb956378d
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 97d0f82041a229e85217a7e575bf003eddc31b70..8a18f269ee1767d57367160cb0e3513a4e2969fb 100644
index 3a2f5ba52c6be8930f7b411476b36afc161834c9..b7bf0cc404634693d03c6700dc50c92697951c37 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -83,6 +83,98 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -85,6 +85,98 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull
public Block getTargetBlock(@Nullable Set<Material> transparent, int maxDistance);

View File

@ -51,10 +51,10 @@ index 0000000000000000000000000000000000000000..af8765b213390cf75fe02a6eb68aecf7
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 8a18f269ee1767d57367160cb0e3513a4e2969fb..79fdb183887cb8153254f6ac84a981a7ffcb561c 100644
index b7bf0cc404634693d03c6700dc50c92697951c37..47c4096699bc0334eacf10b6403c4a4329797f0e 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -173,6 +173,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -175,6 +175,77 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@Deprecated(forRemoval = true)
@Nullable
public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode);

View File

@ -600,7 +600,7 @@ index e455eb21abf121dc6ff10ff8a13dd06f67096a8f..bbc01e7c192ae6689c301670047ff114
return origin;
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 561cfe701d76fa0c85cea4a76affa7e90de82da0..8a200ffe1851b24110c92bb3a9f7ffc39b8c63f2 100644
index 313602704694c85bbac96b68deab67cd25f9913c..44ed5e72f17f156c9cf270fee31a9b80cf047a75 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -416,9 +416,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@ -614,18 +614,15 @@ index 561cfe701d76fa0c85cea4a76affa7e90de82da0..8a200ffe1851b24110c92bb3a9f7ffc3
public boolean refreshChunk(int x, int z);
/**
@@ -3762,6 +3761,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
// Paper end - view distance api
@@ -3704,6 +3703,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
// Spigot start
+ /**
+ * @deprecated Unsupported api
+ */
+ @Deprecated // Paper
+ @Deprecated(forRemoval = true) // Paper
public class Spigot {
/**
@@ -3770,8 +3773,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -3712,8 +3712,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param loc The location to strike lightning
* @param isSilent Whether this strike makes no sound
* @return The lightning entity.
@ -638,7 +635,7 @@ index 561cfe701d76fa0c85cea4a76affa7e90de82da0..8a200ffe1851b24110c92bb3a9f7ffc3
public LightningStrike strikeLightning(@NotNull Location loc, boolean isSilent) {
throw new UnsupportedOperationException("Not supported yet.");
}
@@ -3782,14 +3789,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -3724,14 +3728,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param loc The location to strike lightning
* @param isSilent Whether this strike makes no sound
* @return The lightning entity.
@ -661,7 +658,7 @@ index 561cfe701d76fa0c85cea4a76affa7e90de82da0..8a200ffe1851b24110c92bb3a9f7ffc3
Spigot spigot();
// Spigot end
@@ -3920,9 +3935,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -3918,9 +3930,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* Gets the dimension ID of this environment
*
* @return dimension ID
@ -673,7 +670,7 @@ index 561cfe701d76fa0c85cea4a76affa7e90de82da0..8a200ffe1851b24110c92bb3a9f7ffc3
public int getId() {
return id;
}
@@ -3932,9 +3947,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -3930,9 +3942,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*
* @param id The ID of the environment
* @return The environment
@ -856,10 +853,10 @@ index f124b35ec76e6cb6a1a0dc464005087043c3efd0..f50aaddf8582be55fd4860ad374d8f22
+@Deprecated(forRemoval = true) // Paper
public interface LingeringPotion extends ThrownPotion { }
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 79fdb183887cb8153254f6ac84a981a7ffcb561c..373b3ad6b3f94655289155914aec8294cd4f2fb2 100644
index 47c4096699bc0334eacf10b6403c4a4329797f0e..f52ac8b1063806e63f81a2107c4272f05314472b 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -664,7 +664,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -666,7 +666,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* This may have unexpected results if the entity is not in water.
*
* @param swimming True if the entity is swimming.
@ -895,7 +892,7 @@ index 95c79c5fa0c4e30201f887da6467ce5f81c8a255..7f9c4d4b430a3f0276461346ff2621ba
/**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index bfed5759b4f4613e5143da41f5e82a37ab4f10a8..5e7fec90713e580801c1e98bccf4adc5e16b9c71 100644
index e8d9b33f57b6eeb310662a63dde809ffaa49fcd2..b6ef3c47053747964289b99fc28be2e2452200b6 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1498,11 +1498,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM

View File

@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f0067c2e953d18e1a33536980071ba3f
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 373b3ad6b3f94655289155914aec8294cd4f2fb2..c18899e276eff043128794f27ca57cadaf41f439 100644
index f52ac8b1063806e63f81a2107c4272f05314472b..1f1aa4c7499e8ab2fc43b12939021c8c9b683d29 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -980,5 +980,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1007,5 +1007,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@NotNull
org.bukkit.inventory.EquipmentSlot getHandRaised();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index c18899e276eff043128794f27ca57cadaf41f439..d53bc45dbec1b399d4df2aa87a2f2c490c4a6788 100644
index 1f1aa4c7499e8ab2fc43b12939021c8c9b683d29..a8fac70ec7158fd14cd72714fed3b4df2f8d8223 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1000,5 +1000,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1027,5 +1027,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param jumping entity jump state
*/
void setJumping(boolean jumping);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index d53bc45dbec1b399d4df2aa87a2f2c490c4a6788..b830a5f4ebc4cacebc1e86c571c1dfb0293cc1b0 100644
index a8fac70ec7158fd14cd72714fed3b4df2f8d8223..92a84d28f06c4a95fe0d5b2a3c1f73f0b07839d5 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -951,6 +951,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -978,6 +978,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull
org.bukkit.inventory.ItemStack getActiveItem();

View File

@ -26,10 +26,10 @@ index 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50d
* Get the sleep ticks of the player. This value may be capped.
*
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b830a5f4ebc4cacebc1e86c571c1dfb0293cc1b0..9763cf4720e1278061e3ba139b824147e9540945 100644
index 92a84d28f06c4a95fe0d5b2a3c1f73f0b07839d5..2d634e03c14d9f6fdc767e7dfe35e8ae0088cee9 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1030,5 +1030,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1057,5 +1057,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param quantity quantity of item
*/
void playPickupItemAnimation(@NotNull Item item, int quantity);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] More World API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index dd498e3ba46bd001028f7f9f94e18de42e875ff6..8735a0a359450a6cbea44c1b01c85a4135ba1f86 100644
index 81b4e5764f68ef38938e645ca8180fc5ce263811..3fecfdebe43e3b543725a43f73465ae9ea030a0c 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3769,6 +3769,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -3783,6 +3783,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
@ -129,5 +129,5 @@ index dd498e3ba46bd001028f7f9f94e18de42e875ff6..8735a0a359450a6cbea44c1b01c85a41
+ // Paper end
+
// Spigot start
/**
* Returns the view distance used for this world.
@Deprecated(forRemoval = true) // Paper
public class Spigot {

View File

@ -23,10 +23,10 @@ index d8b1fa79dc24138dc71e32c14bda71c1d570ed88..b68367f123f029c3ff47eab6bfabd7a8
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 9763cf4720e1278061e3ba139b824147e9540945..b665b99ca6de3a35c3296a500db1527a8513a711 100644
index 2d634e03c14d9f6fdc767e7dfe35e8ae0088cee9..ef31d309ec21174aafe54a219440bf8508fd0ac8 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -570,6 +570,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -572,6 +572,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
public boolean hasLineOfSight(@NotNull Entity other);

View File

@ -569,10 +569,10 @@ index 6b3c9bef9a8a34ddc6ff42cf358541a2665bf5e3..9c618a27d590f186f29c5d9094fc565e
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b665b99ca6de3a35c3296a500db1527a8513a711..56a59bfee3138bfb93cbb85c5d8b86e3aa977b05 100644
index ef31d309ec21174aafe54a219440bf8508fd0ac8..adf2870ab81b6ff8f595e11b55f043c4fd51281e 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -971,6 +971,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -998,6 +998,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
void clearActiveItem();
// Paper end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 56a59bfee3138bfb93cbb85c5d8b86e3aa977b05..4c1c87c07735eecc2a1eaef2da77d3fe636adefb 100644
index adf2870ab81b6ff8f595e11b55f043c4fd51281e..3be060731b9b2df3408e8c5627a3640262cdc4d5 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -399,6 +399,36 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -401,6 +401,36 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setArrowsInBody(int count, boolean fireEvent); // Paper

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 4c1c87c07735eecc2a1eaef2da77d3fe636adefb..ac87b7a28553425dc45af11ac6f5089f5197ce20 100644
index 3be060731b9b2df3408e8c5627a3640262cdc4d5..f9fe94d2bbfb5cd31ecc706e114be566fef7698a 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1140,5 +1140,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1167,5 +1167,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@Deprecated
void setHurtDirection(float hurtDirection);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index ac87b7a28553425dc45af11ac6f5089f5197ce20..eced9bfd35aa822b1ba141ea60e603bca5a137f8 100644
index f9fe94d2bbfb5cd31ecc706e114be566fef7698a..98956d13ac767cca447f53c10f1b1fedafad7fbf 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1158,5 +1158,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1185,5 +1185,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
this.swingOffHand();
}
}

View File

@ -8,10 +8,10 @@ to simulate damage done to an itemstack and all
the logic associated with damaging them
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index eced9bfd35aa822b1ba141ea60e603bca5a137f8..088f42f294784e14f4478255193f4fd40cba4e53 100644
index 98956d13ac767cca447f53c10f1b1fedafad7fbf..c0e31ebbb41bd3013fe4a1609dd9af754434736d 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1170,5 +1170,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1197,5 +1197,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param directionZ The relative z position of the knockback source direction
*/
void knockback(double strength, double directionX, double directionZ);

View File

@ -59,10 +59,10 @@ index d0bef15785493b512ff0f7414c1d58d38fead581..58017fce436cdbda255f7172fbdadb72
/**
* Gets the item stack associated with this item drop.
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 088f42f294784e14f4478255193f4fd40cba4e53..4682df5d422c24c2d145bd28bc3d0fa8b1cd6ce8 100644
index c0e31ebbb41bd3013fe4a1609dd9af754434736d..b6df5fd8eda6a30c119b3fa3844e6bb0425e2f39 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a living entity, such as a monster or player
*/

View File

@ -53,10 +53,10 @@ index c9139bb7abc881fddd2d5610d9506cd4fce7eba3..bb1ed1e16bd17161bbf554acc03d1e32
// Paper Start - Collision API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 4682df5d422c24c2d145bd28bc3d0fa8b1cd6ce8..bd5e53372ce860924f5403dca6b0c45878a9e4d2 100644
index b6df5fd8eda6a30c119b3fa3844e6bb0425e2f39..0b4cd106265c6c675bd27cd66a275a48217a7419 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1217,5 +1217,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1244,5 +1244,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param amount the amount of damage to do
*/
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index bd5e53372ce860924f5403dca6b0c45878a9e4d2..a599ed2795ba1baf2cbb465d1c7145580c27e1ea 100644
index 0b4cd106265c6c675bd27cd66a275a48217a7419..e68c71047b2bc1b456c380db25b3ff376852b4a9 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -589,6 +589,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -591,6 +591,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull
public Collection<PotionEffect> getActivePotionEffects();

View File

@ -6365,10 +6365,10 @@ index 1641bdf8725df778ba91bf5cd22c1ebbb3745058..facfdbb87e89f4db33ce13233c2ba436
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df8040ded627b 100644
index f083356fe490ecebdc1486784f4833d778b816f4..a4d1136fcd75ecdf2cbd7af591d4acb4dfd248ba 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -167,6 +167,62 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -168,6 +168,62 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
};
// CraftBukkit end
@ -6431,7 +6431,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
this.visibleChunkMap = this.updatingChunkMap.clone();
@@ -220,7 +276,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -221,7 +277,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.overworldDataStorage = persistentStateManagerFactory;
this.poiManager = new PoiManager(path.resolve("poi"), dataFixer, dsync, iregistrycustom, world);
this.setServerViewDistance(viewDistance);
@ -6451,7 +6451,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
protected ChunkGenerator generator() {
return this.generator;
@@ -321,6 +389,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -322,6 +390,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}
@ -6467,7 +6467,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
private CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkHolder centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) {
if (margin == 0) {
ChunkStatus chunkstatus = (ChunkStatus) distanceToStatus.apply(0);
@@ -417,9 +494,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -418,9 +495,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
};
stringbuilder.append("Updating:").append(System.lineSeparator());
@ -6479,7 +6479,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
CrashReport crashreport = CrashReport.forThrowable(exception, "Chunk loading");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Chunk loading");
@@ -461,8 +538,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -462,8 +539,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
holder.setTicketLevel(level);
} else {
holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this.queueSorter, this);
@ -6494,7 +6494,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
this.updatingChunkMap.put(pos, holder);
this.modified = true;
}
@@ -484,7 +567,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -485,7 +568,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
protected void saveAllChunks(boolean flush) {
if (flush) {
@ -6503,7 +6503,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
MutableBoolean mutableboolean = new MutableBoolean();
do {
@@ -513,7 +596,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -514,7 +597,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
});
this.flushWorker();
} else {
@ -6512,7 +6512,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
}
}
@@ -532,7 +615,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -533,7 +616,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public boolean hasWork() {
@ -6521,7 +6521,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
}
private void processUnloads(BooleanSupplier shouldKeepTicking) {
@@ -543,6 +626,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -544,6 +627,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
if (playerchunk != null) {
@ -6529,7 +6529,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
this.pendingUnloads.put(j, playerchunk);
this.modified = true;
++i;
@@ -560,7 +644,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -561,7 +645,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
int l = 0;
@ -6538,7 +6538,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
while (l < 20 && shouldKeepTicking.getAsBoolean() && objectiterator.hasNext()) {
if (this.saveChunkIfNeeded((ChunkHolder) objectiterator.next())) {
@@ -578,7 +662,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -579,7 +663,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (completablefuture1 != completablefuture) {
this.scheduleUnload(pos, holder);
} else {
@ -6551,7 +6551,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
if (ichunkaccess instanceof LevelChunk) {
((LevelChunk) ichunkaccess).setLoaded(false);
}
@@ -594,7 +682,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -595,7 +683,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.lightEngine.tryScheduleUpdate();
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
this.chunkSaveCooldowns.remove(ichunkaccess.getPos().toLong());
@ -6562,7 +6562,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
}
};
@@ -1037,7 +1127,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1038,7 +1128,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public int size() {
@ -6571,7 +6571,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
}
public DistanceManager getDistanceManager() {
@@ -1045,19 +1135,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1046,19 +1136,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
protected Iterable<ChunkHolder> getChunks() {
@ -6596,7 +6596,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
Optional<ChunkAccess> optional = Optional.ofNullable(playerchunk.getLastAvailable());
Optional<LevelChunk> optional1 = optional.flatMap((ichunkaccess) -> {
return ichunkaccess instanceof LevelChunk ? Optional.of((LevelChunk) ichunkaccess) : Optional.empty();
@@ -1182,6 +1272,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1183,6 +1273,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
player.setChunkTrackingView(ChunkTrackingView.EMPTY);
this.updateChunkTracking(player);
@ -6604,7 +6604,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
} else {
SectionPos sectionposition = player.getLastSectionPos();
@@ -1190,6 +1281,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1191,6 +1282,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.distanceManager.removePlayer(sectionposition, player);
}
@ -6612,7 +6612,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
this.applyChunkTrackingView(player, ChunkTrackingView.EMPTY);
}
@@ -1241,6 +1333,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1242,6 +1334,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.updateChunkTracking(player);
}
@ -6620,7 +6620,7 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
}
private void updateChunkTracking(ServerPlayer player) {
@@ -1493,7 +1586,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1494,7 +1587,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private class ChunkDistanceManager extends DistanceManager {
protected ChunkDistanceManager(Executor workerExecutor, Executor mainThreadExecutor) {
@ -6630,13 +6630,13 @@ index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df804
@Override
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index 1bfa33253a154c66dc8b7e476c777b74cda8999f..d8b83c8c89143d78620f812c491a1950e3218eb1 100644
index 2a805b9e67b7a05dda5f9caa4b63b28c940828d0..42f9f28726bc6ef09ab877ecf663b4caa5003a3a 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
@@ -56,8 +56,9 @@ public abstract class DistanceManager {
final Executor mainThreadExecutor;
private long ticketTickCounter;
private int simulationDistance = 10;
public int simulationDistance = 10;
+ private final ChunkMap chunkMap; // Paper
- protected DistanceManager(Executor workerExecutor, Executor mainThreadExecutor) {
@ -7093,7 +7093,7 @@ index 9cf839be15126444d4d2ffdb7faa637859941d6b..3bd2bddb782d29e647a1f1b362a39d22
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 11a5b918520043bf047d3610a9e79ecc3a7fab47..c8e016135ad80a892b48a6a338c24cfd757a5f10 100644
index e89125da8e53cbfaa9ec5c6e56de2f7e8466c99f..a721e9cd0958d7fceed1aba8ae55fefed4e6a887 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -259,6 +259,8 @@ public class ServerPlayer extends Player {
@ -7204,7 +7204,7 @@ index 06d015dd8b14008f3fe2fae5005a4d41be26346b..d0f1cd32aa71f275c9975d1cedc8895f
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 a2dfb248d73c8031f2f0ae55f5fa20bb95629fd9..c2c3fa92235c365f4e4a8bdffa3295e32ebd8d16 100644
index 7fda861b1c2fc7246f2df8d199b4e8bbe55bc647..b71b702471599fc8f1de42919ade8ee6a4e6247c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -257,6 +257,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -7387,7 +7387,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671
public BlockState getBlockState(BlockPos pos) {
return Blocks.AIR.defaultBlockState();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 50ea733f42d0f06a62b55e61b0c73995896b0d6a..915c1dfae28ccac02d5ebb97d5cf797c66d2c8e4 100644
index 81fbc18b0cd9bc443555001947796342be4123b8..9f8f9dea26e55f8785d3702c1e3d83f6f87358bb 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -93,6 +93,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -7855,10 +7855,10 @@ index 98836000cbca2a21649cb8f2a466986373405ea1..bbbf6dd8e566ecdca8794e3b03765fe7
return false;
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c0c0e704f67124b333e54ac72444d6265d1fbafb..c4936130274d5e4512decea691e151dbc2c9ff54 100644
index e124f481304bf65eb5b110db41005fa0cb69d835..8bc43dde03f461d9f7470c521f47e959d07cde67 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -246,8 +246,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -245,8 +245,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Chunk[] getLoadedChunks() {
@ -7869,7 +7869,7 @@ index c0c0e704f67124b333e54ac72444d6265d1fbafb..c4936130274d5e4512decea691e151db
}
@Override
@@ -322,7 +322,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -321,7 +321,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean refreshChunk(int x, int z) {
@ -7878,7 +7878,7 @@ index c0c0e704f67124b333e54ac72444d6265d1fbafb..c4936130274d5e4512decea691e151db
if (playerChunk == null) return false;
playerChunk.getTickingChunkFuture().thenAccept(either -> {
@@ -2030,4 +2030,32 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2027,4 +2027,32 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return this.spigot;
}
// Spigot end
@ -7912,7 +7912,7 @@ index c0c0e704f67124b333e54ac72444d6265d1fbafb..c4936130274d5e4512decea691e151db
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 0b369866a31efa8bd86a6927e83cfec06fcbedcc..c65f9f63f7eff2c3acb3339a75da58b7b1550682 100644
index 70165d287156f46b793eb23dd30b601289c0ffb1..758bf988432bb34aad9386e3f4e8bba68891660b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -897,4 +897,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

View File

@ -2703,7 +2703,7 @@ index 729849caf3e3cb542d5c4097a568c5fadeff0f6d..1eb0809addfd77303b94bb594701ee7f
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 c8e016135ad80a892b48a6a338c24cfd757a5f10..b403b7d585f474e2b6029404d19e756a40206f7f 100644
index a721e9cd0958d7fceed1aba8ae55fefed4e6a887..d53c25ed96cfea839a5ad3531092d63478f6b869 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -162,6 +162,7 @@ import net.minecraft.world.damagesource.CombatTracker;
@ -3494,10 +3494,10 @@ index 0a39f95c77f0a2015200bb95b17eee9cbe95c416..67e90e18793852baf6dbd1aa41351a69
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c4936130274d5e4512decea691e151dbc2c9ff54..bb60804a77ecda3c86ccf54e028e634f8d7f141d 100644
index 8bc43dde03f461d9f7470c521f47e959d07cde67..1ae3d9fc4ed6bba1881079b86b965e2f51bcb5e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -156,6 +156,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -155,6 +155,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>();
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
@ -3505,7 +3505,7 @@ index c4936130274d5e4512decea691e151dbc2c9ff54..bb60804a77ecda3c86ccf54e028e634f
private static final Random rand = new Random();
@@ -1637,6 +1638,39 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1646,6 +1647,39 @@ public class CraftWorld extends CraftRegionAccessor implements World {
entityTracker.broadcastAndSend(packet);
}
}
@ -3545,7 +3545,7 @@ index c4936130274d5e4512decea691e151dbc2c9ff54..bb60804a77ecda3c86ccf54e028e634f
private static Map<String, GameRules.Key<?>> gamerules;
public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
@@ -2057,5 +2091,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2054,5 +2088,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return ret;
}
@ -3833,10 +3833,10 @@ index d4724c812f8b7322ad59dc0695d01ceb47772dc4..4747d77fd5fd12116ef40d897a08c7ba
return this.signText;
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
index 59771cbfefeba8b582cd16dcf72c4ec177781a54..ab4142dfb23fc3bcf225f487f81bfdce035d8778 100644
index f2e8b63d787754c0a92441dcc9eb39dffdc1e280..9feae61fe02cbc624581ef0bd4c60af636407367 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
@@ -45,6 +45,18 @@ public class CraftBlockCommandSender extends ServerCommandSender implements Bloc
@@ -61,6 +61,18 @@ public class CraftBlockCommandSender extends ServerCommandSender implements Bloc
return this.block.getTextName();
}
@ -3854,7 +3854,7 @@ index 59771cbfefeba8b582cd16dcf72c4ec177781a54..ab4142dfb23fc3bcf225f487f81bfdce
+
@Override
public boolean isOp() {
return true;
return CraftBlockCommandSender.SHARED_PERM.isOp();
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
index f3cb4102ab223f379f60dac317df7da1fab812a8..324e6d1a4fadd3e557e4ba05f04e6a5891cc54df 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
@ -3922,18 +3922,18 @@ index 53d6950ad270ba901de5226b9daecb683248ad05..3e7d14564f11a3ed0b0766444e9d6818
public boolean isPermissionSet(String name) {
return this.getCaller().isPermissionSet(name);
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
index 8107ed0d248ff2a1cf8e556b7610a68f6c197691..eaff8df6c8c12c64e005a68a02e2e35ed88f757c 100644
index 1e82312c24cb752d63b165926861fc178cd7849b..7f22950ae61436e91a59cd29a345809c42bbe739 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
@@ -14,6 +14,7 @@ import org.bukkit.plugin.Plugin;
@@ -13,6 +13,7 @@ import org.bukkit.plugin.Plugin;
public abstract class ServerCommandSender implements CommandSender {
private static PermissibleBase blockPermInst;
private final PermissibleBase perm;
+ private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
public ServerCommandSender() {
if (this instanceof CraftBlockCommandSender) {
@@ -134,4 +135,18 @@ public abstract class ServerCommandSender implements CommandSender {
protected ServerCommandSender() {
this.perm = new PermissibleBase(this);
@@ -130,4 +131,18 @@ public abstract class ServerCommandSender implements CommandSender {
return this.spigot;
}
// Spigot end
@ -3970,7 +3970,7 @@ index 6f95a6bf27af151aec38bb2bd6fa657acc1c62e9..b54bd4e85042955448a2e76b379d370e
@Override
public boolean equals(Object other) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index c65f9f63f7eff2c3acb3339a75da58b7b1550682..fa66a1c6c26f8952478edcf6d7d0598d64d9111c 100644
index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a58325fa3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -66,6 +66,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -4085,7 +4085,7 @@ index 61759e8179d0f6342abf0c0294e5a024928db8d9..92e21126a9347f1ee2279ab09bb6abf2
public boolean isOp() {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 429bbe15f8b04a57108f311a9cc198ed5c5a45c5..c683afd09f03188638983bbdbe271a7e407a3efe 100644
index d5e56ed0a1bef50c0c715a7877f43fbc80dcaa44..af299f1e8a090758dea933647a4322f8f57d0aef 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -300,14 +300,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -4329,7 +4329,7 @@ index 429bbe15f8b04a57108f311a9cc198ed5c5a45c5..c683afd09f03188638983bbdbe271a7e
@Override
public void removeResourcePack(UUID id) {
Preconditions.checkArgument(id != null, "Resource pack id cannot be null");
@@ -2136,6 +2255,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2135,6 +2254,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance();
}
@ -4342,7 +4342,7 @@ index 429bbe15f8b04a57108f311a9cc198ed5c5a45c5..c683afd09f03188638983bbdbe271a7e
@Override
public int getPing() {
return this.getHandle().connection.latency();
@@ -2186,6 +2311,252 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2185,6 +2310,252 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().allowsListing();
}
@ -5043,7 +5043,7 @@ index cc588fb207062829637adad79129ca91950496cb..8b27ca7606869798486c3afd03e86205
+ // 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 8aa5a8404dcbb83f88ef60c74c4aeb339231adc8..9d779d899eaed1122b70a2aa40eb7950d26b45de 100644
index 1f375990bae26abc744b3f110ecfc371ab3c3145..9e74a28d77c4c91ad46750d924a3e0789683a875 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -750,6 +750,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

View File

@ -974,7 +974,7 @@ index 4b303d8acc663cfd3b86e37f4a3110d5335d07ad..cb95818bfb5f0a9274b4e0f2530000bf
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 770f6a08c613093577172385549df8040ded627b..c1bb511cc25ca97282ee02d2b207e2940279c190 100644
index a4d1136fcd75ecdf2cbd7af591d4acb4dfd248ba..17af50aa1ab310a5f0f221e2cd4e9e902c28a092 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,8 +1,10 @@
@ -988,7 +988,7 @@ index 770f6a08c613093577172385549df8040ded627b..c1bb511cc25ca97282ee02d2b207e294
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
@@ -896,6 +898,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -897,6 +899,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkStatus chunkstatus = ChunkLevel.generationStatus(chunkHolder.getTicketLevel());
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
@ -996,7 +996,7 @@ index 770f6a08c613093577172385549df8040ded627b..c1bb511cc25ca97282ee02d2b207e294
ChunkPos chunkcoordintpair = chunkHolder.getPos();
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
LevelChunk chunk;
@@ -920,6 +923,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -921,6 +924,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
return chunk;
@ -1004,7 +1004,7 @@ index 770f6a08c613093577172385549df8040ded627b..c1bb511cc25ca97282ee02d2b207e294
});
}, (runnable) -> {
ProcessorHandle mailbox = this.mainThreadMailbox;
@@ -1471,6 +1475,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1472,6 +1476,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
@ -1012,7 +1012,7 @@ index 770f6a08c613093577172385549df8040ded627b..c1bb511cc25ca97282ee02d2b207e294
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
@@ -1495,14 +1500,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1496,14 +1501,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.serverEntity.sendChanges();
}
}
@ -1391,7 +1391,7 @@ index c4bc491eed487c0a7e30538b0fb46fde91cd7b31..382b55167dede435b034866bd394455f
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index c2c3fa92235c365f4e4a8bdffa3295e32ebd8d16..4afd257f30ab063c4805e8a3144f51d643c49db3 100644
index b71b702471599fc8f1de42919ade8ee6a4e6247c..2e47008a8ff1bb56b752d4eb880173b9edfbc4ad 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -140,7 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1472,7 +1472,7 @@ index c2c3fa92235c365f4e4a8bdffa3295e32ebd8d16..4afd257f30ab063c4805e8a3144f51d6
if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
this.hurt(this.damageSources().drown(), 1.0F);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 915c1dfae28ccac02d5ebb97d5cf797c66d2c8e4..26fe1603b3899f5b69980dc64d46d26d9c944fde 100644
index 9f8f9dea26e55f8785d3702c1e3d83f6f87358bb..6e3bdcea55490b23066ab90966698e59847cdffa 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -91,7 +91,6 @@ import org.bukkit.Bukkit;
@ -1501,7 +1501,7 @@ index 915c1dfae28ccac02d5ebb97d5cf797c66d2c8e4..26fe1603b3899f5b69980dc64d46d26d
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}
@@ -725,15 +724,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -718,15 +717,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.timings.tileEntityTick.stopTiming(); // Spigot
this.tickingBlockEntities = false;
@ -1817,10 +1817,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c683afd09f03188638983bbdbe271a7e407a3efe..ea7eb5019b5332469f8c1b51ccfe97de206bcb0c 100644
index af299f1e8a090758dea933647a4322f8f57d0aef..cf8a5b3ba642d4829725bc488c074b1b3b142867 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2632,6 +2632,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2631,6 +2631,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
}

View File

@ -4493,10 +4493,10 @@ index facfdbb87e89f4db33ce13233c2ba4366d35c15b..807a6bb1026dac2c4cd0a50afe06fd62
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
public int oldTicketLevel;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index c1bb511cc25ca97282ee02d2b207e2940279c190..1fcfff903a9423512f1fc6c997b67597e4e2831d 100644
index 17af50aa1ab310a5f0f221e2cd4e9e902c28a092..5ae30cd3af88c4f4179a4dc0c94906cfbfb7ff29 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -124,7 +124,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -125,7 +125,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private final LongSet entitiesInLevel;
public final ServerLevel level;
private final ThreadedLevelLightEngine lightEngine;
@ -4506,7 +4506,7 @@ index c1bb511cc25ca97282ee02d2b207e2940279c190..1fcfff903a9423512f1fc6c997b67597
private final RandomState randomState;
private final ChunkGeneratorStructureState chunkGeneratorState;
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index d8b83c8c89143d78620f812c491a1950e3218eb1..f3c9a3dbb6f0e6f825b7477c89ed72ed52845419 100644
index 42f9f28726bc6ef09ab877ecf663b4caa5003a3a..0bd05d7a8f2a388c28ddcf3f07db5b0648dddeea 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
@@ -386,7 +386,7 @@ public abstract class DistanceManager {

View File

@ -17518,10 +17518,10 @@ index 807a6bb1026dac2c4cd0a50afe06fd62ce23558b..2b998bdbe49bf8211b755e0eb7c1bf13
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a287fa0e9 100644
index 5ae30cd3af88c4f4179a4dc0c94906cfbfb7ff29..5a653dffecd3877c84ac8197e1ef4b7bbc9820ce 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -118,10 +118,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -119,10 +119,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public static final int MIN_VIEW_DISTANCE = 2;
public static final int MAX_VIEW_DISTANCE = 32;
public static final int FORCED_TICKET_LEVEL = ChunkLevel.byStatus(FullChunkStatus.ENTITY_TICKING);
@ -17533,7 +17533,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
public final ServerLevel level;
private final ThreadedLevelLightEngine lightEngine;
public final BlockableEventLoop<Runnable> mainThreadExecutor; // Paper - public
@@ -130,16 +127,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -131,16 +128,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private final ChunkGeneratorStructureState chunkGeneratorState;
public final Supplier<DimensionDataStorage> overworldDataStorage;
private final PoiManager poiManager;
@ -17553,9 +17553,9 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
private final String storageName;
private final PlayerMap playerMap;
public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap;
@@ -148,26 +143,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -149,27 +144,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private final Queue<Runnable> unloadQueue;
private int serverViewDistance;
public int serverViewDistance;
- // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback()
- public final CallbackExecutor callbackExecutor = new CallbackExecutor();
@ -17577,11 +17577,11 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
- }
- };
- // CraftBukkit end
+ // Paper - rewrite chunk system
-
// Paper start - distance maps
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
@@ -177,6 +153,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -178,6 +152,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
int chunkZ = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getZ());
// Note: players need to be explicitly added to distance maps before they can be updated
this.nearbyPlayers.addPlayer(player);
@ -17589,7 +17589,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
void removePlayerFromDistanceMaps(ServerPlayer player) {
@@ -184,6 +161,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -185,6 +160,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
int chunkZ = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getZ());
// Note: players need to be explicitly added to distance maps before they can be updated
this.nearbyPlayers.removePlayer(player);
@ -17597,7 +17597,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
void updateMaps(ServerPlayer player) {
@@ -191,6 +169,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -192,6 +168,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
int chunkZ = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getZ());
// Note: players need to be explicitly added to distance maps before they can be updated
this.nearbyPlayers.tickPlayer(player);
@ -17605,7 +17605,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
// Paper end
// Paper start
@@ -220,17 +199,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -221,17 +198,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public final ChunkHolder getUnloadingChunkHolder(int chunkX, int chunkZ) {
@ -17625,7 +17625,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
this.tickingGenerated = new AtomicInteger();
this.playerMap = new PlayerMap();
this.entityMap = new Int2ObjectOpenHashMap();
@@ -261,19 +237,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -262,19 +236,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.chunkGeneratorState = chunkGenerator.createState(iregistrycustom.lookupOrThrow(Registries.STRUCTURE_SET), this.randomState, j, world.spigotConfig); // Spigot
this.mainThreadExecutor = mainThreadExecutor;
@ -17650,7 +17650,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
this.distanceManager = new ChunkMap.ChunkDistanceManager(executor, mainThreadExecutor);
this.overworldDataStorage = persistentStateManagerFactory;
this.poiManager = new PoiManager(path.resolve("poi"), dataFixer, dsync, iregistrycustom, world);
@@ -325,23 +299,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -326,23 +298,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
boolean isChunkTracked(ServerPlayer player, int chunkX, int chunkZ) {
@ -17680,7 +17680,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
protected ThreadedLevelLightEngine getLightEngine() {
@@ -350,20 +316,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -351,20 +315,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@Nullable
protected ChunkHolder getUpdatingChunkIfPresent(long pos) {
@ -17710,7 +17710,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
public String getChunkDebugData(ChunkPos chunkPos) {
@@ -393,92 +361,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -394,92 +360,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper start
public final int getEffectiveViewDistance() {
@ -17805,7 +17805,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
public ReportedException debugFuturesAndCreateReportedException(IllegalStateException exception, String details) {
@@ -508,263 +396,72 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -509,263 +395,72 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> prepareEntityTickingChunk(ChunkHolder chunk) {
@ -18089,7 +18089,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
return nbt.contains("Status", 8);
}
@@ -800,54 +497,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -801,54 +496,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
private CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> scheduleChunkGeneration(ChunkHolder holder, ChunkStatus requiredStatus) {
@ -18145,7 +18145,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
protected void releaseLightTicket(ChunkPos pos) {
@@ -858,7 +508,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -859,7 +507,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}));
}
@ -18154,7 +18154,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
ChunkStatus chunkstatus1;
if (distance == 0) {
@@ -870,7 +520,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -871,7 +519,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return chunkstatus1;
}
@ -18163,7 +18163,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
if (!nbt.isEmpty()) {
// CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
world.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(nbt, world).filter((entity) -> {
@@ -885,111 +535,27 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -886,111 +534,27 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
needsRemoval = true;
}
return !needsRemoval;
@ -18280,7 +18280,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
public int getTickingGenerated() {
@@ -997,130 +563,52 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -998,130 +562,52 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
private boolean saveChunkIfNeeded(ChunkHolder chunkHolder) {
@ -18428,7 +18428,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
@Nullable
@@ -1143,30 +631,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1144,30 +630,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
void dumpChunks(Writer writer) throws IOException {
@ -18460,7 +18460,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
private static String printFuture(CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> future) {
@@ -1185,6 +650,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1186,6 +649,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}
@ -18496,7 +18496,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
return this.read(chunkPos).thenApplyAsync((optional) -> {
return optional.map((nbttagcompound) -> this.upgradeChunkTag(nbttagcompound, chunkPos)); // CraftBukkit
@@ -1274,8 +768,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1275,8 +767,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.distanceManager.addPlayer(SectionPos.of((EntityAccess) player), player);
}
@ -18506,7 +18506,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
this.addPlayerToDistanceMaps(player); // Paper - distance maps
} else {
SectionPos sectionposition = player.getLastSectionPos();
@@ -1286,7 +779,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1287,7 +778,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
this.removePlayerFromDistanceMaps(player); // Paper - distance maps
@ -18515,7 +18515,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
}
@@ -1334,73 +827,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1335,73 +826,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.playerMap.unIgnorePlayer(player);
}
@ -18599,7 +18599,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
public void addEntity(Entity entity) {
@@ -1464,13 +914,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1465,13 +913,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
protected void tick() {
@ -18614,7 +18614,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
@@ -1579,16 +1023,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1580,16 +1022,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public void waitForLightBeforeSending(ChunkPos centerPos, int radius) {
@ -18632,7 +18632,7 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
}
private class ChunkDistanceManager extends DistanceManager {
@@ -1599,7 +1034,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1600,7 +1033,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@Override
protected boolean isChunkToRemove(long pos) {
@ -18642,10 +18642,10 @@ index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a
@Nullable
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09a7053a68 100644
index 0bd05d7a8f2a388c28ddcf3f07db5b0648dddeea..b01006ade4750f60ceba951812bbc6e2ca04bf9c 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
@@ -39,65 +39,28 @@ import org.slf4j.Logger;
@@ -39,67 +39,29 @@ import org.slf4j.Logger;
public abstract class DistanceManager {
@ -18672,7 +18672,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
- final LongSet ticketsToRelease = new LongOpenHashSet();
- final Executor mainThreadExecutor;
- private long ticketTickCounter;
- private int simulationDistance = 10;
- public int simulationDistance = 10;
+ // Paper - rewrite chunk system
private final ChunkMap chunkMap; // Paper
@ -18719,9 +18719,11 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
-
+ this.getChunkHolderManager().tick(); // Paper - rewrite chunk system
}
-
private static int getTicketLevelAt(SortedArraySet<Ticket<?>> tickets) {
@@ -113,108 +76,25 @@ public abstract class DistanceManager {
return !tickets.isEmpty() ? ((Ticket) tickets.first()).getTicketLevel() : ChunkLevel.MAX_LEVEL + 1;
}
@@ -113,108 +75,25 @@ public abstract class DistanceManager {
protected abstract ChunkHolder updateChunkScheduling(long pos, int level, @Nullable ChunkHolder holder, int k);
public boolean runAllUpdates(ChunkMap chunkStorage) {
@ -18837,7 +18839,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
}
public <T> void addRegionTicket(TicketType<T> type, ChunkPos pos, int radius, T argument) {
@@ -223,13 +103,7 @@ public abstract class DistanceManager {
@@ -223,13 +102,7 @@ public abstract class DistanceManager {
}
public <T> boolean addRegionTicketAtDistance(TicketType<T> tickettype, ChunkPos chunkcoordintpair, int i, T t0) {
@ -18852,7 +18854,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
}
public <T> void removeRegionTicket(TicketType<T> type, ChunkPos pos, int radius, T argument) {
@@ -238,31 +112,21 @@ public abstract class DistanceManager {
@@ -238,31 +111,21 @@ public abstract class DistanceManager {
}
public <T> boolean removeRegionTicketAtDistance(TicketType<T> tickettype, ChunkPos chunkcoordintpair, int i, T t0) {
@ -18889,7 +18891,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
}
}
@@ -271,12 +135,10 @@ public abstract class DistanceManager {
@@ -271,12 +134,10 @@ public abstract class DistanceManager {
ChunkPos chunkcoordintpair = pos.chunk();
long i = chunkcoordintpair.toLong();
@ -18905,7 +18907,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
}
public void removePlayer(SectionPos pos, ServerPlayer player) {
@@ -289,46 +151,44 @@ public abstract class DistanceManager {
@@ -289,46 +150,44 @@ public abstract class DistanceManager {
if (objectset.isEmpty()) {
this.playersPerChunk.remove(i);
this.naturalSpawnChunkCounter.update(i, Integer.MAX_VALUE, false);
@ -18967,7 +18969,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
}
public int getNaturalSpawnChunkCount() {
@@ -342,103 +202,28 @@ public abstract class DistanceManager {
@@ -342,103 +201,28 @@ public abstract class DistanceManager {
}
public String getDebugStatus() {
@ -18999,8 +19001,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
- } catch (Throwable throwable1) {
- throwable.addSuppressed(throwable1);
- }
+ // Paper - rewrite chunk system
-
- throw throwable;
- }
-
@ -19010,7 +19011,8 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
- }
-
- }
-
+ // Paper - rewrite chunk system
- @VisibleForTesting
- TickingTracker tickingTracker() {
- return this.tickingTicketsTracker;
@ -19078,7 +19080,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
private class ChunkTicketTracker extends ChunkTracker {
private static final int MAX_LEVEL = ChunkLevel.MAX_LEVEL + 1;
@@ -485,6 +270,7 @@ public abstract class DistanceManager {
@@ -485,6 +269,7 @@ public abstract class DistanceManager {
return this.runUpdates(distance);
}
}
@ -19086,7 +19088,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
private class FixedPlayerDistanceChunkTracker extends ChunkTracker {
@@ -564,6 +350,7 @@ public abstract class DistanceManager {
@@ -564,6 +349,7 @@ public abstract class DistanceManager {
}
}
@ -19094,7 +19096,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
private class PlayerTicketTracker extends DistanceManager.FixedPlayerDistanceChunkTracker {
private int viewDistance = 0;
@@ -659,4 +446,5 @@ public abstract class DistanceManager {
@@ -659,4 +445,5 @@ public abstract class DistanceManager {
return distance <= this.viewDistance;
}
}
@ -20112,7 +20114,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0653b5abc89d0c5a54566e3e518cfd29
return crashreportsystemdetails;
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index b403b7d585f474e2b6029404d19e756a40206f7f..b6939932a4b8800c8751125a4a6d4dcea39110c1 100644
index d53c25ed96cfea839a5ad3531092d63478f6b869..48c1dd9015f9c9b9e4b8eb202a8f50d72c4e5929 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -265,6 +265,50 @@ public class ServerPlayer extends Player {
@ -21065,7 +21067,7 @@ index b6a3c75b84d9f768afee33aa0f226207b307c1c0..2ec2b1d9d987c7f31c685aec3d3c87f4
<T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 26fe1603b3899f5b69980dc64d46d26d9c944fde..2922b90241e81245dbd56c53ab2eb661314c04fd 100644
index 6e3bdcea55490b23066ab90966698e59847cdffa..edf40e3fea58d0978311dd9e2d14e99bc7036593 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -456,6 +456,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -21080,7 +21082,7 @@ index 26fe1603b3899f5b69980dc64d46d26d9c944fde..2922b90241e81245dbd56c53ab2eb661
}
if ((i & 1) != 0) {
@@ -823,7 +828,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -816,7 +821,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return this.capturedTileEntities.get(blockposition);
}
// CraftBukkit end
@ -21089,7 +21091,7 @@ index 26fe1603b3899f5b69980dc64d46d26d9c944fde..2922b90241e81245dbd56c53ab2eb661
}
public void setBlockEntity(BlockEntity blockEntity) {
@@ -914,26 +919,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -907,26 +912,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
this.getProfiler().incrementCounter("getEntities");
List<Entity> list = Lists.newArrayList();
@ -21117,7 +21119,7 @@ index 26fe1603b3899f5b69980dc64d46d26d9c944fde..2922b90241e81245dbd56c53ab2eb661
return list;
}
@@ -951,34 +937,23 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -944,34 +930,23 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate, List<? super T> result, int limit) {
this.getProfiler().incrementCounter("getEntities");
@ -21168,7 +21170,7 @@ index 26fe1603b3899f5b69980dc64d46d26d9c944fde..2922b90241e81245dbd56c53ab2eb661
}
@Nullable
@@ -1250,4 +1225,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1243,4 +1218,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private ExplosionInteraction() {}
}
@ -21235,7 +21237,7 @@ index cc0d20e9f851268fe8403ac516f426ec1d008150..12eaafdbd324fa36b3f46c3b644bc811
@Nullable default ChunkAccess getChunkIfLoadedImmediately(BlockPos pos) { return this.getChunkIfLoadedImmediately(pos.getX() >> 4, pos.getZ() >> 4);}
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index f739a175e26f250c652c73b8985158fe37c2823a..5f4fa76fe3a1a0a4fc11064fcf57bfab20bd9729 100644
index b2f9429e0d437cf70bf56410e163e957b80ebdf1..e124ae2711bcd4681fe0b41bd266de67bef8344f 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -114,7 +114,7 @@ public abstract class ChunkGenerator {
@ -22692,10 +22694,10 @@ index 836a388dbbc1987272aba6604a5b61acabe441b5..cf05dd46b17e69e09b97d955e9c2198e
// Paper start - Adventure
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index bb60804a77ecda3c86ccf54e028e634f8d7f141d..1f160036b433c5d1fb8ed1f94adefccab7a85bc7 100644
index 1ae3d9fc4ed6bba1881079b86b965e2f51bcb5e2..6ca2e661381f546b424396922c62d9e4698dbf0e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -326,10 +326,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -325,10 +325,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z));
if (playerChunk == null) return false;
@ -22713,7 +22715,7 @@ index bb60804a77ecda3c86ccf54e028e634f8d7f141d..1f160036b433c5d1fb8ed1f94adefcca
ClientboundLevelChunkWithLightPacket refreshPacket = new ClientboundLevelChunkWithLightPacket(chunk, this.world.getLightEngine(), null, null);
for (ServerPlayer player : playersInRange) {
@@ -337,8 +341,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -336,8 +340,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
player.connection.send(refreshPacket);
}
@ -22723,7 +22725,7 @@ index bb60804a77ecda3c86ccf54e028e634f8d7f141d..1f160036b433c5d1fb8ed1f94adefcca
return true;
}
@@ -415,20 +418,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -414,20 +417,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Collection<Plugin> getPluginChunkTickets(int x, int z) {
DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
@ -22745,7 +22747,7 @@ index bb60804a77ecda3c86ccf54e028e634f8d7f141d..1f160036b433c5d1fb8ed1f94adefcca
}
@Override
@@ -436,7 +426,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -435,7 +425,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
Map<Plugin, ImmutableList.Builder<Chunk>> ret = new HashMap<>();
DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
@ -22754,20 +22756,19 @@ index bb60804a77ecda3c86ccf54e028e634f8d7f141d..1f160036b433c5d1fb8ed1f94adefcca
long chunkKey = chunkTickets.getLongKey();
SortedArraySet<Ticket<?>> tickets = chunkTickets.getValue();
@@ -2024,14 +2014,53 @@ public class CraftWorld extends CraftRegionAccessor implements World {
// Spigot start
@@ -1036,13 +1026,52 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public int getViewDistance() {
- return this.world.spigotConfig.viewDistance;
- return this.world.getChunkSource().chunkMap.serverViewDistance;
+ return this.getHandle().playerChunkLoader.getAPIViewDistance(); // Paper - replace player chunk loader
}
@Override
public int getSimulationDistance() {
- return this.world.spigotConfig.simulationDistance;
- return this.world.getChunkSource().chunkMap.getDistanceManager().simulationDistance;
+ return this.getHandle().playerChunkLoader.getAPITickDistance(); // Paper - replace player chunk loader
}
// Spigot end
+ }
+ // Paper start - view distance api
+ @Override
+ public void setViewDistance(int viewDistance) {
@ -22805,13 +22806,13 @@ index bb60804a77ecda3c86ccf54e028e634f8d7f141d..1f160036b433c5d1fb8ed1f94adefcca
+ @Override
+ public void setSendViewDistance(int viewDistance) {
+ this.getHandle().chunkSource.chunkMap.setSendViewDistance(viewDistance); // Paper - replace player chunk loader
+ }
}
+ // Paper end - view distance api
// Spigot start
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
public BlockMetadataStore getBlockMetadata() {
return this.blockMetadata;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2f05361e8c086e07de2ff18bc5136fb9e8d62399..2dbc49b944ce318ec5081e3ec421efa1ff24c615 100644
index cf8a5b3ba642d4829725bc488c074b1b3b142867..29cefb53474080d5e524ae54e9295dd11aa6546d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -195,6 +195,48 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -137,10 +137,10 @@ index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..36d793b492d9776ee36f8285b5bab09e
for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f06ae63a1fb102647d16adc44adf25dc9ff8d03a..c6c4a50bc9d8dbba4c8e5980417e93e190f25d42 100644
index 29cefb53474080d5e524ae54e9295dd11aa6546d..e1647bc92cc3a7e887cacb8d204ffb120114ff05 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2313,6 +2313,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2312,6 +2312,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().language;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9369e0346a6b511a332d54577c781c3d2c2b5c86..8bfab45b506aa514956a99354a7dc5009ffa9cbf 100644
index e4f8318efc90f37aa478122865d0383d39896603..e68e6b5df3606cee5a14a00c5451963191ac2cd8 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -739,11 +739,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -732,11 +732,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {

View File

@ -5,7 +5,7 @@ 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 bf89ea0f7506434848cb9c1cbfb3fe6dd2eb3212..686b42a9b4475fe3d530a9b950c1cc8f04717a65 100644
index ee35514f0bfb0499e8aab7ce702bd2e2ef09d5db..917175e54ac8979659bbfb2c2cf06431f63e01df 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -222,7 +222,7 @@ public class ServerPlayer extends Player {
@ -39,10 +39,10 @@ index bf89ea0f7506434848cb9c1cbfb3fe6dd2eb3212..686b42a9b4475fe3d530a9b950c1cc8f
// CraftBukkit end
this.language = clientOptions.language();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9f1ab39b333ef51ed41a80d5d513a7c1d30d92f9..e22a75c78faeec35f8fbe310e8c28da5e8a8ec10 100644
index 7aa9787b96862e427cfd0011bccc0895b0c8f4cd..49d0e2988d2267c4721d8ce37a96eb1d3944ea5a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2311,7 +2311,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2310,7 +2310,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index cf081c6d270053b7d9a042b65495fe17f0ee4826..ac169632113c3d2177910723ce920cd9a4f7af66 100644
index 989425423bb4dab3fe57ab9407bc0676675dada0..8be40065d6f0d53d5a264464fc4be208c7bad3a9 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -705,9 +705,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -18,4 +18,4 @@ index cf081c6d270053b7d9a042b65495fe17f0ee4826..ac169632113c3d2177910723ce920cd9
+ for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
// Spigot start
// Spigot end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index ffaab4f83e416503206fef34cc69dc14b1295884..f4e70fa2f74d15bdc7669d0ce0b2dc2c824fffb7 100644
index bad29a542e31a6fe2c75bfd008653ca6aa409df8..5825f942db3b9870631ff093708dee0e930fccc8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -102,7 +102,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -101,7 +101,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public void setHealth(double health) {
health = (float) health;

View File

@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..fed09b886f4fa0006d160e5f2abb00df
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index ac169632113c3d2177910723ce920cd9a4f7af66..5c42b38ab337a3fd4e4b4ac8d0aa2db43540446c 100644
index 8be40065d6f0d53d5a264464fc4be208c7bad3a9..9a39bf50668340a77bbfd45218c03d9c00a6ce1e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1,5 +1,10 @@
@ -102,7 +102,7 @@ index ac169632113c3d2177910723ce920cd9a4f7af66..5c42b38ab337a3fd4e4b4ac8d0aa2db4
import com.google.common.collect.Lists;
import com.mojang.serialization.Codec;
import java.io.IOException;
@@ -741,6 +746,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -734,6 +739,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent tile entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);

View File

@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now
deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index f4e70fa2f74d15bdc7669d0ce0b2dc2c824fffb7..a51a3aed4a55e251da04544a4a59059d73b615d8 100644
index 5825f942db3b9870631ff093708dee0e930fccc8..b93d03c1af8b82c009c3f6007cc30e888f6764e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -267,9 +267,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -266,9 +266,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
@Override
@ -27,7 +27,7 @@ index f4e70fa2f74d15bdc7669d0ce0b2dc2c824fffb7..a51a3aed4a55e251da04544a4a59059d
}
@Override
@@ -787,4 +793,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -786,4 +792,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible);
}

View File

@ -168,7 +168,7 @@ index 7278ac809eff364e8b838d63a2ec1291493869f8..7dd0c000fa7f363997178ffa6de7d39e
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 9d779d899eaed1122b70a2aa40eb7950d26b45de..78762a410ece8bca16382975222d026ad010bca2 100644
index 9e74a28d77c4c91ad46750d924a3e0789683a875..89dac1d16a90717e6a99d41e8ea04810f78fdee4 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;
@ -216,7 +216,7 @@ index 9d779d899eaed1122b70a2aa40eb7950d26b45de..78762a410ece8bca16382975222d026a
@@ -308,7 +311,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.blockData = meta.blockData;
if (meta.enchantments != null) { // Spigot
if (meta.enchantments != null) {
- this.enchantments = new LinkedHashMap<Enchantment, Integer>(meta.enchantments);
+ this.enchantments = new EnchantmentMap(meta.enchantments); // Paper
}
@ -271,7 +271,7 @@ index 9d779d899eaed1122b70a2aa40eb7950d26b45de..78762a410ece8bca16382975222d026a
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1228,7 +1231,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1226,7 +1229,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData;
clone.blockData = this.blockData;
if (this.enchantments != null) {
@ -280,7 +280,7 @@ index 9d779d899eaed1122b70a2aa40eb7950d26b45de..78762a410ece8bca16382975222d026a
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
@@ -1470,4 +1473,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1468,4 +1471,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftMetaItem.HANDLED_TAGS;
}
}

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 b76ac10fe0d4b860a4b30fae365cf38400afb456..1e2d3040bb3e8b1901fbc933caa5ad3b82d3468c 100644
index 497cd74cd6efc4ad3679fd1a7489ebd194030835..52c895bf50d722c81ab08c5f53c2bc1212ab5ef3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -793,7 +793,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -44,10 +44,10 @@ index b76ac10fe0d4b860a4b30fae365cf38400afb456..1e2d3040bb3e8b1901fbc933caa5ad3b
protected void internalSetAbsorptionAmount(float absorptionAmount) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5fef370f164e78a336cfe598aee15e277dd6b946..de0102ef932e062eb3d7aba3a0805b6e261e673c 100644
index babd5dd5a83682d2bc36f988f008e788257b4157..a40d4d486ed674aae6ff319879c2ca2b2e4ce2cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2233,6 +2233,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2232,6 +2232,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {

View File

@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index e774f7930090e10889f13e8193d15e44a3b7637f..c6e56303ec8ee466a6de7e6bd76c4f6814e8db30 100644
index 720d1f9efffbc5fc74c31899f103e599aa4d3acf..2afa7c73836ddbad936cb98bde241cb91acc11b2 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -119,7 +119,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -20,10 +20,10 @@ index e774f7930090e10889f13e8193d15e44a3b7637f..c6e56303ec8ee466a6de7e6bd76c4f68
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
private boolean tickingBlockEntities;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 1f160036b433c5d1fb8ed1f94adefccab7a85bc7..0d9a491487c098b37331a9b94605993118fae403 100644
index 0a7774c4b10e6b53a78d0e7f8fdc9dceb4c95a0e..5652d7b30c7c22daef128fa49dc9dda20d2ca96b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -158,6 +158,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -157,6 +157,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers

View File

@ -133,7 +133,7 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..627fcf000f40e1bda025da874c447a99
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 043c42d303970920f40bd65a90c147192ed6900b..0b6dce5015144cadee3dc856b7e0d152aa66aca3 100644
index 1cf4bcb7dcba93c93ad27f10a34b23f616ec9b3f..77a4122cf5a11b29b14a7fc4ac6420ccea49af1b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1786,7 +1786,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -324,14 +324,14 @@ index e72ed2ed8664cbc408cbe1e38f1f0acacc3841dd..2f628f36c32752d1bac910e180b90639
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
index f07cff6e72094c5f7c6248b4f738d3c26ea35160..4e7c37c384116ddb9525994428e1bfac35b4a85e 100644
index c5547988e8e4ec5f1d090d264e14556f490d4e31..5dde575e1341d05ecd52f4bb810cd1cce7c487a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
@@ -363,7 +363,7 @@ public final class CraftEntityTypes {
return item;
}));
register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
- spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.z(), spawnData.z(), 0)
- spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), 0)
+ spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.z(), spawnData.z(), 0, org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM, null, null) // Paper
));
register(new EntityTypeData<>(EntityType.AREA_EFFECT_CLOUD, AreaEffectCloud.class, CraftAreaEffectCloud::new, spawnData -> new net.minecraft.world.entity.AreaEffectCloud(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));

View File

@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index a51a3aed4a55e251da04544a4a59059d73b615d8..7c0fe4772d171575be820ee66bb7facf1c3465f9 100644
index b93d03c1af8b82c009c3f6007cc30e888f6764e0..f1195a4dd11370066008aaf6c7c4a8b4d628d822 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -365,6 +365,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -364,6 +364,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c6e56303ec8ee466a6de7e6bd76c4f6814e8db30..2dad35f00a98be534db1da1a38a6865e41a1a94d 100644
index 2afa7c73836ddbad936cb98bde241cb91acc11b2..69e7a6cd6741c190b8e04de1372c929b42963610 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -816,6 +816,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -17,15 +17,7 @@ index c6e56303ec8ee466a6de7e6bd76c4f6814e8db30..2dad35f00a98be534db1da1a38a6865e
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
@@ -823,7 +825,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity == null) {
this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
tilesThisCycle--;
- this.blockEntityTickers.remove(this.tileTickPosition--);
continue;
}
// Spigot end
@@ -831,12 +832,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -824,12 +826,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity.isRemoved()) {
// Spigot start
tilesThisCycle--;

View File

@ -9,10 +9,10 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e580df88baadfd943756b1e440c7253a287fa0e9..ea520b828378c268d05425096c6493ca1c7ad385 100644
index 5a653dffecd3877c84ac8197e1ef4b7bbc9820ce..c9e3e104cd051a38e367653dc6c4f969665fc250 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -701,7 +701,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -700,7 +700,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
@ -23,7 +23,7 @@ index e580df88baadfd943756b1e440c7253a287fa0e9..ea520b828378c268d05425096c6493ca
// Spigot end
if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) {
return false;
@@ -716,6 +718,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -715,6 +717,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
entityplayer = (ServerPlayer) iterator.next();
@ -60,7 +60,7 @@ index 1ad6b62ee53e2ee4a710211dfc750780519004f9..16028723b36c1ca3a3c5d1bf2a7c82d2
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 75d2213aadcbd1d0a49fd4c8cef2d4d51669c73d..1b56d6b05fee0aa430dab666f50c5b886c3910d0 100644
index d11864c05bd73fac15df454d6042924596639c25..8f826978564a1d144901f1ca2e46c5b083b68945 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -265,6 +265,7 @@ public class ServerPlayer extends Player {

View File

@ -255,10 +255,10 @@ index b77f5832265be5aaf96d95fcac4737919720fa6e..e15723080445b09852512132039ca2cd
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 78762a410ece8bca16382975222d026ad010bca2..be9acd6f975718c1ef254391e8ef9129558c86a3 100644
index 89dac1d16a90717e6a99d41e8ea04810f78fdee4..27b87d5bdbbbbcc24d4af52df664f51bd5c861ca 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -1463,6 +1463,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1461,6 +1461,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaCrossbow.CHARGED.NBT,
CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
CraftMetaSuspiciousStew.EFFECTS.NBT,

View File

@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6d75010bf837a791f5fe04aacb973246410bbd66..0705a1bb63f056a228308d348bc5db87b0bee5a1 100644
index 418f9ed95179a234a4f7df3ba5813e9642b5f44c..4190c31fae199e6b6481d2b840f15fe68615d720 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1738,12 +1738,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -34,10 +34,10 @@ index 6d75010bf837a791f5fe04aacb973246410bbd66..0705a1bb63f056a228308d348bc5db87
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0d9a491487c098b37331a9b94605993118fae403..9d111f904d20c1694436ecf5dd9c3c7738be2681 100644
index d139361e0a75eaaeabd36d2d134e90d4253972a1..73202aa2fe5f58ad03973de36422f37168426aa6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1897,13 +1897,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1945,13 +1945,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {

View File

@ -5,7 +5,7 @@ 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 226afea543b581dd1b8ba0f81ff7dab7cce96395..2786b4322d32950153c489941e1aed7c4862e822 100644
index 39e02e922e67915c23ce4565eba33f656cbe81b6..dff2427e32b92a6deca0df81d0820353c5fc242a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3808,12 +3808,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -35,10 +35,10 @@ index 226afea543b581dd1b8ba0f81ff7dab7cce96395..2786b4322d32950153c489941e1aed7c
return this.isShiftKeyDown();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 7c0fe4772d171575be820ee66bb7facf1c3465f9..3805b32d3a4655577b59a0bc4bb6a508faf1e3e1 100644
index f1195a4dd11370066008aaf6c7c4a8b4d628d822..4ae1f2c25f3012cee5abdb579e6b452a78ba8a1c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -814,5 +814,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -813,5 +813,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setArrowsStuck(final int arrows) {
this.getHandle().setArrowCount(arrows);
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9d111f904d20c1694436ecf5dd9c3c7738be2681..025d7c5b96e6c8a13df3d5978a558fe735f1a202 100644
index 713bfbe76e3f888cd41e71256ec70af78e64121c..b1fe86645fa9e6f4398c8466cb3243154146f29f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -720,6 +720,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -719,6 +719,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled;
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 3805b32d3a4655577b59a0bc4bb6a508faf1e3e1..5001873aba00da0a1daf0e473593a332f0856cdd 100644
index 4ae1f2c25f3012cee5abdb579e6b452a78ba8a1c..a4af5db4d2d45429a46830e4af0ba45c8c5008be 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -824,5 +824,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -823,5 +823,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setShieldBlockingDelay(int delay) {
getHandle().setShieldBlockingDelay(delay);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 025d7c5b96e6c8a13df3d5978a558fe735f1a202..e78e3c4ab76c3112dd78417ea413a30f15a96e7f 100644
index b1fe86645fa9e6f4398c8466cb3243154146f29f..982231fcc788b99798e8361a53d77c4ed1920396 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1049,6 +1049,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1048,6 +1048,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return list;
}

View File

@ -17,10 +17,10 @@ index d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c..aff1b2195d2f187739394886d4c0bdbf
Iterator iterator = list.iterator();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index eb9da7e3912430921219cd4ebdcc295c0e5162bb..4751f83571688cf1e0aa669accc813942d85c60c 100644
index dfdbe171509cc4098e8a14bd8bb65a3a2a44354c..fa504824948c42b7feeca50b407f1f07b2b1a73e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -860,6 +860,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -854,6 +854,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end
}
}

View File

@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information
1.17: Needs to be reworked for new entity storage system
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index ea520b828378c268d05425096c6493ca1c7ad385..8d3a9f8210bf529484aeaf84ef9a55b54ce8f2af 100644
index c9e3e104cd051a38e367653dc6c4f969665fc250..45ee0cd242271883412284625230822d9c8a5452 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -879,6 +879,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -878,6 +878,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} else {
ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas());
@ -19,7 +19,7 @@ index ea520b828378c268d05425096c6493ca1c7ad385..8d3a9f8210bf529484aeaf84ef9a55b5
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
playerchunkmap_entitytracker.updatePlayers(this.level.players());
if (entity instanceof ServerPlayer) {
@@ -921,7 +922,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -920,7 +921,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (playerchunkmap_entitytracker1 != null) {
playerchunkmap_entitytracker1.broadcastRemoved();
}
@ -85,7 +85,7 @@ index 17cae197f76e02491791c55554bd57592a30aa1d..7be66f8649d6f6cb67e3b42e8f4fe739
if (this.bukkitEntity == null) {
this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 4fb29ca40e1caba3f205afc13fb4d7a95fd81ce6..178509c545f2872174af501bdcec3314f703739c 100644
index ee04acca6e7e9055fe42595efaa41a11c528121a..26e5abfe928abc09e0e0e4574550912778607cbf 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -153,6 +153,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e78e3c4ab76c3112dd78417ea413a30f15a96e7f..e886f72df8b5b334299236c26115bbc5f72ce9f1 100644
index 982231fcc788b99798e8361a53d77c4ed1920396..717718111a98733401669428fb4c39db979114b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -404,7 +404,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -403,7 +403,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

View File

@ -5,7 +5,7 @@ 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 55a939c74dad301e866e0711d6ff8e0379bf73c6..527af65884fd505616204876e22d54f362ce7791 100644
index f17d6a208477daeb01b66b2894e871f4071cf3e8..486f22469c3cf7ce302c10072da3f96aa3be0ef3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3829,6 +3829,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -30,10 +30,10 @@ index 55a939c74dad301e866e0711d6ff8e0379bf73c6..527af65884fd505616204876e22d54f3
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 5001873aba00da0a1daf0e473593a332f0856cdd..602516c5e99d033bbf9529748c22a2e774f8425a 100644
index a4af5db4d2d45429a46830e4af0ba45c8c5008be..7ac9515c0cca4e6a1197a42d5ff1dff04d183bd5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -201,6 +201,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -200,6 +200,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return blocks.get(0);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 14c489157fee05c5ec8752bf7c0acdd9a277d9ea..a2624085360ca3d315378f3a0f9220a5eb43217a 100644
index 2134b3f2267e42147cd740ce033888578e63af46..2221bbdf426ccc443f2530fa8857eec5e0013fda 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2874,6 +2874,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2873,6 +2873,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}

View File

@ -19,7 +19,7 @@ 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 2584e8eb867dca35e945ec7ab83bc2181d7bde26..7dae09967ae47ae2ef01d1072ad98f125d0b67e9 100644
index 0100aafc999cadcfa7a904a812355502379c418d..6abd0b8c51138b9a46c0df3a34cfee98016964d3 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -248,6 +248,10 @@ public class ServerPlayer extends Player {
@ -70,7 +70,7 @@ index 2584e8eb867dca35e945ec7ab83bc2181d7bde26..7dae09967ae47ae2ef01d1072ad98f12
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 527af65884fd505616204876e22d54f362ce7791..d1b9726228cc0a7bdb1c570603b5d1b8a4d6debe 100644
index 486f22469c3cf7ce302c10072da3f96aa3be0ef3..4df479842f482a8a6a5979c204b6882cd3603e93 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -392,10 +392,10 @@ index 948ba97e318506dad96e59121297b5bf8340d2e6..810bead2f19de70786027b190137f743
this.gameEvent(GameEvent.ENTITY_DIE);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a2624085360ca3d315378f3a0f9220a5eb43217a..66330f499cb178b24691cdc8c6601d14242328e3 100644
index 2221bbdf426ccc443f2530fa8857eec5e0013fda..b3309656bd3d731a2fcbf0e26bfd63354ecc035c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2411,7 +2411,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2410,7 +2410,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void sendHealthUpdate() {
FoodData foodData = this.getHandle().getFoodData();

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index be9acd6f975718c1ef254391e8ef9129558c86a3..e720778ccf009b0038aea72e06d91d5e5e061ecf 100644
index 27b87d5bdbbbbcc24d4af52df664f51bd5c861ca..e333e2b5f098fb1f6b05c3ae132f6516fc370b97 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -84,6 +84,12 @@ import org.bukkit.persistence.PersistentDataContainer;
@ -181,7 +181,7 @@ index be9acd6f975718c1ef254391e8ef9129558c86a3..e720778ccf009b0038aea72e06d91d5e
}
// Paper start
@@ -1182,7 +1290,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1180,7 +1288,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hideFlag == that.hideFlag)
&& (this.isUnbreakable() == that.isUnbreakable())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
@ -194,7 +194,7 @@ index be9acd6f975718c1ef254391e8ef9129558c86a3..e720778ccf009b0038aea72e06d91d5e
}
/**
@@ -1217,6 +1329,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1215,6 +1327,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
hash = 61 * hash + (this.hasDamage() ? this.damage : 0);
hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
hash = 61 * hash + this.version;
@ -205,7 +205,7 @@ index be9acd6f975718c1ef254391e8ef9129558c86a3..e720778ccf009b0038aea72e06d91d5e
return hash;
}
@@ -1241,6 +1357,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1239,6 +1355,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.unbreakable = this.unbreakable;
clone.damage = this.damage;
clone.version = this.version;
@ -220,7 +220,7 @@ index be9acd6f975718c1ef254391e8ef9129558c86a3..e720778ccf009b0038aea72e06d91d5e
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
@@ -1298,6 +1422,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1296,6 +1420,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
builder.put(CraftMetaItem.DAMAGE.BUKKIT, this.damage);
}
@ -244,7 +244,7 @@ index be9acd6f975718c1ef254391e8ef9129558c86a3..e720778ccf009b0038aea72e06d91d5e
final Map<String, Tag> internalTags = new HashMap<String, Tag>(this.unhandledTags);
this.serializeInternal(internalTags);
if (!internalTags.isEmpty()) {
@@ -1470,6 +1611,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1468,6 +1609,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaArmorStand.SHOW_ARMS.NBT,
CraftMetaArmorStand.SMALL.NBT,
CraftMetaArmorStand.MARKER.NBT,
@ -253,7 +253,7 @@ index be9acd6f975718c1ef254391e8ef9129558c86a3..e720778ccf009b0038aea72e06d91d5e
// Paper end
CraftMetaCompass.LODESTONE_DIMENSION.NBT,
CraftMetaCompass.LODESTONE_POS.NBT,
@@ -1499,4 +1642,146 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1497,4 +1640,146 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
// Paper end

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 d1b9726228cc0a7bdb1c570603b5d1b8a4d6debe..40b8b863c4662d8a6aa228763be167317232b99f 100644
index 4df479842f482a8a6a5979c204b6882cd3603e93..0085d4727e9bd1c6f451666e6012b8abcd74d129 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@ -56,7 +56,7 @@ index d1b9726228cc0a7bdb1c570603b5d1b8a4d6debe..40b8b863c4662d8a6aa228763be16731
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 602516c5e99d033bbf9529748c22a2e774f8425a..0c045752baf7346b53f1feedddfe4285f9bcb12c 100644
index 7ac9515c0cca4e6a1197a42d5ff1dff04d183bd5..fc7b54892af62e8b6e1cc93f2937e05bbfd01c8c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1,5 +1,6 @@
@ -66,7 +66,7 @@ index 602516c5e99d033bbf9529748c22a2e774f8425a..0c045752baf7346b53f1feedddfe4285
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
import java.util.ArrayList;
@@ -226,6 +227,39 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -225,6 +226,39 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
return null;
}

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API
public net.minecraft.world.entity.Mob isSunBurnTick()Z
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e886f72df8b5b334299236c26115bbc5f72ce9f1..c14f73d745ec34f0970b2e5aac9d68fc069fc1d2 100644
index 717718111a98733401669428fb4c39db979114b3..fbbad4c209618d1e5994cb5609d29f4bc9c9905c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -696,6 +696,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -695,6 +695,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
}

View File

@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d315a31f6b489ee88f81eb3d1b358c92e1e1619c..f300b637466b7e591a4d7e19dd7cfefa7f954e6a 100644
index 041984d629b7ddd2d2a856483fd69a2ab49c804e..8e5726194870f614b1522703f42fb11861bd7b9d 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1000,9 +1000,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -994,9 +994,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Nullable
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add Heightmap API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c14f73d745ec34f0970b2e5aac9d68fc069fc1d2..ca02281f12b0d914ad76da57aab56b63bb59d1f1 100644
index fbbad4c209618d1e5994cb5609d29f4bc9c9905c..1b9f52393edcaeafccb290d6a6db9e2407d1a101 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -223,6 +223,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -222,6 +222,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return CraftBlock.at(this.world, new BlockPos(x, y, z));
}

View File

@ -191,10 +191,10 @@ index 4d2348df25410a0b5364eec066880326d6667dad..286aad3205ef8a9e21a47ef07893844f
this.maxCount = i * i;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ca02281f12b0d914ad76da57aab56b63bb59d1f1..9cae07b33e1426c17e118fa8648c245753b316e6 100644
index d72119d42dda1e7d73de24534dc4a39fecf90f3e..e53cd6a490b0cf6d72e24f73511f948bfd548893 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1359,15 +1359,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1407,15 +1407,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setKeepSpawnInMemory(boolean keepLoaded) {

View File

@ -8,10 +8,10 @@ This patch also adds a chunk status cache on region files (note that
its only purpose is to cache the status on DISK)
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 8d3a9f8210bf529484aeaf84ef9a55b54ce8f2af..15e423cdb61547ddffb4497f5c51e101f5dbe8af 100644
index 45ee0cd242271883412284625230822d9c8a5452..1faa4e0626022f08faa47327b61b6250814e0b82 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -680,9 +680,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -679,9 +679,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
@ -28,7 +28,7 @@ index 8d3a9f8210bf529484aeaf84ef9a55b54ce8f2af..15e423cdb61547ddffb4497f5c51e101
}
// CraftBukkit start
@@ -691,6 +695,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -690,6 +694,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// CraftBukkit end
}
@ -156,10 +156,10 @@ index 42dc999d820e62c6a222afbd9239cc671fc7de53..b850dba2b0fa5bc762b170ed7083cf89
} catch (Throwable throwable) {
if (dataoutputstream != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9cae07b33e1426c17e118fa8648c245753b316e6..4b3d04d891edda8c02470bae189fbf17eb4e8a36 100644
index 9814ce8c4f12c82f493ffdd6e44ed2fdfb4e893b..f88a88682862c714db04cfabd1eed501f60d7edc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -311,9 +311,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -310,9 +310,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean isChunkGenerated(int x, int z) {
@ -185,7 +185,7 @@ index 9cae07b33e1426c17e118fa8648c245753b316e6..4b3d04d891edda8c02470bae189fbf17
throw new RuntimeException(ex);
}
}
@@ -427,20 +441,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -426,20 +440,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

View File

@ -56,10 +56,10 @@ index cbeaadaecf816070b3a37938c8e683180939afc4..95e5073a68e4dd38b70e8268daf21609
public static void onChunkHolderCreate(final ServerLevel level, final ChunkHolder holder) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 15e423cdb61547ddffb4497f5c51e101f5dbe8af..cfef1d3ca1975c459556f583f0a09c2a888c0792 100644
index 1faa4e0626022f08faa47327b61b6250814e0b82..1b84c29605fb141ad286f6ae67a726d0a5088d32 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -534,6 +534,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -533,6 +533,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
entity.discard();
needsRemoval = true;
}
@ -67,7 +67,7 @@ index 15e423cdb61547ddffb4497f5c51e101f5dbe8af..cfef1d3ca1975c459556f583f0a09c2a
return !needsRemoval;
}), position); // Paper - rewrite chunk system
// CraftBukkit end
@@ -545,6 +546,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -544,6 +545,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
throw new UnsupportedOperationException(); // Paper - rewrite chunk system
}

View File

@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
Also ignores Enderdragon, defaulting it to Mojang's setting
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index cfef1d3ca1975c459556f583f0a09c2a888c0792..9b16464c4edf334093c9aa0bd164348197b96455 100644
index 1b84c29605fb141ad286f6ae67a726d0a5088d32..2130f15d92bab1d4e35a92a681ac34cd9c929ea9 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1265,6 +1265,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1264,6 +1264,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
int j = entity.getType().clientTrackingRange() * 16;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] implement optional per player mob spawns
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 9b16464c4edf334093c9aa0bd164348197b96455..bd15131b7506e965bcf64be20330731256a1e1f0 100644
index 2130f15d92bab1d4e35a92a681ac34cd9c929ea9..1f9efff4ddccf2569fdfe42e6cbc92792643d0ea 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -289,6 +289,29 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -288,6 +288,29 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
});
}
@ -64,7 +64,7 @@ index 16028723b36c1ca3a3c5d1bf2a7c82d2b42a0be4..24d9a2c37db4bbf2585b33d06f5ea57e
this.lastSpawnState = spawnercreature_d;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 05c658b988fd970eeba8117d06c5a5d93b8fd75d..ad167cd343ec38f0263e634124036e741246c6b6 100644
index 5ef970574ab728dcd118c4d567cb61f0f208b2d7..784be702cbde92a9c81f04fde34ff343056b8ee7 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -253,6 +253,10 @@ public class ServerPlayer extends Player {

View File

@ -1155,7 +1155,7 @@ index 5de5209e04d631bd6a50e28e8d3abebf148252c1..19b3f4fa7678a038bf25efc2a8b46dda
DebugPackets.sendPoiPacketsForChunk(world, chunkPos);
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 2e5b01cc9c438a2bee7eb770e4c266425a9d287f..35fd928c87403d98a80b6c13fa9df83496576c8f 100644
index 1aaf490303bb76524af771b1a6992be5f2791003..934a0de16e61de967d15b001bda45a97501dc658 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -178,6 +178,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -1571,10 +1571,10 @@ index 83242862a49e39c40dd8467f1d2a0ac74ced8343..64d827c7e7f9cf76f9db900333b987a6
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 4b3d04d891edda8c02470bae189fbf17eb4e8a36..fcf2571a7aa9e93a82171d4a8ae8c11ee7452994 100644
index 12b78640b89a014af9e35ad03cb4cd217a29bc21..a834b763cf9190bf0effb02fe08b97861d5160cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -422,11 +422,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -421,11 +421,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
List<ServerPlayer> playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false);
if (playersInRange.isEmpty()) return true; // Paper - rewrite player chunk loader

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Entity Jump API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index cde3525320bd7f42c0664e2087d54fa75b7bfb70..2d28d9a42e89b7efadd4e798c3da61565221a5bd 100644
index a3eac4dfe28bc55721d292e2f309b3467a3db140..f9e2d3cba01fcf39bc29dc8b5b5879ddc3add0e5 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3283,8 +3283,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -48,10 +48,10 @@ index 344e933311f5cdccb66069d486b111a003639dfe..add3cd866452df727107e94fb2039bdd
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 0c045752baf7346b53f1feedddfe4285f9bcb12c..7aa69e4e5b687b836a11e9f5193edc03e9a1efbd 100644
index fc7b54892af62e8b6e1cc93f2937e05bbfd01c8c..eed8322f534a9556dbb99c4c32b135dfc3dd8b0f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -910,5 +910,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -909,5 +909,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public org.bukkit.inventory.EquipmentSlot getHandRaised() {
return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND;
}

View File

@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index bd15131b7506e965bcf64be20330731256a1e1f0..0e3c89b9d75160d0e8947d042a1568da13d62fcf 100644
index 1f9efff4ddccf2569fdfe42e6cbc92792643d0ea..876200db872bce89976329c4d6c6fbe9fd155f24 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -994,6 +994,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -993,6 +993,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot

View File

@ -296,10 +296,10 @@ index f5829ae484d93b547a5437b85a9621346384a11b..83701fbfaa56a232593ee8f11a3afb89
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 35fd928c87403d98a80b6c13fa9df83496576c8f..179a7708a5f4674b31a87c49ca3d5c4c4dbd4b65 100644
index 934a0de16e61de967d15b001bda45a97501dc658..4a097c3cf168005e2bae3ae484bc7ebd7a19a2d2 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -915,6 +915,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -909,6 +909,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from
I suspect it deals with teleporting as it uses players current x/y/z
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index 942042863f0105769c15b865d4d98a09a7053a68..68550d4497a5f10bf653482f79be77373df53f27 100644
index b01006ade4750f60ceba951812bbc6e2ca04bf9c..33b0be8eb9bff8068ca7bdeffe34b7f2eaa6dbfb 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
@@ -147,8 +147,8 @@ public abstract class DistanceManager {
@@ -146,8 +146,8 @@ public abstract class DistanceManager {
ObjectSet<ServerPlayer> objectset = (ObjectSet) this.playersPerChunk.get(i);
if (objectset == null) return; // CraftBukkit - SPIGOT-6208

View File

@ -31,10 +31,10 @@ delays anymore.
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 0e3c89b9d75160d0e8947d042a1568da13d62fcf..8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7 100644
index 876200db872bce89976329c4d6c6fbe9fd155f24..2db3236bc9d676c86b0af38bd4bfaf9d3332c250 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1000,6 +1000,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -999,6 +999,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+ ": " + entity + (this.entityMap.containsKey(entity.getId()) ? " ALREADY CONTAINED (This would have crashed your server)" : ""), new Throwable());
return;
}
@ -43,7 +43,7 @@ index 0e3c89b9d75160d0e8947d042a1568da13d62fcf..8d12a6da0f0679fd14c2a498f9645bd0
if (!(entity instanceof EnderDragonPart)) {
EntityType<?> entitytypes = entity.getType();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 352fbab070ccdb683e9a7558292c86cc443c018b..b2e980c1f2e2ec417f75fbd7bdd2188fdb4eba23 100644
index fa323141f77923fc766bbf2e8587d7e8792b92ec..3dfbd1225b0c1ee6b6fb2e842efdb1a8ff2c26c6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -271,6 +271,7 @@ public class ServerPlayer extends Player {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 7aa69e4e5b687b836a11e9f5193edc03e9a1efbd..ac85635bb5ff698712ffe7c48e8aa55d20e0302e 100644
index eed8322f534a9556dbb99c4c32b135dfc3dd8b0f..6a34b4ed817c3be31d5103f82c427fdcd40d47c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -443,7 +443,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -442,7 +442,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean addPotionEffect(PotionEffect effect, boolean force) {
@ -18,7 +18,7 @@ index 7aa69e4e5b687b836a11e9f5193edc03e9a1efbd..ac85635bb5ff698712ffe7c48e8aa55d
return true;
}
@@ -464,7 +464,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -463,7 +463,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public PotionEffect getPotionEffect(PotionEffectType type) {
MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraft(type));
@ -27,7 +27,7 @@ index 7aa69e4e5b687b836a11e9f5193edc03e9a1efbd..ac85635bb5ff698712ffe7c48e8aa55d
}
@Override
@@ -476,7 +476,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -475,7 +475,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public Collection<PotionEffect> getActivePotionEffects() {
List<PotionEffect> effects = new ArrayList<PotionEffect>();
for (MobEffectInstance handle : this.getHandle().activeEffects.values()) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker
Use the distance map to find candidate players for tracking.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9d49b0f34 100644
index 2db3236bc9d676c86b0af38bd4bfaf9d3332c250..07abd089e5091d292d4542bbe0fbb416a111bf8e 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -147,6 +147,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -146,6 +146,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper start - distance maps
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
@ -33,7 +33,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
void addPlayerToDistanceMaps(ServerPlayer player) {
int chunkX = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getX());
@@ -154,6 +171,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -153,6 +170,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Note: players need to be explicitly added to distance maps before they can be updated
this.nearbyPlayers.addPlayer(player);
this.level.playerChunkLoader.addPlayer(player); // Paper - replace chunk loader
@ -48,7 +48,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
}
void removePlayerFromDistanceMaps(ServerPlayer player) {
@@ -162,6 +187,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -161,6 +186,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Note: players need to be explicitly added to distance maps before they can be updated
this.nearbyPlayers.removePlayer(player);
this.level.playerChunkLoader.removePlayer(player); // Paper - replace chunk loader
@ -60,7 +60,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
}
void updateMaps(ServerPlayer player) {
@@ -170,6 +200,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -169,6 +199,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Note: players need to be explicitly added to distance maps before they can be updated
this.nearbyPlayers.tickPlayer(player);
this.level.playerChunkLoader.updatePlayer(player); // Paper - replace chunk loader
@ -75,7 +75,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
}
// Paper end
// Paper start
@@ -257,6 +295,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -256,6 +294,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.regionManagers.add(this.dataRegionManager);
this.nearbyPlayers = new io.papermc.paper.util.player.NearbyPlayers(this.level);
// Paper end
@ -124,7 +124,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
}
// Paper start
@@ -930,17 +1010,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -929,17 +1009,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public void move(ServerPlayer player) {
@ -143,7 +143,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
SectionPos sectionposition = player.getLastSectionPos();
SectionPos sectionposition1 = SectionPos.of((EntityAccess) player);
@@ -1017,7 +1087,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1016,7 +1086,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
@ -152,7 +152,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
if (entity instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entity;
@@ -1061,9 +1131,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1060,9 +1130,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
entity.tracker = null; // Paper - We're no longer tracked
}
@ -192,7 +192,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
@@ -1213,6 +1311,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1212,6 +1310,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.lastSectionPos = SectionPos.of((EntityAccess) entity);
}

View File

@ -76,7 +76,7 @@ index 7f5ecea0ee78a534d7c56fa9e3ad2117b5192c0a..ac918da8234553e4d88664b240feddc1
@Override
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index b2e980c1f2e2ec417f75fbd7bdd2188fdb4eba23..898403dad5e9bac4b565e1c75871245fe5cd7908 100644
index 3dfbd1225b0c1ee6b6fb2e842efdb1a8ff2c26c6..030d6c0d067dacf4f9603bdfb21acca8cafbeff0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1208,7 +1208,7 @@ public class ServerPlayer extends Player {
@ -117,10 +117,10 @@ index dfe8d6d8b592a7dc9b1f1d7fb68d0960dbeb387f..1b43d61f3464218bdf5221ffbf87a728
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index fcf2571a7aa9e93a82171d4a8ae8c11ee7452994..b57554333fd90da1f1ebc006cb1d0ebbfca9a499 100644
index a834b763cf9190bf0effb02fe08b97861d5160cb..5a2f4712417ca48601674d6719590fab5ca336e7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1159,7 +1159,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1158,7 +1158,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setDifficulty(Difficulty difficulty) {

View File

@ -44,10 +44,10 @@ index 1b43d61f3464218bdf5221ffbf87a7280fa8028c..84ff901c4805516bbe438b4ad808e75c
this.printSaveWarning = false;
this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e8b842568 100644
index dac7ea0b6b8c5ded3e17847cedc81805de80cbe7..453e8160c60fd41b06e84211340f762616422479 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -283,7 +283,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -282,7 +282,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Chunk getChunkAt(int x, int z) {
@ -62,7 +62,7 @@ index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e
return new CraftChunk(chunk);
}
@@ -297,6 +303,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -296,6 +302,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return new CraftChunk(this.getHandle(), x, z);
}
@ -75,7 +75,7 @@ index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e
@Override
public Chunk getChunkAt(Block block) {
Preconditions.checkArgument(block != null, "null block");
@@ -362,7 +374,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -361,7 +373,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public boolean unloadChunkRequest(int x, int z) {
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
if (this.isChunkLoaded(x, z)) {
@ -84,7 +84,7 @@ index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e
}
return true;
@@ -448,9 +460,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -447,9 +459,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
// Paper start - Optimize this method
ChunkPos chunkPos = new ChunkPos(x, z);
@ -98,7 +98,7 @@ index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e
if (immediate == null) {
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
}
@@ -458,7 +473,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -457,7 +472,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) {
return false; // not full status
}
@ -107,7 +107,7 @@ index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
return true;
}
@@ -484,7 +499,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -483,7 +498,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
// we do this so we do not re-read the chunk data on disk
}
@ -116,7 +116,7 @@ index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
return true;
// Paper end
@@ -2269,6 +2284,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2266,6 +2281,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(this.getHandle(), x, z, gen, ChunkStatus.FULL, true, priority, (c) -> {
net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> {
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c;

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 8548ed80555bc2b80f8fa1a699ab668307122b8e..a93847d69729fade6b81efb41627026ae4aec282 100644
index 7cd7e275c997bbf0ad7aab87aabc27aa722b915c..b9eca4b39cc265cb2d9b9f20ee6f803bea748c7d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -878,11 +878,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -32,7 +32,7 @@ index 8548ed80555bc2b80f8fa1a699ab668307122b8e..a93847d69729fade6b81efb41627026a
@Override
public boolean hasDisplayName() {
return this.displayName != null;
@@ -1025,6 +1037,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1023,6 +1035,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromJSONComponent));
}
@ -47,7 +47,7 @@ index 8548ed80555bc2b80f8fa1a699ab668307122b8e..a93847d69729fade6b81efb41627026a
@Override
public void setLore(List<String> lore) {
if (lore == null || lore.isEmpty()) {
@@ -1039,6 +1059,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1037,6 +1057,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -69,7 +69,7 @@ index 8548ed80555bc2b80f8fa1a699ab668307122b8e..a93847d69729fade6b81efb41627026a
@Override
public boolean hasCustomModelData() {
return this.customModelData != null;
@@ -1507,6 +1542,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1505,6 +1540,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Object object : addFrom) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 25c5f23b859961c792b2ec08404171eea1aedba7..478abaffd1a80949b96f1c1774c98134be92e5ac 100644
index 14126f4f2f0c8d5ae06275fd735178a2c4d3efc0..f73988baef278bf603fc53a8a371514a094d9c37 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -278,6 +278,7 @@ public class ServerPlayer extends Player {
@ -57,10 +57,10 @@ index 44aa178968c87fa72023a2c0f33c1a8123f3db72..f489b207cd3b62a33723f2e9ed0f4602
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5e7145653fef2f91d5f40f24ea0bcdea428dc80a..ef42716a18b64af36105baae49742b3699cc12a9 100644
index 8f9072b19a7a8eeede0230e98b2e6dd0240d0244..cce9485ec1d98d3bc38ea37dc8610e2707f7d456 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3033,6 +3033,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3032,6 +3032,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index ac85635bb5ff698712ffe7c48e8aa55d20e0302e..d79f0c81bc7758f91c3f69b084f571af36bfa32f 100644
index 6a34b4ed817c3be31d5103f82c427fdcd40d47c0..c68a18f50428282cd3641561cdc9690b5d88b125 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -924,5 +924,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -923,5 +923,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
((Mob) getHandle()).getJumpControl().jump();
}
}

View File

@ -21,10 +21,10 @@ index 17802108f41c98b77c89922451ee56b5ba2dcde2..0bd086f67f5d1f06f66499ae961c71e7
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2d90be2537faf281adc50f856daf3b4e8b842568..16df867ff996d33dc08831200d172633c9d68612 100644
index 8c36d0d130eba1ff16c500d8fde62b88430e90ef..5d8d2a9a4267477b6bf9d7209508a26abb0920fe 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -263,12 +263,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -262,12 +262,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean setSpawnLocation(int x, int y, int z, float angle) {
try {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix hex colors not working in some kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
index e8cf9eafe0908bc9b716d9b6ead97828a43413ec..2ee5c884571228a353120f658f1a2d39373ea4ca 100644
index 21aafb1ea51769659462d722aa318460b37cbc1c..ea4a7186b707e471d5f3972d21502b7a316e0d55 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -77,12 +77,12 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
@ -15,7 +15,7 @@ index e8cf9eafe0908bc9b716d9b6ead97828a43413ec..2ee5c884571228a353120f658f1a2d39
- MutableComponent ichatmutablecomponent;
+ Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
if (packet.protocolVersion() < 754) {
if (packet.protocolVersion() < SharedConstants.getCurrentVersion().getProtocolVersion()) { // Spigot - SPIGOT-7546: Handle version check correctly for outdated client message
- ichatmutablecomponent = Component.literal( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
} else {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ef42716a18b64af36105baae49742b3699cc12a9..e1e6b672b90a8d6b725ec06041f15f2d23fbdaa5 100644
index cce9485ec1d98d3bc38ea37dc8610e2707f7d456..7b0c0c64f082cbf26ebce766c31835432ede7ad3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2596,7 +2596,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2595,7 +2595,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null) {
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d79f0c81bc7758f91c3f69b084f571af36bfa32f..6fdf8460dcb396f2c83f1394bc9cfbb3f35cbd48 100644
index c68a18f50428282cd3641561cdc9690b5d88b125..ac8a148c6d9f0e25ab34d32b840efd42eb8ab46a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -891,6 +891,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -890,6 +890,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return getHandle().getUseItem().asBukkitMirror();
}

View File

@ -36,10 +36,10 @@ index 7406094fc58e5df4f5d553bb882c75ba6ef766a9..faaed968a3e771c1db3957e2b42acf6d
public int getSleepTicks() {
return this.getHandle().sleepCounter;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 6fdf8460dcb396f2c83f1394bc9cfbb3f35cbd48..022741182869348e377746bf2a3792a07155abc5 100644
index ac8a148c6d9f0e25ab34d32b840efd42eb8ab46a..f108af0f9047ce8d0ee402838ecbf7840d55ba54 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -936,5 +936,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -935,5 +935,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
getHandle().take(((CraftItem) item).getHandle(), quantity);
}

View File

@ -64,10 +64,10 @@ index 334001cb749600c973c82391e1c11f0e40bd2dfb..2a480026c3bfb06e6556fe5b11d9712c
public int get() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 16df867ff996d33dc08831200d172633c9d68612..cb9db52f7dba755146713be45cb66905e065336f 100644
index 37726d7bf6e179130e7ce4f28c2a5d9a26d13c09..69dfd085369bdf0c0bd12b4cb6aa043af0159352 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1879,8 +1879,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1927,8 +1927,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!this.isGameRule(rule)) return false;
@ -82,7 +82,7 @@ index 16df867ff996d33dc08831200d172633c9d68612..cb9db52f7dba755146713be45cb66905
handle.onChanged(this.getHandle().getServer());
return true;
}
@@ -1916,8 +1921,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1964,8 +1969,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!this.isGameRule(rule.getName())) return false;

View File

@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..2667067fd13f61e0464ba88ae4e4a707
+ }
+}
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index 4da303d7e15496f04f0e27bfb613176bc2a72b76..3c7920721914588a3e7eaf1faff46f7305823416 100644
index f430589fc2cdda23b099b20ace9818e8a8eb7278..0a21632a3e02690a8edcc17ac25d2551a8964bbe 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -121,6 +121,24 @@ public abstract class ChunkGenerator {
@ -57,7 +57,7 @@ index 4da303d7e15496f04f0e27bfb613176bc2a72b76..3c7920721914588a3e7eaf1faff46f73
+ // Paper start - StructuresLocateEvent
+ final org.bukkit.World bukkitWorld = world.getWorld();
+ final org.bukkit.Location origin = io.papermc.paper.util.MCUtil.toLocation(world, center);
+ final List<org.bukkit.generator.structure.Structure> apiStructures = structures.stream().map(Holder::value).map(nms -> org.bukkit.craftbukkit.generator.structure.CraftStructure.minecraftToBukkit(nms, world.registryAccess())).toList();
+ final List<org.bukkit.generator.structure.Structure> apiStructures = structures.stream().map(Holder::value).map(nms -> org.bukkit.craftbukkit.generator.structure.CraftStructure.minecraftToBukkit(nms)).toList();
+ if (!apiStructures.isEmpty()) {
+ final io.papermc.paper.event.world.StructuresLocateEvent event = new io.papermc.paper.event.world.StructuresLocateEvent(bukkitWorld, origin, apiStructures, radius, skipReferencedStructures);
+ if (!event.callEvent()) {

View File

@ -38,10 +38,10 @@ index ea48f1119a940056c37d1d203437bfbfdf13663b..a3f989fd1775adbb84d197c51e22c188
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 022741182869348e377746bf2a3792a07155abc5..762220f4e8762e8c6ec45cd22cb745fe676543ec 100644
index f108af0f9047ce8d0ee402838ecbf7840d55ba54..d3f97ba1b03e050b10553ea536bc26a7bfc5b976 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -714,6 +714,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -713,6 +713,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().craftAttributes.getAttribute(attribute);
}

View File

@ -5,11 +5,11 @@ Subject: [PATCH] More World API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index cb9db52f7dba755146713be45cb66905e065336f..6252d231e072fcd1fd8ca2eb0b74c66cac9950e9 100644
index 69dfd085369bdf0c0bd12b4cb6aa043af0159352..52baae96454715658505eba2cf9472aa71c9a1eb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2125,6 +2125,53 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value(), this.getHandle().registryAccess()), CraftLocation.toBukkit(found.getFirst(), this));
@@ -2173,6 +2173,53 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value()), CraftLocation.toBukkit(found.getFirst(), this));
}
+ // Paper start

View File

@ -78,10 +78,10 @@ index 92922e8eef7fa4638a01f3cefc4c46a1451e40e7..4daf2c54c7127e8e091ffc49362f2885
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 762220f4e8762e8c6ec45cd22cb745fe676543ec..85e33cb959eada67f3a4ac93f979bf96fc0fb98d 100644
index d3f97ba1b03e050b10553ea536bc26a7bfc5b976..2ae8f8e092841f00c28efffc6516b8ec5981675c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -953,5 +953,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -952,5 +952,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setHurtDirection(float hurtDirection) {
throw new UnsupportedOperationException("Cannot set the hurt direction on a non player");
}

View File

@ -95,10 +95,10 @@ index f5ac36fa54f3d3b39de103c95abb9ca3adfe8dda..47266d2b86e7f2022de7ea0c9347b4f5
if (weather.isCancelled()) {
return;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 6252d231e072fcd1fd8ca2eb0b74c66cac9950e9..7df7b95bf81fde54bb88554fb7509b4092094bda 100644
index 52baae96454715658505eba2cf9472aa71c9a1eb..e975c92d5ba2928ba0186d0253deedfa4ec9bb2c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1195,7 +1195,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1243,7 +1243,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setStorm(boolean hasStorm) {
@ -107,7 +107,7 @@ index 6252d231e072fcd1fd8ca2eb0b74c66cac9950e9..7df7b95bf81fde54bb88554fb7509b40
this.setWeatherDuration(0); // Reset weather duration (legacy behaviour)
this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
}
@@ -1217,7 +1217,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1265,7 +1265,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setThundering(boolean thundering) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Line Of Sight Changes
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d6b80be711b11758ef0bb3187dbcb6e597ef35d3..4a11bf06a725a5c1927e24ac4ad066f7631a430a 100644
index 383c39ac381f9a86693abb7935b5b142b889d7be..ca6e0f27b9d0c5d867909abd89262132bf1aa6bd 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3606,7 +3606,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -45,10 +45,10 @@ index 2667822413c329fc004aad826e5890ab4dc5bfeb..eeb1bd05d4407224aefa26b5ae2f2a8d
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 85e33cb959eada67f3a4ac93f979bf96fc0fb98d..7857ce7b0404f1f41988d02eead5394946607854 100644
index 2ae8f8e092841f00c28efffc6516b8ec5981675c..1d94e8276b49de47cdd7570774c7bb13f757d966 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -587,6 +587,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -586,6 +586,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] add per world spawn limits
Taken from #2982. Credit to Chasewhip8
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 7df7b95bf81fde54bb88554fb7509b4092094bda..a5a6a1a946451e3f3f4f88eccb30eb3e870c58de 100644
index bc2c56b0a3ea8e9107c3ef798bb058ae1ff41652..6c91471b5459ca45b532934d25c682ddc5b00042 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -216,6 +216,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -215,6 +215,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
this.biomeProvider = biomeProvider;
this.environment = env;

View File

@ -707,10 +707,10 @@ index 2cec61a1bb050c1ef81c5fc3d0afafe9ff29d459..97fa4e1e70203194bd939618b2fad926
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 7857ce7b0404f1f41988d02eead5394946607854..524633826140227b7d0efa292cb2378922d9a6e6 100644
index 1d94e8276b49de47cdd7570774c7bb13f757d966..db846e623bdf8231991d30c88dcf858d66836ca4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -888,6 +888,22 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -887,6 +887,22 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible);
}

View File

@ -11,7 +11,7 @@ It does not make a lot of sense to damage players if they get crammed,
For those who really want it a config option is provided.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index ebbf5f835d619c90eae4240dbd2eb665de1e601a..d08111e8107ddffdeff3fc044fc18b915d24433c 100644
index 83ba8472a5f3dc2c5d804e49310d8d0a2332a709..526daf9b8475db623ed3ae49a7fa3b48304c9bb4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -95,6 +95,7 @@ import net.minecraft.util.Mth;

View File

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: sulu5890 <sulu@sulu.me>
Date: Sun, 11 Jul 2021 19:34:03 -0500
Subject: [PATCH] Fix incorrect message for outdated client
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
index 0b3d6b309ea653d44bcfcd6dd418f692e040c87b..c6bcf4a5d5c48e6f73b8e5d3662ec0d7c288c6c8 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -82,7 +82,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
if (packet.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
- if (packet.protocolVersion() < 754) {
+ if (packet.protocolVersion() < SharedConstants.getCurrentVersion().getProtocolVersion()) { // Paper - Fix incorrect message for outdated clients
ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
} else {
ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 524633826140227b7d0efa292cb2378922d9a6e6..9e42117e605efbbbbf91f10b385ef76f9cf884b6 100644
index db846e623bdf8231991d30c88dcf858d66836ca4..bd5e80a04a035f670160a5eef94805ab90372cf6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -338,7 +338,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -337,7 +337,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
// Paper end
}

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