Archiviert
13
0

update some patches

Dieser Commit ist enthalten in:
Jason Penilla 2024-06-13 20:41:44 -07:00
Ursprung 52b49fbcc8
Commit 33b36cde31
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0E75A301420E48F8
39 geänderte Dateien mit 137 neuen und 139 gelöschten Zeilen

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Friction API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 947bccb93f2a5baa6236e1da1a7ec0b27c072a14..337c43f08465cb84227ca02b99f972b47a9186f5 100644 index 795a3f09c7ee0a1119dd5762ce097c72a41cad94..1d414e243562397703519f84269dd3e37a5b27a0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -273,6 +273,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -285,6 +285,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public boolean bukkitPickUpLoot; public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
@ -16,7 +16,7 @@ index 947bccb93f2a5baa6236e1da1a7ec0b27c072a14..337c43f08465cb84227ca02b99f972b4
@Override @Override
public float getBukkitYaw() { public float getBukkitYaw() {
@@ -738,7 +739,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -706,7 +707,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
public boolean shouldDiscardFriction() { public boolean shouldDiscardFriction() {
@ -25,7 +25,7 @@ index 947bccb93f2a5baa6236e1da1a7ec0b27c072a14..337c43f08465cb84227ca02b99f972b4
} }
public void setDiscardFriction(boolean noDrag) { public void setDiscardFriction(boolean noDrag) {
@@ -799,6 +800,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -773,6 +774,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override @Override
public void addAdditionalSaveData(CompoundTag nbt) { public void addAdditionalSaveData(CompoundTag nbt) {
@ -37,7 +37,7 @@ index 947bccb93f2a5baa6236e1da1a7ec0b27c072a14..337c43f08465cb84227ca02b99f972b4
nbt.putFloat("Health", this.getHealth()); nbt.putFloat("Health", this.getHealth());
nbt.putShort("HurtTime", (short) this.hurtTime); nbt.putShort("HurtTime", (short) this.hurtTime);
nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp); nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp);
@@ -842,6 +848,16 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -816,6 +822,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
} }
this.internalSetAbsorptionAmount(absorptionAmount); this.internalSetAbsorptionAmount(absorptionAmount);
// Paper end - Check for NaN // Paper end - Check for NaN
@ -51,14 +51,14 @@ index 947bccb93f2a5baa6236e1da1a7ec0b27c072a14..337c43f08465cb84227ca02b99f972b4
+ } + }
+ } + }
+ // Paper end - Friction API + // Paper end - Friction API
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { if (nbt.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) {
this.getAttributes().load(nbt.getList("Attributes", 10)); this.getAttributes().load(nbt.getList("attributes", 10));
} }
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index b392fda26982517cbc2c04156897184275ce69e5..8fd3845c4965843be9c37498760d93f1ebdff541 100644 index 30056568a9701fcb664682f329175d3bfee79b60..ea0d9335446b20073b9aafb9de453097355db79c 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -62,6 +62,7 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -63,6 +63,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
public boolean canMobPickup = true; // Paper - Item#canEntityPickup public boolean canMobPickup = true; // Paper - Item#canEntityPickup
private int despawnRate = -1; // Paper - Alternative item-despawn-rate private int despawnRate = -1; // Paper - Alternative item-despawn-rate
@ -66,7 +66,7 @@ index b392fda26982517cbc2c04156897184275ce69e5..8fd3845c4965843be9c37498760d93f1
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) { public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world); super(type, world);
@@ -185,7 +186,11 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -186,7 +187,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.move(MoverType.SELF, this.getDeltaMovement()); this.move(MoverType.SELF, this.getDeltaMovement());
float f = 0.98F; float f = 0.98F;
@ -79,7 +79,7 @@ index b392fda26982517cbc2c04156897184275ce69e5..8fd3845c4965843be9c37498760d93f1
f = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F; f = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F;
} }
@@ -394,6 +399,11 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -395,6 +400,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
@Override @Override
public void addAdditionalSaveData(CompoundTag nbt) { public void addAdditionalSaveData(CompoundTag nbt) {
@ -91,7 +91,7 @@ index b392fda26982517cbc2c04156897184275ce69e5..8fd3845c4965843be9c37498760d93f1
nbt.putShort("Health", (short) this.health); nbt.putShort("Health", (short) this.health);
nbt.putShort("Age", (short) this.age); nbt.putShort("Age", (short) this.age);
nbt.putShort("PickupDelay", (short) this.pickupDelay); nbt.putShort("PickupDelay", (short) this.pickupDelay);
@@ -436,6 +446,17 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -437,6 +447,17 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.setItem(ItemStack.EMPTY); this.setItem(ItemStack.EMPTY);
} }
@ -133,14 +133,13 @@ index 1a291dd8a287db30e71dcb315599fc4b038764c4..30d62ee4d5cd2ddacb8783b5bbbf475d
public int getHealth() { public int getHealth() {
return this.getHandle().health; return this.getHandle().health;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 6cf60ff71e398dbf6110f94a00e9bb973916a7f8..112d54e1789d30ef89b34f53a60b0124538d3cda 100644 index 26c874d36757bc23aec83d8e6309a28f6f462fd3..78bcec3f51563bf242da53392478eac4c498082a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1147,4 +1147,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -1149,4 +1149,17 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
nmsStack.hurtAndBreakWithoutChecks(amount, this.getHandle(), slot); nmsStack.hurtAndBreak(amount, this.getHandle(), slot, true);
} }
// Paper end - ItemStack damage API // Paper end - ItemStack damage API
+
+ // Paper start - friction API + // Paper start - friction API
+ @org.jetbrains.annotations.NotNull + @org.jetbrains.annotations.NotNull
+ @Override + @Override

Datei anzeigen

@ -35,22 +35,22 @@ index 0000000000000000000000000000000000000000..2c5cd77103c5a33d4349ab6b9ee2d837
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index fd2a5c829899d45641a5b5d30116f4f368953c15..f57679d88cd015caa8996d44b486da694df29521 100644 index 4d9f1fc884050993287adfa4578a87da710623fb..a8dfe7a4b3d01bf75587be078f471d1ef1d7a667 100644
--- a/src/main/java/net/minecraft/network/Connection.java --- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java
@@ -277,6 +277,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> { @@ -285,6 +285,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
Connection.genericsFtw(packet, packetlistener); Connection.genericsFtw(packet, packetlistener);
} catch (RunningOnDifferentThreadException cancelledpackethandleexception) { } catch (RunningOnDifferentThreadException cancelledpackethandleexception) {
; ;
+ } catch (io.papermc.paper.util.ServerStopRejectedExecutionException ignored) { // Paper - do not prematurely disconnect players on stop + } catch (io.papermc.paper.util.ServerStopRejectedExecutionException ignored) { // Paper - do not prematurely disconnect players on stop
} catch (RejectedExecutionException rejectedexecutionexception) { } catch (RejectedExecutionException rejectedexecutionexception) {
this.disconnect(Component.translatable("multiplayer.disconnect.server_shutdown")); this.disconnect((Component) Component.translatable("multiplayer.disconnect.server_shutdown"));
} catch (ClassCastException classcastexception) { } catch (ClassCastException classcastexception) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b2a46033d522f3122041cc2966105159c8869fdc..9ba2a71e5bedbf8e65f9dd1652639afd397439c7 100644 index ba382397e39311598d044faf6b74665810d2e510..fcf450f9fefda8cf2391dcb61075cbd855475d6c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2071,7 +2071,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2099,7 +2099,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override @Override
public void executeIfPossible(Runnable runnable) { public void executeIfPossible(Runnable runnable) {
if (this.isStopped()) { if (this.isStopped()) {

Datei anzeigen

@ -8,10 +8,10 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th
by pressing the offhand swap item by pressing the offhand swap item
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index cd07b3e1bc12eb8474a74fb08ee6521b5674b105..a79023c9e3265221e55cae1879f9c0052dafbef6 100644 index 319b1a60f2e0b26713c56f989a4759840e11961e..e16474c6c4a371070a81324037a441e6bafbb78e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -316,6 +316,13 @@ public class ServerPlayer extends Player { @@ -321,6 +321,13 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index de19a5ea96fa38621513e970e04d153576f4f6ae..bff776f07bcc7841acc5757c1f53bde1812756c8 100644 index ef46d904fa49a779c235971883380b3e33e6dba1..8eae75993ad60226a86456487f3b3a59999ab423 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1762,7 +1762,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1601,7 +1601,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// CraftBukkit end // CraftBukkit end
if (flag) { if (flag) {
if (this.seenBy.add(player.connection)) { if (this.seenBy.add(player.connection)) {
@ -21,10 +21,10 @@ index de19a5ea96fa38621513e970e04d153576f4f6ae..bff776f07bcc7841acc5757c1f53bde1
} else if (this.seenBy.remove(player.connection)) { } else if (this.seenBy.remove(player.connection)) {
this.serverEntity.removePairing(player); this.serverEntity.removePairing(player);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6fefd0e1dd2601914b2790469bfcbd04cd9b1a28..b2dad4867371f4976ceb6a6a2129b314e02f50aa 100644 index 1097fe9791a012568070b7b522c35303c85f4375..b68ba105c84346057d8ee02c745d688c7379483e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3858,7 +3858,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3881,7 +3881,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void startSeenByPlayer(ServerPlayer player) {} public void startSeenByPlayer(ServerPlayer player) {}

Datei anzeigen

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Noah van der Aa <ndvdaa@gmail.com>
Date: Tue, 6 Dec 2022 18:45:54 +0100
Subject: [PATCH] Limit pet look distance
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
index bf9ad63343fa07105f217625bb81ed637a7f7f7e..15d7be9ed4a973044dd4399db46aaa244730b836 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
@@ -72,7 +72,7 @@ public class FollowOwnerGoal extends Goal {
public void tick() {
boolean bl = this.tamable.shouldTryTeleportToOwner();
if (!bl) {
- this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot());
+ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float)this.tamable.getMaxHeadXRot()); // Paper - Limit pet look distance
}
if (--this.timeToRecalcPath <= 0) {

Datei anzeigen

@ -8,7 +8,7 @@ Fixes some wrong reasons, and adds missing spawn reasons for entities.
Co-authored-by: Doc <nachito94@msn.com> Co-authored-by: Doc <nachito94@msn.com>
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 7df13199eacc8dec0ba8fbf10ea507b0d1c5f591..df7b9d0693777fa203cc4d4a7519c5648e274bb6 100644 index 69a661f01e43d17262fd2845dde5528416bbe456..c0062c8f83641ff30e79a309c0bb9930ba4b422a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java --- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -366,7 +366,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @@ -366,7 +366,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@ -21,10 +21,10 @@ index 7df13199eacc8dec0ba8fbf10ea507b0d1c5f591..df7b9d0693777fa203cc4d4a7519c564
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
index cecfae3bee405fb57df28e83b005e100e72b896b..cde9d03286a3cbb80005b59efe7d57de86fe4eda 100644 index 1dade7a4fbdf190661e4431496349444467509cc..3e869620db35d38db39fbeed715b898ef9d2743c 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java --- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
@@ -64,7 +64,7 @@ public class DragonFireball extends AbstractHurtingProjectile { @@ -65,7 +65,7 @@ public class DragonFireball extends AbstractHurtingProjectile {
if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events
this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1);
@ -34,7 +34,7 @@ index cecfae3bee405fb57df28e83b005e100e72b896b..cde9d03286a3cbb80005b59efe7d57de
this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
} }
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
index 2c076a5b23c09f634fa6807c207e5e06e1795e8a..f87614eec0aa4e6f967add78c6758f78e7ad9505 100644 index 3c4949965c0fad3c6200d0fd1e31ebe844ba6e0e..f2d4264743b6070f36adb66d00a3de0a72b86846 100644
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
@@ -117,7 +117,7 @@ public class FrogspawnBlock extends Block { @@ -117,7 +117,7 @@ public class FrogspawnBlock extends Block {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments
properly handle Player#playNote properly handle Player#playNote
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 503367692e50e32375923f6a6e1a892920785fa4..26534a2ed76cb6038e02671190848f0c9997b2fc 100644 index 684cbe281a57335086ce8db2d7fdd36a60286dc7..3fcd440ffa00bbed5cdc19f999644e32d3b24aed 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -766,7 +766,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -768,7 +768,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Sound instrumentSound = instrument.getSound(); Sound instrumentSound = instrument.getSound();
if (instrumentSound == null) return; if (instrumentSound == null) return;

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Improve inlining for some hot BlockBehavior and FluidState
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index 24c2ec8e637373876a00bf292ac9318f79da7aef..c762a006b3f586b32209c20e85f6b8bf169dbd06 100644 index 335f43e49d31acecfec8b6da9be9afe88cd95ca9..d261649aa1b7b351f325f9b752bb792f952f7b25 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -906,15 +906,15 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -912,15 +912,15 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.shapeExceedsCube; // Paper - moved into shape cache init return this.shapeExceedsCube; // Paper - moved into shape cache init
} }
@ -28,7 +28,7 @@ index 24c2ec8e637373876a00bf292ac9318f79da7aef..c762a006b3f586b32209c20e85f6b8bf
return this.isAir; return this.isAir;
} }
@@ -998,7 +998,7 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -1004,7 +1004,7 @@ public abstract class BlockBehaviour implements FeatureElement {
} }
} }
@ -37,7 +37,7 @@ index 24c2ec8e637373876a00bf292ac9318f79da7aef..c762a006b3f586b32209c20e85f6b8bf
return this.canOcclude; return this.canOcclude;
} }
@@ -1214,11 +1214,11 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -1220,11 +1220,11 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.getBlock().builtInRegistryHolder().is(key); return this.getBlock().builtInRegistryHolder().is(key);
} }

Datei anzeigen

@ -48,10 +48,10 @@ index 90e1914599b43c8bf813596b3b428d8be3bac1b5..6df0db8b4cdab23494ea34236949ece4
} }
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adaccae40c41 100644 index fb80b00b34ae5a4b1491c618a7fe1bdbbde0de9b..96db0b1041a4c0f054d4f3f2bdced960b119664e 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -109,7 +109,7 @@ public interface DispenseItemBehavior { @@ -110,7 +110,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
ServerLevel worldserver = pointer.level(); ServerLevel worldserver = pointer.level();
@ -60,7 +60,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -119,12 +119,13 @@ public interface DispenseItemBehavior { @@ -120,12 +120,13 @@ public interface DispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -76,7 +76,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -141,7 +142,7 @@ public interface DispenseItemBehavior { @@ -142,7 +143,7 @@ public interface DispenseItemBehavior {
return ItemStack.EMPTY; return ItemStack.EMPTY;
} }
@ -85,7 +85,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
// CraftBukkit end // CraftBukkit end
pointer.level().gameEvent((Entity) null, (Holder) GameEvent.ENTITY_PLACE, pointer.pos()); pointer.level().gameEvent((Entity) null, (Holder) GameEvent.ENTITY_PLACE, pointer.pos());
return stack; return stack;
@@ -163,7 +164,7 @@ public interface DispenseItemBehavior { @@ -164,7 +165,7 @@ public interface DispenseItemBehavior {
ServerLevel worldserver = pointer.level(); ServerLevel worldserver = pointer.level();
// CraftBukkit start // CraftBukkit start
@ -94,7 +94,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -173,12 +174,13 @@ public interface DispenseItemBehavior { @@ -174,12 +175,13 @@ public interface DispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -110,7 +110,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -195,7 +197,7 @@ public interface DispenseItemBehavior { @@ -196,7 +198,7 @@ public interface DispenseItemBehavior {
ArmorStand entityarmorstand = (ArmorStand) EntityType.ARMOR_STAND.spawn(worldserver, consumer, blockposition, MobSpawnType.DISPENSER, false, false); ArmorStand entityarmorstand = (ArmorStand) EntityType.ARMOR_STAND.spawn(worldserver, consumer, blockposition, MobSpawnType.DISPENSER, false, false);
if (entityarmorstand != null) { if (entityarmorstand != null) {
@ -119,7 +119,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
} }
return stack; return stack;
@@ -215,7 +217,7 @@ public interface DispenseItemBehavior { @@ -216,7 +218,7 @@ public interface DispenseItemBehavior {
if (!list.isEmpty()) { if (!list.isEmpty()) {
// CraftBukkit start // CraftBukkit start
@ -128,7 +128,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
ServerLevel world = pointer.level(); ServerLevel world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -226,12 +228,13 @@ public interface DispenseItemBehavior { @@ -227,12 +229,13 @@ public interface DispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -144,16 +144,15 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -242,7 +245,7 @@ public interface DispenseItemBehavior { @@ -243,6 +246,7 @@ public interface DispenseItemBehavior {
} }
((Saddleable) list.get(0)).equipSaddle(itemstack1, SoundSource.BLOCKS);
// CraftBukkit end // CraftBukkit end
((Saddleable) list.get(0)).equipSaddle(SoundSource.BLOCKS, CraftItemStack.asNMSCopy(event.getItem())); // Paper - Fix saddles losing nbt data - MC-191591
- // itemstack.shrink(1); // CraftBukkit - handled above
+ if (shrink) stack.shrink(1); // Paper - actually handle here + if (shrink) stack.shrink(1); // Paper - actually handle here
this.setSuccess(true); this.setSuccess(true);
return stack; return stack;
} else { } else {
@@ -270,7 +273,7 @@ public interface DispenseItemBehavior { @@ -270,7 +274,7 @@ public interface DispenseItemBehavior {
} while (!entityhorseabstract.isBodyArmorItem(stack) || entityhorseabstract.isWearingBodyArmor() || !entityhorseabstract.isTamed()); } while (!entityhorseabstract.isBodyArmorItem(stack) || entityhorseabstract.isWearingBodyArmor() || !entityhorseabstract.isTamed());
// CraftBukkit start // CraftBukkit start
@ -162,7 +161,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
ServerLevel world = pointer.level(); ServerLevel world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -281,12 +284,13 @@ public interface DispenseItemBehavior { @@ -281,12 +285,13 @@ public interface DispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -178,7 +177,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -296,6 +300,7 @@ public interface DispenseItemBehavior { @@ -296,6 +301,7 @@ public interface DispenseItemBehavior {
} }
} }
@ -186,7 +185,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
entityhorseabstract.setBodyArmorItem(CraftItemStack.asNMSCopy(event.getItem())); entityhorseabstract.setBodyArmorItem(CraftItemStack.asNMSCopy(event.getItem()));
// CraftBukkit end // CraftBukkit end
this.setSuccess(true); this.setSuccess(true);
@@ -342,7 +347,7 @@ public interface DispenseItemBehavior { @@ -342,7 +348,7 @@ public interface DispenseItemBehavior {
entityhorsechestedabstract = (AbstractChestedHorse) iterator1.next(); entityhorsechestedabstract = (AbstractChestedHorse) iterator1.next();
// CraftBukkit start // CraftBukkit start
} while (!entityhorsechestedabstract.isTamed()); } while (!entityhorsechestedabstract.isTamed());
@ -195,7 +194,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
ServerLevel world = pointer.level(); ServerLevel world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -353,10 +358,13 @@ public interface DispenseItemBehavior { @@ -353,10 +359,13 @@ public interface DispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -209,7 +208,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -368,7 +376,7 @@ public interface DispenseItemBehavior { @@ -368,7 +377,7 @@ public interface DispenseItemBehavior {
entityhorsechestedabstract.getSlot(499).set(CraftItemStack.asNMSCopy(event.getItem())); entityhorsechestedabstract.getSlot(499).set(CraftItemStack.asNMSCopy(event.getItem()));
// CraftBukkit end // CraftBukkit end
@ -218,7 +217,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
this.setSuccess(true); this.setSuccess(true);
return stack; return stack;
} }
@@ -413,7 +421,7 @@ public interface DispenseItemBehavior { @@ -413,7 +422,7 @@ public interface DispenseItemBehavior {
if (willEmptyContentsSolidBucketItem || willEmptyBucketItem) { if (willEmptyContentsSolidBucketItem || willEmptyBucketItem) {
// Paper end - correctly check if the bucket place will succeed // Paper end - correctly check if the bucket place will succeed
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
@ -227,7 +226,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z)); BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -486,7 +494,7 @@ public interface DispenseItemBehavior { @@ -475,7 +484,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -236,7 +235,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -533,7 +541,7 @@ public interface DispenseItemBehavior { @@ -513,7 +522,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -245,7 +244,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0)); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -596,7 +604,7 @@ public interface DispenseItemBehavior { @@ -575,7 +584,7 @@ public interface DispenseItemBehavior {
BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING)); BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
@ -254,7 +253,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0)); BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -662,7 +670,7 @@ public interface DispenseItemBehavior { @@ -641,7 +650,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
// EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null); // EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null);
@ -263,7 +262,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -672,12 +680,13 @@ public interface DispenseItemBehavior { @@ -651,12 +660,13 @@ public interface DispenseItemBehavior {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -279,7 +278,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -693,7 +702,7 @@ public interface DispenseItemBehavior { @@ -672,7 +682,7 @@ public interface DispenseItemBehavior {
worldserver.addFreshEntity(entitytntprimed); worldserver.addFreshEntity(entitytntprimed);
worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
worldserver.gameEvent((Entity) null, (Holder) GameEvent.ENTITY_PLACE, blockposition); worldserver.gameEvent((Entity) null, (Holder) GameEvent.ENTITY_PLACE, blockposition);
@ -288,7 +287,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
return stack; return stack;
} }
}); });
@@ -720,7 +729,7 @@ public interface DispenseItemBehavior { @@ -699,7 +709,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -297,7 +296,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -769,7 +778,7 @@ public interface DispenseItemBehavior { @@ -748,7 +758,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -306,7 +305,7 @@ index 2bb3d1f0b89ef5b9b1f9f8da1070d21168830645..9507dbbb4b490149b9248c384be5adac
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
@@ -842,7 +851,7 @@ public interface DispenseItemBehavior { @@ -810,7 +820,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start // CraftBukkit start
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos()); org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
@ -354,7 +353,7 @@ index 1b1c54ce8f187b968352d4aad05821ece182e20b..985954030654d521291cccbfc3ca49b6
} }
diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
index 4924926327787e7564116e9d6e20d2c2e98b2229..fbed5d57db0c0e79996f85571b9af0071fa953c7 100644 index 445560d94086452ca4fbaf7792ff2b04c3ed3b73..f32f8d5cb22feb885a53d3b56c04ad4219d2bafa 100644
--- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
@@ -38,7 +38,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior { @@ -38,7 +38,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior {
@ -380,19 +379,19 @@ index f84987c36a16df19286d6f1badfb1ffb9cc7e770..6f2adf2334e35e8a617a4ced0c1af2ab
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) { if (!DispenserBlock.eventFired) {
diff --git a/src/main/java/net/minecraft/world/item/ArmorItem.java b/src/main/java/net/minecraft/world/item/ArmorItem.java diff --git a/src/main/java/net/minecraft/world/item/ArmorItem.java b/src/main/java/net/minecraft/world/item/ArmorItem.java
index f1cee3266e95094dd1afd501c96e4beaa3d71796..e766397aae3f73548b290b0809b9d1ca0967ea39 100644 index d481ec2eace5fca7f80f6d9254121afd680e7309..fb518f87cc4ccd810fb32cade2fdd7e09ab0abfc 100644
--- a/src/main/java/net/minecraft/world/item/ArmorItem.java --- a/src/main/java/net/minecraft/world/item/ArmorItem.java
+++ b/src/main/java/net/minecraft/world/item/ArmorItem.java +++ b/src/main/java/net/minecraft/world/item/ArmorItem.java
@@ -64,7 +64,7 @@ public class ArmorItem extends Item implements Equipable { @@ -55,7 +55,7 @@ public class ArmorItem extends Item implements Equipable {
} else { } else {
LivingEntity entityliving = (LivingEntity) list.get(0); LivingEntity entityliving = (LivingEntity) list.get(0);
EquipmentSlot enumitemslot = Mob.getEquipmentSlotForItem(armor); EquipmentSlot enumitemslot = entityliving.getEquipmentSlotForItem(armor);
- ItemStack itemstack1 = armor.split(1); - ItemStack itemstack1 = armor.split(1);
+ ItemStack itemstack1 = armor.copyWithCount(1); // Paper - shrink below and single item in event + ItemStack itemstack1 = armor.copyWithCount(1); // Paper - shrink below and single item in event
// CraftBukkit start // CraftBukkit start
Level world = pointer.level(); Level world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos()); org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
@@ -76,12 +76,13 @@ public class ArmorItem extends Item implements Equipable { @@ -67,12 +67,13 @@ public class ArmorItem extends Item implements Equipable {
} }
if (event.isCancelled()) { if (event.isCancelled()) {
@ -408,7 +407,7 @@ index f1cee3266e95094dd1afd501c96e4beaa3d71796..e766397aae3f73548b290b0809b9d1ca
// Chain to handler for new item // Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -98,6 +99,7 @@ public class ArmorItem extends Item implements Equipable { @@ -89,6 +90,7 @@ public class ArmorItem extends Item implements Equipable {
((Mob) entityliving).setPersistenceRequired(); ((Mob) entityliving).setPersistenceRequired();
} }

Datei anzeigen

@ -56,7 +56,7 @@ index bf9ae460bdfb247456b895f026f6a7a2e162c5f5..15fd1fe1b55b6421d2c09e8385c9f69f
protected abstract NonNullList<ItemStack> getItems(); protected abstract NonNullList<ItemStack> getItems();
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index edb7d981bb443b5b395a1985fb7cfd96009d0b0a..62b9b5f508462dd2257094cb48ce6123e29cb64d 100644 index f8d432ef21e59796da4b11c9748ba151c54e5e04..b6633ca1ee73ef0f8a220992a2e0424e67dd9758 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -472,7 +472,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @@ -472,7 +472,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add Sneaking API for Entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 92c80776273f6be43b40686c7ab7dd7371b1c06f..365281dfc0308c5db0c72b56208d9b87be0e955e 100644 index 7c223042595c7cd5ccc554211657d9375833122b..3c1e199316ae283210529d4d27b4f9d70b4d9404 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -872,6 +872,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -874,6 +874,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return Pose.values()[this.getHandle().getPose().ordinal()]; return Pose.values()[this.getHandle().getPose().ordinal()];
} }

Datei anzeigen

@ -28,10 +28,10 @@ index 2665170b8391a77d6b3fb7ae7b5ccfc0be65acd7..e00d4e0896c0163c43d79af63338de67
private boolean tryInsert(AdvancementHolder advancement) { private boolean tryInsert(AdvancementHolder advancement) {
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
index 294172ea6f61a7951793e34518f74ef56b57e37d..de8c8b408e5921ecb98c97333657b614635cff06 100644 index 3255578c8c37d977bb6e89d27194a4dbff822014..2172e23b22b411fe79e930128bd43ac07becb620 100644
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java --- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java +++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
@@ -70,6 +70,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener { @@ -69,6 +69,7 @@ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener {
AdvancementTree advancementtree = new AdvancementTree(); AdvancementTree advancementtree = new AdvancementTree();
advancementtree.addAll(this.advancements.values()); advancementtree.addAll(this.advancements.values());
@ -40,10 +40,10 @@ index 294172ea6f61a7951793e34518f74ef56b57e37d..de8c8b408e5921ecb98c97333657b614
while (iterator.hasNext()) { while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index c58e24e0138495748564ff8a08782ffd6522fa38..ea5ef39a814522f0abffd570e216d899833f588d 100644 index aa39bdb0a4ba8fedf5052ea9700afa7d4d2a4300..b4af03c4bdd1ce0861f36c3b75fc7e89d701c46a 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -278,6 +278,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -282,6 +282,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!"); DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString()); DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString());
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?"); DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
@ -52,10 +52,10 @@ index c58e24e0138495748564ff8a08782ffd6522fa38..ea5ef39a814522f0abffd570e216d899
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e711e3ab336b879664a885c4ec9b9e46cf71331d..cb9b46ed5ff2f9aa0d322be75659c0046f38c663 100644 index 8564c00ff68148a657fa8ee27e9d92430d6b6389..b7a432d743d749d3da213779428c2e12f3f808dd 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3383,7 +3383,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -3400,7 +3400,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator)); this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
} catch (ProfilePublicKey.ValidationException profilepublickey_b) { } catch (ProfilePublicKey.ValidationException profilepublickey_b) {
@ -82,7 +82,7 @@ index ed1d3d30404dfc6303e746f31295b6b1aa40f204..8d7565eda4536e8aa42dd3dcbcfac38c
set.add(string); set.add(string);
} else { } else {
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index 9ae23dbf076e977c9d9b98a02c5925e9a8f68f7f..0126b88f60904dfbf1e29eb3b89a985061d91f91 100644 index b068a31c8052091840956e26ef6547a1a3595e4c..ac99aa7a275b7c2e91d51f952dbf0a1ce44e02d5 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java --- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java +++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -79,7 +79,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { @@ -79,7 +79,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
@ -95,7 +95,7 @@ index 9ae23dbf076e977c9d9b98a02c5925e9a8f68f7f..0126b88f60904dfbf1e29eb3b89a9850
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
index 427363452b5f7623360e7aad8af534f077d0d77f..62f4835309df2b2deeb799609f9b1b325bf58af3 100644 index b2812cc8d35074fdcff88beef088d9f63ebbe1a8..dc591702d1ad41209bb80e8d05f4ca11f20816f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java --- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java +++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
@@ -44,6 +44,7 @@ import org.bukkit.material.MaterialData; @@ -44,6 +44,7 @@ import org.bukkit.material.MaterialData;

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Improve PortalEvents
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b2dad4867371f4976ceb6a6a2129b314e02f50aa..51f1f00e9e68abb9a098a193f8201715ae73a8e4 100644 index b68ba105c84346057d8ee02c745d688c7379483e..9a49ab3cf682faef790c17579aec204b2778e461 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3518,7 +3518,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -3540,7 +3540,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
Location enter = bukkitEntity.getLocation(); Location enter = bukkitEntity.getLocation();
Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld());
- EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius); - EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius);
+ // Paper start + // Paper start

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
Co-authored-by: david <mrminecraft00@gmail.com> Co-authored-by: david <mrminecraft00@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cb9b46ed5ff2f9aa0d322be75659c0046f38c663..b35365fce1233214a0dd7f1cf86d940f47c860d3 100644 index b7a432d743d749d3da213779428c2e12f3f808dd..209392dbaa5248de1235807c01395f0ec6b924f8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2041,7 +2041,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2058,7 +2058,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void performUnsignedChatCommand(String command) { private void performUnsignedChatCommand(String command) {
// CraftBukkit start // CraftBukkit start
String command1 = "/" + command; String command1 = "/" + command;
@ -19,7 +19,7 @@ index cb9b46ed5ff2f9aa0d322be75659c0046f38c663..b35365fce1233214a0dd7f1cf86d940f
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command1, new LazyPlayerSet(this.server)); PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command1, new LazyPlayerSet(this.server));
this.cserver.getPluginManager().callEvent(event); this.cserver.getPluginManager().callEvent(event);
@@ -2081,7 +2083,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2098,7 +2100,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) { private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) {
// CraftBukkit start // CraftBukkit start
String command = "/" + packet.command(); String command = "/" + packet.command();

Datei anzeigen

@ -5,18 +5,18 @@ Subject: [PATCH] Flying Fall Damage
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 61553ebc54b5666c2f53d2aa2bbb2a74f0a266dd..77624e34143dc37ca3b523a81b9a041ffb3199bd 100644 index 4ff41cc3e2ff69c6f0c3cd7be3e22d6948010599..9706b0df7d0c617a181ba9f78b010e2e58c84454 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -194,6 +194,7 @@ public abstract class Player extends LivingEntity { @@ -195,6 +195,7 @@ public abstract class Player extends LivingEntity {
public Entity currentExplosionCause; private boolean ignoreFallDamageFromCurrentImpulse;
public boolean ignoreFallDamageFromCurrentImpulse; private int currentImpulseContextResetGraceTime;
public boolean affectsSpawning = true; // Paper - Affects Spawning API public boolean affectsSpawning = true; // Paper - Affects Spawning API
+ public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage + public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
// CraftBukkit start // CraftBukkit start
public boolean fauxSleeping; public boolean fauxSleeping;
@@ -1693,7 +1694,7 @@ public abstract class Player extends LivingEntity { @@ -1694,7 +1695,7 @@ public abstract class Player extends LivingEntity {
@Override @Override
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
@ -26,10 +26,10 @@ index 61553ebc54b5666c2f53d2aa2bbb2a74f0a266dd..77624e34143dc37ca3b523a81b9a041f
} else { } else {
if (fallDistance >= 2.0F) { if (fallDistance >= 2.0F) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 26534a2ed76cb6038e02671190848f0c9997b2fc..1ca6552705213ce193ab9ce50b2ffeaad1f08dfd 100644 index 3fcd440ffa00bbed5cdc19f999644e32d3b24aed..3702000d7fb9af078b39f2fb16cf9c494b51f590 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2563,6 +2563,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2576,6 +2576,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().onUpdateAbilities(); this.getHandle().onUpdateAbilities();
} }

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Expose pre-collision moving velocity to
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 51f1f00e9e68abb9a098a193f8201715ae73a8e4..c15a08c6d9277dd1d6d63a25dacce0c43b8dad05 100644 index 9a49ab3cf682faef790c17579aec204b2778e461..c6d356fc0b94255299299eade9fb4b77bae8cc03 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -967,6 +967,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -943,6 +943,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
public void move(MoverType movementType, Vec3 movement) { public void move(MoverType movementType, Vec3 movement) {
@ -17,7 +17,7 @@ index 51f1f00e9e68abb9a098a193f8201715ae73a8e4..c15a08c6d9277dd1d6d63a25dacce0c4
if (this.noPhysics) { if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else { } else {
@@ -1051,7 +1052,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -1027,7 +1028,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} }
if (!bl.getType().isAir()) { if (!bl.getType().isAir()) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] config for disabling entity tag tags
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index df7b9d0693777fa203cc4d4a7519c5648e274bb6..d769dc472d3f12bf1e30ddd767a76659b734caac 100644 index c0062c8f83641ff30e79a309c0bb9930ba4b422a..5fb3279342506611882b5780cfbee0371919c93c 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java --- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -502,6 +502,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @@ -502,6 +502,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b35365fce1233214a0dd7f1cf86d940f47c860d3..fa4c6bd37bd7e3c66c867bab61b11b0bd217fd22 100644 index 209392dbaa5248de1235807c01395f0ec6b924f8..106dd38a73c0cd9095066ba23342865931483ccd 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3421,7 +3421,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -3438,7 +3438,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID()); this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
this.chatMessageChain.append(() -> { this.chatMessageChain.append(() -> {
this.player.setChatSession(session); this.player.setChatSession(session);
@ -18,7 +18,7 @@ index b35365fce1233214a0dd7f1cf86d940f47c860d3..fa4c6bd37bd7e3c66c867bab61b11b0b
} }
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 5f40469fa423cbbb60dbfd0ff75d62a2267d29b1..942af999a4a3aa03cb7ef5f0b9d377c78677fd0e 100644 index 283ed3e0b0ad26c57edcfcadd4d600e67b75eca9..f730d441e5e577b354d507a175690fe3246107d5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -361,6 +361,7 @@ public abstract class PlayerList { @@ -361,6 +361,7 @@ public abstract class PlayerList {

Datei anzeigen

@ -22,10 +22,10 @@ This patch corrects this behaviour by only shrinking the item if a totem
of undying was found and the event was called uncancelled. of undying was found and the event was called uncancelled.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 337c43f08465cb84227ca02b99f972b47a9186f5..ca5dd07e74d1ecf303091faeb4d7796bbc7a57c8 100644 index 1d414e243562397703519f84269dd3e37a5b27a0..1a44fa4a9a6f620e63a4105ac992795d58d6967a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1638,7 +1638,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1621,7 +1621,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getCraftServer().getPluginManager().callEvent(event); this.level().getCraftServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) { if (!event.isCancelled()) {

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API
public net.minecraft.server.level.ServerPlayer seenCredits public net.minecraft.server.level.ServerPlayer seenCredits
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1ca6552705213ce193ab9ce50b2ffeaad1f08dfd..952728c30f8871f8ed1f27800feba7db038ad420 100644 index 3702000d7fb9af078b39f2fb16cf9c494b51f590..512137a80e6cdcf52c1bde11c86a28663d5b3609 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1292,6 +1292,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1305,6 +1305,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet); this.getHandle().connection.send(packet);
} }

Datei anzeigen

@ -16,7 +16,7 @@ with less than zero amounts, so this code doesn't create
a problem with operations on the vanilla ItemStack. a problem with operations on the vanilla ItemStack.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 2a7996f5cfb1eacf098e73f35bafc4327b041c51..fa223d2381986cb260c79f074fb7b123396f1f86 100644 index 80423156c5582b07911561d29ec494dc03a57f07..1abef66189f3340e6dba7f73b9517044ae9be6e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -160,7 +160,7 @@ public final class CraftItemStack extends ItemStack { @@ -160,7 +160,7 @@ public final class CraftItemStack extends ItemStack {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add Entity Body Yaw API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 365281dfc0308c5db0c72b56208d9b87be0e955e..991b94ff1186b1071a94b2662873dc071255e2e6 100644 index 3c1e199316ae283210529d4d27b4f9d70b4d9404..d8b1cdc78eb234023a42d740599009737201e70e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1164,6 +1164,33 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1181,6 +1181,33 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
} }
// Paper end - entity powdered snow API // Paper end - entity powdered snow API
@ -43,10 +43,10 @@ index 365281dfc0308c5db0c72b56208d9b87be0e955e..991b94ff1186b1071a94b2662873dc07
@Override @Override
public boolean isInvisible() { // Paper - moved up from LivingEntity public boolean isInvisible() { // Paper - moved up from LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 112d54e1789d30ef89b34f53a60b0124538d3cda..37b62a45bbe2db725f24330f1f03e8cf09ab208c 100644 index 78bcec3f51563bf242da53392478eac4c498082a..28fe6c8a4a73caa39c8a265814d050b74e8b9715 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1161,4 +1161,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -1162,4 +1162,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().frictionState = state; this.getHandle().frictionState = state;
} }
// Paper end - friction API // Paper end - friction API

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityFertilizeEggEvent
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index 83759d65d5be3e4df2b1815f82bf195fad41c542..b4d68a08ec1e4ec7bcc123bcb6c2dc90272430cf 100644 index 34e6bf677a9f4548f3febe6d57e6af9602530271..2e5ef2a680e294b49f29e8d7ba8bd0ed023c393c 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -441,6 +441,10 @@ public class Turtle extends Animal { @@ -441,6 +441,10 @@ public class Turtle extends Animal {
@ -47,7 +47,7 @@ index a7af50ebc17abd829a7254c03785206da9624060..816977990639ec0559b652fc9666afd5
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
index a0c52ce65d4035d135b1536c7408a6867a553447..dc035bf94c5f6574ed8ad369b327b7f7a145e1d6 100644 index d34d8fe70379dcad9540739ec0ae1c94f01fc46b..fadd341ff398886a4da102eefa1beb95a63bbd6d 100644
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java --- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -345,11 +345,16 @@ public class Sniffer extends Animal { @@ -345,11 +345,16 @@ public class Sniffer extends Animal {
@ -69,10 +69,10 @@ index a0c52ce65d4035d135b1536c7408a6867a553447..dc035bf94c5f6574ed8ad369b327b7f7
this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F); this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F);
} // Paper - Call EntityDropItemEvent } // Paper - Call EntityDropItemEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 3d26da4e2afbf29fff99c1ee352773022698e6c9..cbf2cd3c7005fb4148c15966079922a8b18ece91 100644 index b1c99a83726749229c4d386984c76c3ffdfc5ae2..7fa64d9081ce54d91eb7631c7d8623ed11d9954b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2120,4 +2120,28 @@ public class CraftEventFactory { @@ -2126,4 +2126,28 @@ public class CraftEventFactory {
return event.callEvent(); return event.callEvent();
} }
// Paper end // Paper end

Datei anzeigen

@ -23,7 +23,7 @@ index 2ebbf7954dc5e0d6c9d53327d05b725eec310086..c5bd2e90ad74ba08910f65a2e07b6f76
return !this.getResponse(); return !this.getResponse();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ca5dd07e74d1ecf303091faeb4d7796bbc7a57c8..d314d5f9f66a86376d66cd607e3545c5d95fd12e 100644 index 1a44fa4a9a6f620e63a4105ac992795d58d6967a..54bb93eae61ed223a9287671f5d47d978170824f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2359,7 +2359,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2359,7 +2359,7 @@ public abstract class LivingEntity extends Entity implements Attackable {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix crash relating to bad recipes in furnace-like tile
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index d19e799491f790ca967a0731ef95a06993a7ab9a..f40b2582d9087f9dbb5cab950304698f33fdd879 100644 index 6d9bb60fd6d12933df960c984bc57084bd2f53db..86667e93a86d84aabd05aa40a0a37a454ce7d290 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -613,6 +613,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -616,6 +616,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
Entry<ResourceLocation> entry = (Entry) objectiterator.next(); Entry<ResourceLocation> entry = (Entry) objectiterator.next();
worldserver.getRecipeManager().byKey((ResourceLocation) entry.getKey()).ifPresent((recipeholder) -> { worldserver.getRecipeManager().byKey((ResourceLocation) entry.getKey()).ifPresent((recipeholder) -> {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Treat sequence violations like they should be
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fa4c6bd37bd7e3c66c867bab61b11b0bd217fd22..665ef268a0936a52b979c6cca680e237ae7aa74c 100644 index 106dd38a73c0cd9095066ba23342865931483ccd..67b756ec3cc955d3d9c23defc63bd0df29af3d10 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1960,6 +1960,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1977,6 +1977,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void ackBlockChangesUpTo(int sequence) { public void ackBlockChangesUpTo(int sequence) {
if (sequence < 0) { if (sequence < 0) {

Datei anzeigen

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Noah van der Aa <ndvdaa@gmail.com>
Date: Tue, 6 Dec 2022 18:45:54 +0100
Subject: [PATCH] Limit pet look distance
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
index 4d2a04158f8e1855b59636b0b67fcb6a795f32e7..8fa9282acd87132516329083f774345df3310cf2 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
@@ -94,7 +94,7 @@ public class FollowOwnerGoal extends Goal {
@Override
public void tick() {
- this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float) this.tamable.getMaxHeadXRot());
+ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float) this.tamable.getMaxHeadXRot()); // Paper - Limit pet look distance
if (--this.timeToRecalcPath <= 0) {
this.timeToRecalcPath = this.adjustedTickDelay(10);
if (this.tamable.distanceToSqr((Entity) this.owner) >= 144.0D) {