revert git patch format from applied file patches

This commit is contained in:
granny
2025-09-19 18:53:27 -07:00
parent ccec8d0d2c
commit 67bc34f8bf
196 changed files with 419 additions and 1991 deletions

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..ca21597263cb430e2a5ae07e8cecfb0d53a270d2 100644
--- a/io/papermc/paper/entity/activation/ActivationRange.java --- a/io/papermc/paper/entity/activation/ActivationRange.java
+++ b/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java
@@ -147,6 +147,8 @@ public final class ActivationRange { @@ -147,6 +_,8 @@
continue; continue;
} }
@@ -17,7 +9,7 @@ index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..ca21597263cb430e2a5ae07e8cecfb0d
final int worldHeight = world.getHeight(); final int worldHeight = world.getHeight();
ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange); ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange);
ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange); ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange);
@@ -288,6 +290,7 @@ public final class ActivationRange { @@ -288,6 +_,7 @@
* @return * @return
*/ */
public static boolean checkIfActive(final Entity entity) { public static boolean checkIfActive(final Entity entity) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/CrashReport.java b/net/minecraft/CrashReport.java
index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..394443d00e661715439be1e56dddc129947699a4 100644
--- a/net/minecraft/CrashReport.java --- a/net/minecraft/CrashReport.java
+++ b/net/minecraft/CrashReport.java +++ b/net/minecraft/CrashReport.java
@@ -30,6 +30,7 @@ public class CrashReport { @@ -30,6 +_,7 @@
private boolean trackingStackTrace = true; private boolean trackingStackTrace = true;
private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0]; private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0];
private final SystemReport systemReport = new SystemReport(); private final SystemReport systemReport = new SystemReport();
@@ -16,7 +8,7 @@ index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..394443d00e661715439be1e56dddc129
public CrashReport(String title, Throwable exception) { public CrashReport(String title, Throwable exception) {
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper
@@ -130,7 +131,7 @@ public class CrashReport { @@ -130,7 +_,7 @@
} }
public String getFriendlyReport(ReportType type) { public String getFriendlyReport(ReportType type) {
@@ -25,7 +17,7 @@ index 3e0e88afcf010d9a3d46e48bca5cbdf98fe97544..394443d00e661715439be1e56dddc129
} }
@Nullable @Nullable
@@ -161,7 +162,7 @@ public class CrashReport { @@ -161,7 +_,7 @@
} }
public boolean saveToFile(Path path, ReportType type) { public boolean saveToFile(Path path, ReportType type) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java
index 3acfb2a78845dd8081dc3c01d653034232c76e60..51caf352e77df49fc04bf84f1fab29b6f4f4fc14 100644
--- a/net/minecraft/commands/CommandSourceStack.java --- a/net/minecraft/commands/CommandSourceStack.java
+++ b/net/minecraft/commands/CommandSourceStack.java +++ b/net/minecraft/commands/CommandSourceStack.java
@@ -447,6 +447,19 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS @@ -447,6 +_,19 @@
} }
// CraftBukkit end // CraftBukkit end
@@ -28,10 +20,11 @@ index 3acfb2a78845dd8081dc3c01d653034232c76e60..51caf352e77df49fc04bf84f1fab29b6
public Vec3 getPosition() { public Vec3 getPosition() {
return this.worldPosition; return this.worldPosition;
} }
@@ -532,6 +545,30 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS @@ -531,6 +_,30 @@
}
} }
} }
+
+ // Purpur start - Purpur config files + // Purpur start - Purpur config files
+ public void sendSuccess(@Nullable String message) { + public void sendSuccess(@Nullable String message) {
+ sendSuccess(message, false); + sendSuccess(message, false);
@@ -55,7 +48,6 @@ index 3acfb2a78845dd8081dc3c01d653034232c76e60..51caf352e77df49fc04bf84f1fab29b6
+ sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(message), broadcastToOps); + sendSuccess(() -> io.papermc.paper.adventure.PaperAdventure.asVanilla(message), broadcastToOps);
+ } + }
+ // Purpur end - Purpur config files + // Purpur end - Purpur config files
+
public void sendSuccess(Supplier<Component> messageSupplier, boolean allowLogging) { public void sendSuccess(Supplier<Component> messageSupplier, boolean allowLogging) {
boolean flag = this.source.acceptsSuccess() && !this.silent; boolean flag = this.source.acceptsSuccess() && !this.silent;
boolean flag1 = allowLogging && this.source.shouldInformAdmins() && !this.silent;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/commands/arguments/selector/EntitySelector.java b/net/minecraft/commands/arguments/selector/EntitySelector.java
index 514f8fbdeb776087608665c35de95294aadf5cf0..b305ba9bab617bf4e52d0e6ddf160bacc5751a94 100644
--- a/net/minecraft/commands/arguments/selector/EntitySelector.java --- a/net/minecraft/commands/arguments/selector/EntitySelector.java
+++ b/net/minecraft/commands/arguments/selector/EntitySelector.java +++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
@@ -192,26 +192,27 @@ public class EntitySelector { @@ -192,26 +_,27 @@
this.checkPermissions(source); this.checkPermissions(source);
if (this.playerName != null) { if (this.playerName != null) {
ServerPlayer playerByName = source.getServer().getPlayerList().getPlayerByName(this.playerName); ServerPlayer playerByName = source.getServer().getPlayerList().getPlayerByName(this.playerName);
@@ -40,7 +32,7 @@ index 514f8fbdeb776087608665c35de95294aadf5cf0..b305ba9bab617bf4e52d0e6ddf160bac
players.add(serverPlayer1); players.add(serverPlayer1);
if (players.size() >= resultLimit) { if (players.size() >= resultLimit) {
return players; return players;
@@ -270,4 +271,10 @@ public class EntitySelector { @@ -270,4 +_,10 @@
public static Component joinNames(List<? extends Entity> names) { public static Component joinNames(List<? extends Entity> names) {
return ComponentUtils.formatList(names, Entity::getDisplayName); return ComponentUtils.formatList(names, Entity::getDisplayName);
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java
index a81694a22e94cca6f7110f7d5b205d1303f4e071..6518d3fff6daf331b24a7bf5b39fa1920b73711d 100644
--- a/net/minecraft/core/BlockPos.java --- a/net/minecraft/core/BlockPos.java
+++ b/net/minecraft/core/BlockPos.java +++ b/net/minecraft/core/BlockPos.java
@@ -63,6 +63,12 @@ public class BlockPos extends Vec3i { @@ -63,6 +_,12 @@
public static final int MAX_HORIZONTAL_COORDINATE = 33554431; public static final int MAX_HORIZONTAL_COORDINATE = 33554431;
// Paper end - Optimize Bit Operations by inlining // Paper end - Optimize Bit Operations by inlining

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/core/dispenser/DispenseItemBehavior.java b/net/minecraft/core/dispenser/DispenseItemBehavior.java
index ca02c4c71a0a5a1a0ae8bbb40f0b1b7eac64e6fd..582e012222123e5001c34153f2ee1ab1d08935fd 100644
--- a/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -735,5 +735,22 @@ public interface DispenseItemBehavior { @@ -735,5 +_,22 @@
DispenserBlock.registerBehavior(Items.TNT_MINECART, new MinecartDispenseItemBehavior(EntityType.TNT_MINECART)); DispenserBlock.registerBehavior(Items.TNT_MINECART, new MinecartDispenseItemBehavior(EntityType.TNT_MINECART));
DispenserBlock.registerBehavior(Items.HOPPER_MINECART, new MinecartDispenseItemBehavior(EntityType.HOPPER_MINECART)); DispenserBlock.registerBehavior(Items.HOPPER_MINECART, new MinecartDispenseItemBehavior(EntityType.HOPPER_MINECART));
DispenserBlock.registerBehavior(Items.COMMAND_BLOCK_MINECART, new MinecartDispenseItemBehavior(EntityType.COMMAND_BLOCK_MINECART)); DispenserBlock.registerBehavior(Items.COMMAND_BLOCK_MINECART, new MinecartDispenseItemBehavior(EntityType.COMMAND_BLOCK_MINECART));

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
index e2d169b45f1dba6559ca337b07a110f79d3db504..727d04a442053f6d0c4df3e744554e2866fa38cd 100644
--- a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java --- a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
+++ b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java +++ b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
@@ -32,7 +32,7 @@ public class EquipmentDispenseItemBehavior extends DefaultDispenseItemBehavior { @@ -32,7 +_,7 @@
return false; return false;
} else { } else {
LivingEntity livingEntity = entitiesOfClass.getFirst(); LivingEntity livingEntity = entitiesOfClass.getFirst();

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/gametest/framework/GameTestHelper.java b/net/minecraft/gametest/framework/GameTestHelper.java
index 9fb53bc1330bf5370769200599b022a985f88db2..61ab8b508d2b614d0f05ae4cc23dc214f8e95a1d 100644
--- a/net/minecraft/gametest/framework/GameTestHelper.java --- a/net/minecraft/gametest/framework/GameTestHelper.java
+++ b/net/minecraft/gametest/framework/GameTestHelper.java +++ b/net/minecraft/gametest/framework/GameTestHelper.java
@@ -292,6 +292,8 @@ public class GameTestHelper { @@ -292,6 +_,8 @@
return gameType; return gameType;
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/gametest/framework/TestCommand.java b/net/minecraft/gametest/framework/TestCommand.java
index 17f33a309ead525975a3090514a6367260f0af09..f4360d9472ba344f2e7afd6d798d313d5423fcb5 100644
--- a/net/minecraft/gametest/framework/TestCommand.java --- a/net/minecraft/gametest/framework/TestCommand.java
+++ b/net/minecraft/gametest/framework/TestCommand.java +++ b/net/minecraft/gametest/framework/TestCommand.java
@@ -449,7 +449,7 @@ public class TestCommand { @@ -449,7 +_,7 @@
) )
) )
); );

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
index 41005f6b9f53a9c1125ad5e08538d9f5aacb3571..411e1284a208ca1a097cf6eaa92e1e0d2203d83d 100644
--- a/net/minecraft/network/Connection.java --- a/net/minecraft/network/Connection.java
+++ b/net/minecraft/network/Connection.java +++ b/net/minecraft/network/Connection.java
@@ -580,11 +580,20 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> { @@ -580,11 +_,20 @@
private static final int MAX_PER_TICK = io.papermc.paper.configuration.GlobalConfiguration.get().misc.maxJoinsPerTick; // Paper - Buffer joins to world private static final int MAX_PER_TICK = io.papermc.paper.configuration.GlobalConfiguration.get().misc.maxJoinsPerTick; // Paper - Buffer joins to world
private static int joinAttemptsThisTick; // Paper - Buffer joins to world private static int joinAttemptsThisTick; // Paper - Buffer joins to world
private static int currTick; // Paper - Buffer joins to world private static int currTick; // Paper - Buffer joins to world

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/network/chat/SignedMessageChain.java b/net/minecraft/network/chat/SignedMessageChain.java
index f6eed34b2fd72ab74cc9dc4b99ca184d512c0a66..a3e211edd348c0936757de33a74b9456248b3bd2 100644
--- a/net/minecraft/network/chat/SignedMessageChain.java --- a/net/minecraft/network/chat/SignedMessageChain.java
+++ b/net/minecraft/network/chat/SignedMessageChain.java +++ b/net/minecraft/network/chat/SignedMessageChain.java
@@ -45,7 +45,7 @@ public class SignedMessageChain { @@ -45,7 +_,7 @@
SignedMessageLink signedMessageLink = SignedMessageChain.this.nextLink; SignedMessageLink signedMessageLink = SignedMessageChain.this.nextLink;
if (signedMessageLink == null) { if (signedMessageLink == null) {
throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.CHAIN_BROKEN); throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.CHAIN_BROKEN);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
index fd3553bdc1c3cdbf6aa3dc00e0a4987f8eaa4fb8..b06c2c4aa77edafb374f7cf0406cf4d29c6e7f9f 100644
--- a/net/minecraft/server/Main.java --- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java
@@ -109,6 +109,13 @@ public class Main { @@ -109,6 +_,13 @@
JvmProfiler.INSTANCE.start(Environment.SERVER); JvmProfiler.INSTANCE.start(Environment.SERVER);
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109ece0be0e0 100644
--- a/net/minecraft/server/MinecraftServer.java --- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java
@@ -284,6 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -284,6 +_,7 @@
public joptsimple.OptionSet options; public joptsimple.OptionSet options;
public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.ConsoleCommandSender console;
public static int currentTick; // Paper - improve tick loop public static int currentTick; // Paper - improve tick loop
@@ -16,7 +8,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>(); public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod; public int autosavePeriod;
// Paper - don't store the vanilla dispatcher // Paper - don't store the vanilla dispatcher
@@ -294,7 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -294,7 +_,7 @@
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS; public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
private static final int SAMPLE_INTERVAL = 20; // Paper - improve server tick loop private static final int SAMPLE_INTERVAL = 20; // Paper - improve server tick loop
@Deprecated(forRemoval = true) // Paper @Deprecated(forRemoval = true) // Paper
@@ -25,7 +17,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
// Spigot end // Spigot end
public volatile boolean hasFullyShutdown; // Paper - Improved watchdog support public volatile boolean hasFullyShutdown; // Paper - Improved watchdog support
public volatile boolean abnormalExit; // Paper - Improved watchdog support public volatile boolean abnormalExit; // Paper - Improved watchdog support
@@ -303,6 +304,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -303,6 +_,8 @@
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
@@ -34,7 +26,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) { public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
@@ -996,6 +999,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -996,6 +_,15 @@
LOGGER.info("Stopping server"); LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -50,7 +42,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
// CraftBukkit start // CraftBukkit start
if (this.server != null) { if (this.server != null) {
this.server.spark.disable(); // Paper - spark this.server.spark.disable(); // Paper - spark
@@ -1094,6 +1106,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1094,6 +_,8 @@
this.safeShutdown(waitForServer, false); this.safeShutdown(waitForServer, false);
} }
public void safeShutdown(boolean waitForServer, boolean isRestarting) { public void safeShutdown(boolean waitForServer, boolean isRestarting) {
@@ -59,7 +51,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
this.isRestarting = isRestarting; this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper - Debugging this.hasLoggedStop = true; // Paper - Debugging
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -1113,6 +1127,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1113,6 +_,7 @@
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L; private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0; private long lastTick = 0;
private long catchupTime = 0; private long catchupTime = 0;
@@ -67,7 +59,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
public final RollingAverage tps1 = new RollingAverage(60); public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5); public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15); public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1199,6 +1214,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1199,6 +_,16 @@
} }
// Paper end - Add onboarding message for initial server start // Paper end - Add onboarding message for initial server start
@@ -84,7 +76,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
while (this.running) { while (this.running) {
long l; long l;
if (!this.isPaused() && this.tickRateManager.isSprinting() && this.tickRateManager.checkShouldSprintThisTick()) { if (!this.isPaused() && this.tickRateManager.isSprinting() && this.tickRateManager.checkShouldSprintThisTick()) {
@@ -1223,14 +1248,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1223,14 +_,19 @@
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) { if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
final long diff = currentTime - tickSection; final long diff = currentTime - tickSection;
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP); final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
@@ -107,7 +99,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
tickSection = currentTime; tickSection = currentTime;
} }
// Paper end - further improve server tick loop // Paper end - further improve server tick loop
@@ -1262,6 +1292,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1262,6 +_,12 @@
profilerFiller.popPush("nextTickWait"); profilerFiller.popPush("nextTickWait");
this.mayHaveDelayedTasks = true; this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + l, this.nextTickTimeNanos); this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + l, this.nextTickTimeNanos);
@@ -120,7 +112,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
this.startMeasuringTaskExecutionTime(); this.startMeasuringTaskExecutionTime();
this.waitUntilNextTick(); this.waitUntilNextTick();
this.finishMeasuringTaskExecutionTime(); this.finishMeasuringTaskExecutionTime();
@@ -1691,7 +1727,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1691,7 +_,7 @@
long worldTime = level.getGameTime(); long worldTime = level.getGameTime();
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight); final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
for (Player entityhuman : level.players()) { for (Player entityhuman : level.players()) {
@@ -129,7 +121,7 @@ index 9243bb11e3f968d0bf0eb2e3dc9295c0232bc15d..0595271ec939a72d38b97241270c109e
continue; continue;
} }
ServerPlayer entityplayer = (ServerPlayer) entityhuman; ServerPlayer entityplayer = (ServerPlayer) entityhuman;
@@ -1856,7 +1892,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1856,7 +_,7 @@
@DontObfuscate @DontObfuscate
public String getServerModName() { public String getServerModName() {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java
index fdeca41d40705f28864ce4443d01cd872c9d51b0..10e5469df1800bcdfb3f8cb4045ee25a4bafc58c 100644
--- a/net/minecraft/server/PlayerAdvancements.java --- a/net/minecraft/server/PlayerAdvancements.java
+++ b/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java
@@ -147,6 +147,7 @@ public class PlayerAdvancements { @@ -147,6 +_,7 @@
AdvancementHolder advancementHolder = advancementManager.get(path); AdvancementHolder advancementHolder = advancementManager.get(path);
if (advancementHolder == null) { if (advancementHolder == null) {
if (!path.getNamespace().equals(ResourceLocation.DEFAULT_NAMESPACE)) return; // CraftBukkit if (!path.getNamespace().equals(ResourceLocation.DEFAULT_NAMESPACE)) return; // CraftBukkit
@@ -16,7 +8,7 @@ index fdeca41d40705f28864ce4443d01cd872c9d51b0..10e5469df1800bcdfb3f8cb4045ee25a
LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", path, this.playerSavePath); LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", path, this.playerSavePath);
} else { } else {
this.startProgress(advancementHolder, progress); this.startProgress(advancementHolder, progress);
@@ -194,6 +195,7 @@ public class PlayerAdvancements { @@ -194,6 +_,7 @@
advancement.value().display().ifPresent(displayInfo -> { advancement.value().display().ifPresent(displayInfo -> {
// Paper start - Add Adventure message to PlayerAdvancementDoneEvent // Paper start - Add Adventure message to PlayerAdvancementDoneEvent
if (event.message() != null && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) { if (event.message() != null && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/commands/EnchantCommand.java b/net/minecraft/server/commands/EnchantCommand.java
index 6f4fcee9fdba2248227708fcced1ce0f40aff6af..13f1dbd0d09428e9e0a42f99d0553283e0065f6f 100644
--- a/net/minecraft/server/commands/EnchantCommand.java --- a/net/minecraft/server/commands/EnchantCommand.java
+++ b/net/minecraft/server/commands/EnchantCommand.java +++ b/net/minecraft/server/commands/EnchantCommand.java
@@ -70,7 +70,7 @@ public class EnchantCommand { @@ -70,7 +_,7 @@
private static int enchant(CommandSourceStack source, Collection<? extends Entity> targets, Holder<Enchantment> enchantment, int level) throws CommandSyntaxException { private static int enchant(CommandSourceStack source, Collection<? extends Entity> targets, Holder<Enchantment> enchantment, int level) throws CommandSyntaxException {
Enchantment enchantment1 = enchantment.value(); Enchantment enchantment1 = enchantment.value();
@@ -17,7 +9,7 @@ index 6f4fcee9fdba2248227708fcced1ce0f40aff6af..13f1dbd0d09428e9e0a42f99d0553283
throw ERROR_LEVEL_TOO_HIGH.create(level, enchantment1.getMaxLevel()); throw ERROR_LEVEL_TOO_HIGH.create(level, enchantment1.getMaxLevel());
} else { } else {
int i = 0; int i = 0;
@@ -80,7 +80,7 @@ public class EnchantCommand { @@ -80,7 +_,7 @@
ItemStack mainHandItem = livingEntity.getMainHandItem(); ItemStack mainHandItem = livingEntity.getMainHandItem();
if (!mainHandItem.isEmpty()) { if (!mainHandItem.isEmpty()) {
if (enchantment1.canEnchant(mainHandItem) if (enchantment1.canEnchant(mainHandItem)

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/commands/GameModeCommand.java b/net/minecraft/server/commands/GameModeCommand.java
index 9da9ab3b835a8dcc7e1da286be1de88a3f0240fa..4b8c9aaf1d143bc38f52f646e4e73b56013eda8c 100644
--- a/net/minecraft/server/commands/GameModeCommand.java --- a/net/minecraft/server/commands/GameModeCommand.java
+++ b/net/minecraft/server/commands/GameModeCommand.java +++ b/net/minecraft/server/commands/GameModeCommand.java
@@ -53,6 +53,18 @@ public class GameModeCommand { @@ -53,6 +_,18 @@
} }
private static int setMode(CommandContext<CommandSourceStack> source, Collection<ServerPlayer> players, GameType gameType) { private static int setMode(CommandContext<CommandSourceStack> source, Collection<ServerPlayer> players, GameType gameType) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/commands/GiveCommand.java b/net/minecraft/server/commands/GiveCommand.java
index 4f56cdcf658234b1ca92d38c3df3d31e9be34a15..945d7c0b31fe9ac029e518af92eebd6e8018a69f 100644
--- a/net/minecraft/server/commands/GiveCommand.java --- a/net/minecraft/server/commands/GiveCommand.java
+++ b/net/minecraft/server/commands/GiveCommand.java +++ b/net/minecraft/server/commands/GiveCommand.java
@@ -69,6 +69,7 @@ public class GiveCommand { @@ -69,6 +_,7 @@
i1 -= min; i1 -= min;
ItemStack itemStack1 = item.createItemStack(min, false); ItemStack itemStack1 = item.createItemStack(min, false);
boolean flag = serverPlayer.getInventory().add(itemStack1); boolean flag = serverPlayer.getInventory().add(itemStack1);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/gui/MinecraftServerGui.java b/net/minecraft/server/gui/MinecraftServerGui.java
index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b3788623900db41 100644
--- a/net/minecraft/server/gui/MinecraftServerGui.java --- a/net/minecraft/server/gui/MinecraftServerGui.java
+++ b/net/minecraft/server/gui/MinecraftServerGui.java +++ b/net/minecraft/server/gui/MinecraftServerGui.java
@@ -39,6 +39,11 @@ public class MinecraftServerGui extends JComponent { @@ -39,6 +_,11 @@
private Thread logAppenderThread; private Thread logAppenderThread;
private final Collection<Runnable> finalizers = Lists.newArrayList(); private final Collection<Runnable> finalizers = Lists.newArrayList();
final AtomicBoolean isClosing = new AtomicBoolean(); final AtomicBoolean isClosing = new AtomicBoolean();
@@ -20,7 +12,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
public static MinecraftServerGui showFrameFor(final DedicatedServer server) { public static MinecraftServerGui showFrameFor(final DedicatedServer server) {
try { try {
@@ -46,7 +51,7 @@ public class MinecraftServerGui extends JComponent { @@ -46,7 +_,7 @@
} catch (Exception var3) { } catch (Exception var3) {
} }
@@ -29,7 +21,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
final MinecraftServerGui minecraftServerGui = new MinecraftServerGui(server); final MinecraftServerGui minecraftServerGui = new MinecraftServerGui(server);
jFrame.setDefaultCloseOperation(2); jFrame.setDefaultCloseOperation(2);
jFrame.add(minecraftServerGui); jFrame.add(minecraftServerGui);
@@ -54,7 +59,7 @@ public class MinecraftServerGui extends JComponent { @@ -54,7 +_,7 @@
jFrame.setLocationRelativeTo(null); jFrame.setLocationRelativeTo(null);
jFrame.setVisible(true); jFrame.setVisible(true);
// Paper start - Improve ServerGUI // Paper start - Improve ServerGUI
@@ -38,7 +30,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
try { try {
jFrame.setIconImage(javax.imageio.ImageIO.read(java.util.Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("logo.png")))); jFrame.setIconImage(javax.imageio.ImageIO.read(java.util.Objects.requireNonNull(MinecraftServerGui.class.getClassLoader().getResourceAsStream("logo.png"))));
} catch (java.io.IOException ignore) { } catch (java.io.IOException ignore) {
@@ -64,7 +69,7 @@ public class MinecraftServerGui extends JComponent { @@ -64,7 +_,7 @@
@Override @Override
public void windowClosing(WindowEvent event) { public void windowClosing(WindowEvent event) {
if (!minecraftServerGui.isClosing.getAndSet(true)) { if (!minecraftServerGui.isClosing.getAndSet(true)) {
@@ -47,7 +39,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
server.halt(true); server.halt(true);
minecraftServerGui.runFinalizers(); minecraftServerGui.runFinalizers();
} }
@@ -112,7 +117,7 @@ public class MinecraftServerGui extends JComponent { @@ -112,7 +_,7 @@
private JComponent buildChatPanel() { private JComponent buildChatPanel() {
JPanel jPanel = new JPanel(new BorderLayout()); JPanel jPanel = new JPanel(new BorderLayout());
@@ -56,7 +48,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
JScrollPane jScrollPane = new JScrollPane(jTextArea, 22, 30); JScrollPane jScrollPane = new JScrollPane(jTextArea, 22, 30);
jTextArea.setEditable(false); jTextArea.setEditable(false);
jTextArea.setFont(MONOSPACED); jTextArea.setFont(MONOSPACED);
@@ -121,10 +126,43 @@ public class MinecraftServerGui extends JComponent { @@ -121,10 +_,43 @@
String trimmed = jTextField.getText().trim(); String trimmed = jTextField.getText().trim();
if (!trimmed.isEmpty()) { if (!trimmed.isEmpty()) {
this.server.handleConsoleInput(trimmed, this.server.createCommandSourceStack()); this.server.handleConsoleInput(trimmed, this.server.createCommandSourceStack());
@@ -100,7 +92,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
jTextArea.addFocusListener(new FocusAdapter() { jTextArea.addFocusListener(new FocusAdapter() {
@Override @Override
public void focusGained(FocusEvent event) { public void focusGained(FocusEvent event) {
@@ -159,7 +197,7 @@ public class MinecraftServerGui extends JComponent { @@ -159,7 +_,7 @@
} }
private static final java.util.regex.Pattern ANSI = java.util.regex.Pattern.compile("\\e\\[[\\d;]*[^\\d;]"); // CraftBukkit // Paper private static final java.util.regex.Pattern ANSI = java.util.regex.Pattern.compile("\\e\\[[\\d;]*[^\\d;]"); // CraftBukkit // Paper
@@ -109,7 +101,7 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
if (!SwingUtilities.isEventDispatchThread()) { if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(() -> this.print(textArea, scrollPane, line)); SwingUtilities.invokeLater(() -> this.print(textArea, scrollPane, line));
} else { } else {
@@ -170,10 +208,11 @@ public class MinecraftServerGui extends JComponent { @@ -170,16 +_,29 @@
flag = verticalScrollBar.getValue() + verticalScrollBar.getSize().getHeight() + MONOSPACED.getSize() * 4 > verticalScrollBar.getMaximum(); flag = verticalScrollBar.getValue() + verticalScrollBar.getSize().getHeight() + MONOSPACED.getSize() * 4 > verticalScrollBar.getMaximum();
} }
@@ -123,10 +115,10 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
if (flag) { if (flag) {
verticalScrollBar.setValue(Integer.MAX_VALUE); verticalScrollBar.setValue(Integer.MAX_VALUE);
@@ -181,6 +220,18 @@ public class MinecraftServerGui extends JComponent { }
} }
} }
+
+ // Purpur start - GUI Improvements + // Purpur start - GUI Improvements
+ public static class CommandHistory extends java.util.LinkedList<String> { + public static class CommandHistory extends java.util.LinkedList<String> {
+ @Override + @Override
@@ -138,7 +130,6 @@ index f262a7c5ae4e7d56f16f5c0f4f145a2e428abbe4..614c7d9f673c926562acc8fa3b378862
+ } + }
+ } + }
+ // Purpur end - GUI Improvements + // Purpur end - GUI Improvements
+
// Paper start - Add onboarding message for initial server start // Paper start - Add onboarding message for initial server start
private JComponent buildOnboardingPanel() { private JComponent buildOnboardingPanel() {
String onboardingLink = "https://docs.papermc.io/paper/next-steps";

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/gui/StatsComponent.java b/net/minecraft/server/gui/StatsComponent.java
index 35fd539eb2bfe60ad17ab1e558a01273666acc54..103ff139dae918c991413ce9df61da3e22ee458a 100644
--- a/net/minecraft/server/gui/StatsComponent.java --- a/net/minecraft/server/gui/StatsComponent.java
+++ b/net/minecraft/server/gui/StatsComponent.java +++ b/net/minecraft/server/gui/StatsComponent.java
@@ -43,7 +43,7 @@ public class StatsComponent extends JComponent { @@ -43,7 +_,7 @@
} }
this.msgs[0] = "Memory use: " + l / 1024L / 1024L + " mb (" + Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory() + "% free)"; this.msgs[0] = "Memory use: " + l / 1024L / 1024L + " mb (" + Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory() + "% free)";
this.msgs[1] = "Avg tick: " + DECIMAL_FORMAT.format((double)this.server.getAverageTickTimeNanos() / TimeUtil.NANOSECONDS_PER_MILLISECOND) + " ms"; this.msgs[1] = "Avg tick: " + DECIMAL_FORMAT.format((double)this.server.getAverageTickTimeNanos() / TimeUtil.NANOSECONDS_PER_MILLISECOND) + " ms";

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java
index cfbf34964288526e93d0a5b212c1b60296c10430..d638821595138ef972163925136eb57207b31719 100644
--- a/net/minecraft/server/level/ServerPlayerGameMode.java --- a/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -348,6 +348,7 @@ public class ServerPlayerGameMode { @@ -348,6 +_,7 @@
} }
return false; return false;
} }
@@ -16,7 +8,7 @@ index cfbf34964288526e93d0a5b212c1b60296c10430..d638821595138ef972163925136eb572
} }
// CraftBukkit end // CraftBukkit end
@@ -461,6 +462,7 @@ public class ServerPlayerGameMode { @@ -461,6 +_,7 @@
public InteractionHand interactHand; public InteractionHand interactHand;
public ItemStack interactItemStack; public ItemStack interactItemStack;
public InteractionResult useItemOn(ServerPlayer player, Level level, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) { public InteractionResult useItemOn(ServerPlayer player, Level level, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) {
@@ -24,7 +16,7 @@ index cfbf34964288526e93d0a5b212c1b60296c10430..d638821595138ef972163925136eb572
BlockPos blockPos = hitResult.getBlockPos(); BlockPos blockPos = hitResult.getBlockPos();
BlockState blockState = level.getBlockState(blockPos); BlockState blockState = level.getBlockState(blockPos);
boolean cancelledBlock = false; boolean cancelledBlock = false;
@@ -503,7 +505,7 @@ public class ServerPlayerGameMode { @@ -503,7 +_,7 @@
boolean flag = !player.getMainHandItem().isEmpty() || !player.getOffhandItem().isEmpty(); boolean flag = !player.getMainHandItem().isEmpty() || !player.getOffhandItem().isEmpty();
boolean flag1 = player.isSecondaryUseActive() && flag; boolean flag1 = player.isSecondaryUseActive() && flag;
ItemStack itemStack = stack.copy(); ItemStack itemStack = stack.copy();
@@ -33,7 +25,7 @@ index cfbf34964288526e93d0a5b212c1b60296c10430..d638821595138ef972163925136eb572
InteractionResult interactionResult = blockState.useItemOn(player.getItemInHand(hand), level, player, hand, hitResult); InteractionResult interactionResult = blockState.useItemOn(player.getItemInHand(hand), level, player, hand, hitResult);
if (interactionResult.consumesAction()) { if (interactionResult.consumesAction()) {
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger(player, blockPos, itemStack); CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger(player, blockPos, itemStack);
@@ -549,4 +551,18 @@ public class ServerPlayerGameMode { @@ -549,4 +_,18 @@
public void setLevel(ServerLevel serverLevel) { public void setLevel(ServerLevel serverLevel) {
this.level = serverLevel; this.level = serverLevel;
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/level/WorldGenRegion.java b/net/minecraft/server/level/WorldGenRegion.java
index 11fed81a4696ba18440e755c3b8a5ca39ed8a6b1..18367ee56288c4cc60b66555583a8900e7a47daf 100644
--- a/net/minecraft/server/level/WorldGenRegion.java --- a/net/minecraft/server/level/WorldGenRegion.java
+++ b/net/minecraft/server/level/WorldGenRegion.java +++ b/net/minecraft/server/level/WorldGenRegion.java
@@ -314,6 +314,7 @@ public class WorldGenRegion implements WorldGenLevel { @@ -314,6 +_,7 @@
return true; return true;
} else { } else {
// Paper start - Buffer OOB setBlock calls // Paper start - Buffer OOB setBlock calls

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index ebf4d4516233c002b33084f1679044b23869d848..20ba45054c243fbb85e50cf0bdf75648730cb0bc 100644
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -273,7 +273,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -273,7 +_,7 @@
ServerLoginPacketListenerImpl.LOGGER.warn("Failed to verify username but will let them in anyway!"); ServerLoginPacketListenerImpl.LOGGER.warn("Failed to verify username but will let them in anyway!");
ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(string1)); // Spigot ServerLoginPacketListenerImpl.this.startClientVerification(ServerLoginPacketListenerImpl.this.createOfflineProfile(string1)); // Spigot
} else { } else {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
index 465559113071a47e706f77a5b0996597ee986b3d..1b966dc52b067cd9d1fa9f500b692e3f75f1cc90 100644
--- a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java --- a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
@@ -37,6 +37,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene @@ -37,6 +_,7 @@
} else { } else {
this.hasRequestedStatus = true; this.hasRequestedStatus = true;
// this.connection.send(new ClientboundStatusResponsePacket(this.status)); // Paper // this.connection.send(new ClientboundStatusResponsePacket(this.status)); // Paper

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/server/players/SleepStatus.java b/net/minecraft/server/players/SleepStatus.java
index 2a7ae521654ad5c9f392baa5562e64bb71b13097..3a3e6992563236141db687084aeec9684437a7db 100644
--- a/net/minecraft/server/players/SleepStatus.java --- a/net/minecraft/server/players/SleepStatus.java
+++ b/net/minecraft/server/players/SleepStatus.java +++ b/net/minecraft/server/players/SleepStatus.java
@@ -15,7 +15,7 @@ public class SleepStatus { @@ -15,7 +_,7 @@
public boolean areEnoughDeepSleeping(int requiredSleepPercentage, List<ServerPlayer> sleepingPlayers) { public boolean areEnoughDeepSleeping(int requiredSleepPercentage, List<ServerPlayer> sleepingPlayers) {
// CraftBukkit start // CraftBukkit start
@@ -17,7 +9,7 @@ index 2a7ae521654ad5c9f392baa5562e64bb71b13097..3a3e6992563236141db687084aeec968
boolean anyDeepSleep = sleepingPlayers.stream().anyMatch(Player::isSleepingLongEnough); boolean anyDeepSleep = sleepingPlayers.stream().anyMatch(Player::isSleepingLongEnough);
return anyDeepSleep && i >= this.sleepersNeeded(requiredSleepPercentage); return anyDeepSleep && i >= this.sleepersNeeded(requiredSleepPercentage);
// CraftBukkit end // CraftBukkit end
@@ -43,7 +43,7 @@ public class SleepStatus { @@ -43,7 +_,7 @@
for (ServerPlayer serverPlayer : players) { for (ServerPlayer serverPlayer : players) {
if (!serverPlayer.isSpectator()) { if (!serverPlayer.isSpectator()) {
this.activePlayers++; this.activePlayers++;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/stats/ServerRecipeBook.java b/net/minecraft/stats/ServerRecipeBook.java
index 736a52c23da313bec6b25a9d1abf08816462403c..2f4f90bf428deb682fe9ec8c1218ae31ebaeea7c 100644
--- a/net/minecraft/stats/ServerRecipeBook.java --- a/net/minecraft/stats/ServerRecipeBook.java
+++ b/net/minecraft/stats/ServerRecipeBook.java +++ b/net/minecraft/stats/ServerRecipeBook.java
@@ -106,6 +106,7 @@ public class ServerRecipeBook extends RecipeBook { @@ -106,6 +_,7 @@
private void loadRecipes(List<ResourceKey<Recipe<?>>> recipes, Consumer<ResourceKey<Recipe<?>>> output, Predicate<ResourceKey<Recipe<?>>> isRecognized) { private void loadRecipes(List<ResourceKey<Recipe<?>>> recipes, Consumer<ResourceKey<Recipe<?>>> output, Predicate<ResourceKey<Recipe<?>>> isRecognized) {
for (ResourceKey<Recipe<?>> resourceKey : recipes) { for (ResourceKey<Recipe<?>> resourceKey : recipes) {
if (!isRecognized.test(resourceKey)) { if (!isRecognized.test(resourceKey)) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/util/StringUtil.java b/net/minecraft/util/StringUtil.java
index 77947e6915facee44588943fcd3e5b513de37e77..c3a99fe7b49858bc0ca9a7f800b0db40465f6901 100644
--- a/net/minecraft/util/StringUtil.java --- a/net/minecraft/util/StringUtil.java
+++ b/net/minecraft/util/StringUtil.java +++ b/net/minecraft/util/StringUtil.java
@@ -87,6 +87,7 @@ public class StringUtil { @@ -87,6 +_,7 @@
// Paper start - Username validation // Paper start - Username validation
public static boolean isReasonablePlayerName(final String name) { public static boolean isReasonablePlayerName(final String name) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/CombatRules.java b/net/minecraft/world/damagesource/CombatRules.java
index d5524038314591a10c9f08a68e2ac91f6079a897..bf82de45bf98e8605a1fdb69803f75f471c4af43 100644
--- a/net/minecraft/world/damagesource/CombatRules.java --- a/net/minecraft/world/damagesource/CombatRules.java
+++ b/net/minecraft/world/damagesource/CombatRules.java +++ b/net/minecraft/world/damagesource/CombatRules.java
@@ -15,7 +15,7 @@ public class CombatRules { @@ -15,7 +_,7 @@
public static float getDamageAfterAbsorb(LivingEntity entity, float damage, DamageSource damageSource, float armorValue, float armorToughness) { public static float getDamageAfterAbsorb(LivingEntity entity, float damage, DamageSource damageSource, float armorValue, float armorToughness) {
float f = 2.0F + armorToughness / 4.0F; float f = 2.0F + armorToughness / 4.0F;
@@ -17,7 +9,7 @@ index d5524038314591a10c9f08a68e2ac91f6079a897..bf82de45bf98e8605a1fdb69803f75f4
float f2 = f1 / 25.0F; float f2 = f1 / 25.0F;
ItemStack weaponItem = damageSource.getWeaponItem(); ItemStack weaponItem = damageSource.getWeaponItem();
float f3; float f3;
@@ -30,7 +30,7 @@ public class CombatRules { @@ -30,7 +_,7 @@
} }
public static float getDamageAfterMagicAbsorb(float damage, float enchantModifiers) { public static float getDamageAfterMagicAbsorb(float damage, float enchantModifiers) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/CombatTracker.java b/net/minecraft/world/damagesource/CombatTracker.java
index 4cec197634fac341cca1ed108f1ecb0561f72461..aa6213ca382e4901363317df1e30332c5166f271 100644
--- a/net/minecraft/world/damagesource/CombatTracker.java --- a/net/minecraft/world/damagesource/CombatTracker.java
+++ b/net/minecraft/world/damagesource/CombatTracker.java +++ b/net/minecraft/world/damagesource/CombatTracker.java
@@ -64,7 +64,7 @@ public class CombatTracker { @@ -64,7 +_,7 @@
private Component getMessageForAssistedFall(Entity entity, Component entityDisplayName, String hasWeaponTranslationKey, String noWeaponTranslationKey) { private Component getMessageForAssistedFall(Entity entity, Component entityDisplayName, String hasWeaponTranslationKey, String noWeaponTranslationKey) {
ItemStack itemStack = entity instanceof LivingEntity livingEntity ? livingEntity.getMainHandItem() : ItemStack.EMPTY; ItemStack itemStack = entity instanceof LivingEntity livingEntity ? livingEntity.getMainHandItem() : ItemStack.EMPTY;
@@ -17,7 +9,7 @@ index 4cec197634fac341cca1ed108f1ecb0561f72461..aa6213ca382e4901363317df1e30332c
? Component.translatable(hasWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName, itemStack.getDisplayName()) ? Component.translatable(hasWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName, itemStack.getDisplayName())
: Component.translatable(noWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName); : Component.translatable(noWeaponTranslationKey, this.mob.getDisplayName(), entityDisplayName);
} }
@@ -108,6 +108,15 @@ public class CombatTracker { @@ -108,6 +_,15 @@
Component component = ComponentUtils.wrapInSquareBrackets(Component.translatable(string + ".link")).withStyle(INTENTIONAL_GAME_DESIGN_STYLE); Component component = ComponentUtils.wrapInSquareBrackets(Component.translatable(string + ".link")).withStyle(INTENTIONAL_GAME_DESIGN_STYLE);
return Component.translatable(string + ".message", this.mob.getDisplayName(), component); return Component.translatable(string + ".message", this.mob.getDisplayName(), component);
} else { } else {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/DamageSource.java b/net/minecraft/world/damagesource/DamageSource.java
index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16953e8094 100644
--- a/net/minecraft/world/damagesource/DamageSource.java --- a/net/minecraft/world/damagesource/DamageSource.java
+++ b/net/minecraft/world/damagesource/DamageSource.java +++ b/net/minecraft/world/damagesource/DamageSource.java
@@ -30,6 +30,8 @@ public class DamageSource { @@ -30,6 +_,8 @@
@Nullable @Nullable
private org.bukkit.block.BlockState fromBlockSnapshot; // Captured block snapshot when the eventBlockDamager is not relevant (e.g. for bad respawn point explosions the block is already removed) private org.bukkit.block.BlockState fromBlockSnapshot; // Captured block snapshot when the eventBlockDamager is not relevant (e.g. for bad respawn point explosions the block is already removed)
private boolean critical; // Supports arrows and sweeping damage private boolean critical; // Supports arrows and sweeping damage
@@ -17,7 +9,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
public DamageSource knownCause(final org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) { public DamageSource knownCause(final org.bukkit.event.entity.EntityDamageEvent.DamageCause cause) {
final DamageSource damageSource = this.copy(); final DamageSource damageSource = this.copy();
@@ -42,6 +44,30 @@ public class DamageSource { @@ -42,6 +_,30 @@
return this.knownCause; return this.knownCause;
} }
@@ -48,7 +40,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
@Nullable @Nullable
public Entity eventEntityDamager() { public Entity eventEntityDamager() {
return this.eventEntityDamager; return this.eventEntityDamager;
@@ -103,6 +129,8 @@ public class DamageSource { @@ -103,6 +_,8 @@
damageSource.eventBlockDamager = this.eventBlockDamager; damageSource.eventBlockDamager = this.eventBlockDamager;
damageSource.fromBlockSnapshot = this.fromBlockSnapshot; damageSource.fromBlockSnapshot = this.fromBlockSnapshot;
damageSource.critical = this.critical; damageSource.critical = this.critical;
@@ -57,7 +49,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
return damageSource; return damageSource;
} }
// CraftBukkit end // CraftBukkit end
@@ -169,12 +197,21 @@ public class DamageSource { @@ -169,11 +_,20 @@
} else { } else {
Component component = this.causingEntity == null ? this.directEntity.getDisplayName() : this.causingEntity.getDisplayName(); Component component = this.causingEntity == null ? this.directEntity.getDisplayName() : this.causingEntity.getDisplayName();
ItemStack itemStack = this.causingEntity instanceof LivingEntity livingEntity1 ? livingEntity1.getMainHandItem() : ItemStack.EMPTY; ItemStack itemStack = this.causingEntity instanceof LivingEntity livingEntity1 ? livingEntity1.getMainHandItem() : ItemStack.EMPTY;
@@ -67,7 +59,7 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
: Component.translatable(string, livingEntity.getDisplayName(), component); : Component.translatable(string, livingEntity.getDisplayName(), component);
} }
} }
+
+ // Purpur start - Component related conveniences + // Purpur start - Component related conveniences
+ public Component getLocalizedDeathMessage(String str, LivingEntity entity) { + public Component getLocalizedDeathMessage(String str, LivingEntity entity) {
+ net.kyori.adventure.text.Component name = io.papermc.paper.adventure.PaperAdventure.asAdventure(entity.getDisplayName()); + net.kyori.adventure.text.Component name = io.papermc.paper.adventure.PaperAdventure.asAdventure(entity.getDisplayName());
@@ -76,7 +68,6 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..5fa92eef9c6b88cf96d3fe427e4d4f16
+ return io.papermc.paper.adventure.PaperAdventure.asVanilla(component); + return io.papermc.paper.adventure.PaperAdventure.asVanilla(component);
+ } + }
+ // Purpur end - Component related conveniences + // Purpur end - Component related conveniences
+
public String getMsgId() { public String getMsgId() {
return this.type().msgId(); return this.type().msgId();
}

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/damagesource/DamageSources.java b/net/minecraft/world/damagesource/DamageSources.java
index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a7d4e5ebb 100644
--- a/net/minecraft/world/damagesource/DamageSources.java --- a/net/minecraft/world/damagesource/DamageSources.java
+++ b/net/minecraft/world/damagesource/DamageSources.java +++ b/net/minecraft/world/damagesource/DamageSources.java
@@ -42,6 +42,8 @@ public class DamageSources { @@ -42,6 +_,8 @@
private final DamageSource stalagmite; private final DamageSource stalagmite;
private final DamageSource outsideBorder; private final DamageSource outsideBorder;
private final DamageSource genericKill; private final DamageSource genericKill;
@@ -17,7 +9,7 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a
public DamageSources(RegistryAccess registry) { public DamageSources(RegistryAccess registry) {
this.damageTypes = registry.lookupOrThrow(Registries.DAMAGE_TYPE); this.damageTypes = registry.lookupOrThrow(Registries.DAMAGE_TYPE);
@@ -70,6 +72,8 @@ public class DamageSources { @@ -70,6 +_,8 @@
this.stalagmite = this.source(DamageTypes.STALAGMITE); this.stalagmite = this.source(DamageTypes.STALAGMITE);
this.outsideBorder = this.source(DamageTypes.OUTSIDE_BORDER); this.outsideBorder = this.source(DamageTypes.OUTSIDE_BORDER);
this.genericKill = this.source(DamageTypes.GENERIC_KILL); this.genericKill = this.source(DamageTypes.GENERIC_KILL);
@@ -26,10 +18,11 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a
} }
private DamageSource source(ResourceKey<DamageType> damageTypeKey) { private DamageSource source(ResourceKey<DamageType> damageTypeKey) {
@@ -84,6 +88,18 @@ public class DamageSources { @@ -83,6 +_,18 @@
private DamageSource source(ResourceKey<DamageType> damageTypeKey, @Nullable Entity causingEntity, @Nullable Entity directEntity) {
return new DamageSource(this.damageTypes.getOrThrow(damageTypeKey), causingEntity, directEntity); return new DamageSource(this.damageTypes.getOrThrow(damageTypeKey), causingEntity, directEntity);
} }
+
+ // Purpur start - Dont run with scissor + // Purpur start - Dont run with scissor
+ public DamageSource scissors() { + public DamageSource scissors() {
+ return this.scissors; + return this.scissors;
@@ -41,7 +34,6 @@ index cc206ecff2d95f0398ca424c178a336ad80cc396..7afad362801082e5f2e3aceda864ad2a
+ return this.stonecutter; + return this.stonecutter;
+ } + }
+ // Purpur end - Stonecutter damage + // Purpur end - Stonecutter damage
+
public DamageSource inFire() { public DamageSource inFire() {
return this.inFire; return this.inFire;
}

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/HungerMobEffect.java b/net/minecraft/world/effect/HungerMobEffect.java
index 0890694ae96b6cd60079c34066e7a6e288f038e8..6c0e6bd2a171edc57dec71af178764454de73313 100644
--- a/net/minecraft/world/effect/HungerMobEffect.java --- a/net/minecraft/world/effect/HungerMobEffect.java
+++ b/net/minecraft/world/effect/HungerMobEffect.java +++ b/net/minecraft/world/effect/HungerMobEffect.java
@@ -12,7 +12,7 @@ class HungerMobEffect extends MobEffect { @@ -12,7 +_,7 @@
@Override @Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {
if (entity instanceof Player player) { if (entity instanceof Player player) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/PoisonMobEffect.java b/net/minecraft/world/effect/PoisonMobEffect.java
index 75327fd96858fd508ea63a6983e5cbc655a8800f..73cfc61ac3f8e33e6b9f4fd08a292266c0adb535 100644
--- a/net/minecraft/world/effect/PoisonMobEffect.java --- a/net/minecraft/world/effect/PoisonMobEffect.java
+++ b/net/minecraft/world/effect/PoisonMobEffect.java +++ b/net/minecraft/world/effect/PoisonMobEffect.java
@@ -12,8 +12,8 @@ public class PoisonMobEffect extends MobEffect { @@ -12,8 +_,8 @@
@Override @Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/RegenerationMobEffect.java b/net/minecraft/world/effect/RegenerationMobEffect.java
index 76cffa4d4d18d6c04749d941dbdf5eb60aed4095..81481267a1577721dcc405f39a4c350bd59ac9a2 100644
--- a/net/minecraft/world/effect/RegenerationMobEffect.java --- a/net/minecraft/world/effect/RegenerationMobEffect.java
+++ b/net/minecraft/world/effect/RegenerationMobEffect.java +++ b/net/minecraft/world/effect/RegenerationMobEffect.java
@@ -11,7 +11,7 @@ class RegenerationMobEffect extends MobEffect { @@ -11,7 +_,7 @@
@Override @Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {
if (entity.getHealth() < entity.getMaxHealth()) { if (entity.getHealth() < entity.getMaxHealth()) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/SaturationMobEffect.java b/net/minecraft/world/effect/SaturationMobEffect.java
index c192165910f6b139df6f604d0bce989061efa9cb..622c23f4570d07de8bee9623bf900aabb3331ded 100644
--- a/net/minecraft/world/effect/SaturationMobEffect.java --- a/net/minecraft/world/effect/SaturationMobEffect.java
+++ b/net/minecraft/world/effect/SaturationMobEffect.java +++ b/net/minecraft/world/effect/SaturationMobEffect.java
@@ -16,7 +16,8 @@ class SaturationMobEffect extends InstantenousMobEffect { @@ -16,7 +_,8 @@
int oldFoodLevel = player.getFoodData().foodLevel; int oldFoodLevel = player.getFoodData().foodLevel;
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, amplifier + 1 + oldFoodLevel); org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, amplifier + 1 + oldFoodLevel);
if (!event.isCancelled()) { if (!event.isCancelled()) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/effect/WitherMobEffect.java b/net/minecraft/world/effect/WitherMobEffect.java
index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188bebaca67b 100644
--- a/net/minecraft/world/effect/WitherMobEffect.java --- a/net/minecraft/world/effect/WitherMobEffect.java
+++ b/net/minecraft/world/effect/WitherMobEffect.java +++ b/net/minecraft/world/effect/WitherMobEffect.java
@@ -12,7 +12,7 @@ public class WitherMobEffect extends MobEffect { @@ -12,7 +_,7 @@
@Override @Override
public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) { public boolean applyEffectTick(ServerLevel level, LivingEntity entity, int amplifier) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java
index 15daba9062d54a5bdf335c3645a3227ccb5a8e06..1842cbe25cc0f9be937caf0a78e915bd3d6ea1e5 100644
--- a/net/minecraft/world/entity/EntitySelector.java --- a/net/minecraft/world/entity/EntitySelector.java
+++ b/net/minecraft/world/entity/EntitySelector.java +++ b/net/minecraft/world/entity/EntitySelector.java
@@ -28,6 +28,8 @@ public final class EntitySelector { @@ -28,6 +_,8 @@
return net.minecraft.util.Mth.clamp(serverPlayer.getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= playerInsomniaTicks; return net.minecraft.util.Mth.clamp(serverPlayer.getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= playerInsomniaTicks;
}; };
// Paper end - Ability to control player's insomnia and phantoms // Paper end - Ability to control player's insomnia and phantoms

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
index 96e1f8f40a0af4350155f192ac2126b523c9f0f5..9950fccc0a708e701b81fcabc9e8f370e6d3a19d 100644
--- a/net/minecraft/world/entity/EntityType.java --- a/net/minecraft/world/entity/EntityType.java
+++ b/net/minecraft/world/entity/EntityType.java +++ b/net/minecraft/world/entity/EntityType.java
@@ -1105,6 +1105,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @@ -1105,6 +_,16 @@
return register(vanillaEntityId(key), builder); return register(vanillaEntityId(key), builder);
} }
@@ -25,7 +17,7 @@ index 96e1f8f40a0af4350155f192ac2126b523c9f0f5..9950fccc0a708e701b81fcabc9e8f370
public static ResourceLocation getKey(EntityType<?> entityType) { public static ResourceLocation getKey(EntityType<?> entityType) {
return BuiltInRegistries.ENTITY_TYPE.getKey(entityType); return BuiltInRegistries.ENTITY_TYPE.getKey(entityType);
} }
@@ -1335,6 +1345,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @@ -1335,6 +_,16 @@
return this.category; return this.category;
} }
@@ -42,7 +34,7 @@ index 96e1f8f40a0af4350155f192ac2126b523c9f0f5..9950fccc0a708e701b81fcabc9e8f370
public String getDescriptionId() { public String getDescriptionId() {
return this.descriptionId; return this.descriptionId;
} }
@@ -1394,7 +1414,11 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @@ -1394,7 +_,11 @@
entity.load(input); entity.load(input);
}, },
// Paper end - Don't fire sync event during generation // Paper end - Don't fire sync event during generation

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java
index f8d94181e97630d9d551553e3a504d7e3ae36f96..66ae0b340c7e9ebccfeaee786577e27916ace38c 100644
--- a/net/minecraft/world/entity/ExperienceOrb.java --- a/net/minecraft/world/entity/ExperienceOrb.java
+++ b/net/minecraft/world/entity/ExperienceOrb.java +++ b/net/minecraft/world/entity/ExperienceOrb.java
@@ -358,7 +358,7 @@ public class ExperienceOrb extends Entity { @@ -358,7 +_,7 @@
public void playerTouch(Player entity) { public void playerTouch(Player entity) {
if (entity instanceof ServerPlayer serverPlayer) { if (entity instanceof ServerPlayer serverPlayer) {
if (entity.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(serverPlayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent if (entity.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(serverPlayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent
@@ -17,7 +9,7 @@ index f8d94181e97630d9d551553e3a504d7e3ae36f96..66ae0b340c7e9ebccfeaee786577e279
entity.take(this, 1); entity.take(this, 1);
int i = this.repairPlayerItems(serverPlayer, this.getValue()); int i = this.repairPlayerItems(serverPlayer, this.getValue());
if (i > 0) { if (i > 0) {
@@ -374,7 +374,7 @@ public class ExperienceOrb extends Entity { @@ -374,7 +_,7 @@
} }
private int repairPlayerItems(ServerPlayer player, int value) { private int repairPlayerItems(ServerPlayer player, int value) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/GlowSquid.java b/net/minecraft/world/entity/GlowSquid.java
index aab9adb8313c4b18279c7fd7500ef04bda09c6c1..f0c452ddc4b299a930de261722cc41a89aa78eeb 100644
--- a/net/minecraft/world/entity/GlowSquid.java --- a/net/minecraft/world/entity/GlowSquid.java
+++ b/net/minecraft/world/entity/GlowSquid.java +++ b/net/minecraft/world/entity/GlowSquid.java
@@ -27,6 +27,13 @@ public class GlowSquid extends Squid { @@ -27,6 +_,13 @@
super(entityType, level); super(entityType, level);
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java
index a87accd5fe14102e7a2938f991a8ed0b9accd1bb..c7515f7f24e39d6931dcf18574cb47d754983903 100644
--- a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java --- a/net/minecraft/world/entity/ai/attributes/RangedAttribute.java
+++ b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java +++ b/net/minecraft/world/entity/ai/attributes/RangedAttribute.java
@@ -29,6 +29,7 @@ public class RangedAttribute extends Attribute { @@ -29,6 +_,7 @@
@Override @Override
public double sanitizeValue(double value) { public double sanitizeValue(double value) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
index 57befff1f0675e889304a6258258384d8de02c87..b0ca555cc3b565a8be8d01fe10b139ed27a2a2c3 100644
--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java --- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
+++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
@@ -86,7 +86,7 @@ public class AcquirePoi { @@ -86,7 +_,7 @@
}; };
// Paper start - optimise POI access // Paper start - optimise POI access
final java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>(); final java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>();

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6cb454c780 100644
--- a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java --- a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
+++ b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java +++ b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
@@ -55,7 +55,7 @@ public class InteractWithDoor { @@ -55,7 +_,7 @@
Node nextNode = path.getNextNode(); Node nextNode = path.getNextNode();
BlockPos blockPos = previousNode.asBlockPos(); BlockPos blockPos = previousNode.asBlockPos();
BlockState blockState = level.getBlockState(blockPos); BlockState blockState = level.getBlockState(blockPos);
@@ -17,7 +9,7 @@ index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6c
DoorBlock doorBlock = (DoorBlock)blockState.getBlock(); DoorBlock doorBlock = (DoorBlock)blockState.getBlock();
if (!doorBlock.isOpen(blockState)) { if (!doorBlock.isOpen(blockState)) {
// CraftBukkit start - entities opening doors // CraftBukkit start - entities opening doors
@@ -72,7 +72,7 @@ public class InteractWithDoor { @@ -72,7 +_,7 @@
BlockPos blockPos1 = nextNode.asBlockPos(); BlockPos blockPos1 = nextNode.asBlockPos();
BlockState blockState1 = level.getBlockState(blockPos1); BlockState blockState1 = level.getBlockState(blockPos1);
@@ -26,7 +18,7 @@ index 296ecffbbce931b42c67ea523373a61cea23acf4..b2eec24be3635f2c19da9b147211fe6c
DoorBlock doorBlock1 = (DoorBlock)blockState1.getBlock(); DoorBlock doorBlock1 = (DoorBlock)blockState1.getBlock();
if (!doorBlock1.isOpen(blockState1)) { if (!doorBlock1.isOpen(blockState1)) {
// CraftBukkit start - entities opening doors // CraftBukkit start - entities opening doors
@@ -118,7 +118,7 @@ public class InteractWithDoor { @@ -118,7 +_,7 @@
iterator.remove(); iterator.remove();
} else { } else {
BlockState blockState = level.getBlockState(blockPos); BlockState blockState = level.getBlockState(blockPos);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java b/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java
index 400e6d49144b3e5803901938dcd2ac4e52e9c131..45c45afeffcfba3558bdf46cbe39ff60004ffc01 100644
--- a/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java --- a/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java
+++ b/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java +++ b/net/minecraft/world/entity/ai/behavior/ShowTradesToPlayer.java
@@ -46,6 +46,7 @@ public class ShowTradesToPlayer extends Behavior<Villager> { @@ -46,6 +_,7 @@
@Override @Override
public boolean canStillUse(ServerLevel level, Villager entity, long gameTime) { public boolean canStillUse(ServerLevel level, Villager entity, long gameTime) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java b/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java
index 6eaf0bd944349cd0c6084462ac385fa2caafe933..be59d0c27a83b329ec3f97c029cfb9c114e22472 100644
--- a/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java --- a/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java
+++ b/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java +++ b/net/minecraft/world/entity/ai/goal/LlamaFollowCaravanGoal.java
@@ -22,6 +22,7 @@ public class LlamaFollowCaravanGoal extends Goal { @@ -22,6 +_,7 @@
@Override @Override
public boolean canUse() { public boolean canUse() {
@@ -16,7 +8,7 @@ index 6eaf0bd944349cd0c6084462ac385fa2caafe933..be59d0c27a83b329ec3f97c029cfb9c1
if (!this.llama.isLeashed() && !this.llama.inCaravan()) { if (!this.llama.isLeashed() && !this.llama.inCaravan()) {
List<Entity> entities = this.llama.level().getEntities(this.llama, this.llama.getBoundingBox().inflate(9.0, 4.0, 9.0), entity1 -> { List<Entity> entities = this.llama.level().getEntities(this.llama, this.llama.getBoundingBox().inflate(9.0, 4.0, 9.0), entity1 -> {
EntityType<?> type = entity1.getType(); EntityType<?> type = entity1.getType();
@@ -71,6 +72,7 @@ public class LlamaFollowCaravanGoal extends Goal { @@ -71,6 +_,7 @@
@Override @Override
public boolean canContinueToUse() { public boolean canContinueToUse() {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
index 722f378bb3726200b6fe88948bf1e1d3514a7b5c..e337e22c2cf82b0c1cab3fe0a9ff894c0c718716 100644
--- a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java --- a/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
+++ b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java +++ b/net/minecraft/world/entity/ai/goal/RangedBowAttackGoal.java
@@ -116,9 +116,9 @@ public class RangedBowAttackGoal<T extends Monster & RangedAttackMob> extends Go @@ -116,9 +_,9 @@
} }
this.mob.lookAt(target, 30.0F, 30.0F); this.mob.lookAt(target, 30.0F, 30.0F);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
index 878d7813b3f2f52bef336c6d855d738bc2f83491..d0f94f065d2ecf6ca6b47ac49422ffa656a18f55 100644
--- a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java --- a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
+++ b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java +++ b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
@@ -58,7 +58,7 @@ public class RunAroundLikeCrazyGoal extends Goal { @@ -58,7 +_,7 @@
if (firstPassenger instanceof Player player) { if (firstPassenger instanceof Player player) {
int temper = this.horse.getTemper(); int temper = this.horse.getTemper();
int maxTemper = this.horse.getMaxTemper(); int maxTemper = this.horse.getMaxTemper();

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/goal/SwellGoal.java b/net/minecraft/world/entity/ai/goal/SwellGoal.java
index 243a552f6f0c8c2bd25c0209c95e3bca08734711..38fd0196a0f5a90e39fa4eb8592f89bf6b88ccf5 100644
--- a/net/minecraft/world/entity/ai/goal/SwellGoal.java --- a/net/minecraft/world/entity/ai/goal/SwellGoal.java
+++ b/net/minecraft/world/entity/ai/goal/SwellGoal.java +++ b/net/minecraft/world/entity/ai/goal/SwellGoal.java
@@ -55,6 +55,14 @@ public class SwellGoal extends Goal { @@ -55,6 +_,14 @@
this.creeper.setSwellDir(-1); this.creeper.setSwellDir(-1);
} else { } else {
this.creeper.setSwellDir(1); this.creeper.setSwellDir(1);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
index 066faa704338c573472381e1ebd063e0d52aaaa4..1f96fd5085bacb4c584576c7cb9f51e7898e9b03 100644
--- a/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java --- a/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
+++ b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java +++ b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
@@ -56,7 +56,7 @@ public class NearestBedSensor extends Sensor<Mob> { @@ -56,7 +_,7 @@
// Paper start - optimise POI access // Paper start - optimise POI access
java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>(); java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>();
// don't ask me why it's unbounded. ask mojang. // don't ask me why it's unbounded. ask mojang.

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
index 2f8920d8ee765d057a22d76f24f7d7dc1b0b17ca..6f0fcaeaba2fec2ad944d63550f0c3e29bd9133c 100644
--- a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java --- a/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
+++ b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java +++ b/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
@@ -64,6 +64,10 @@ public class TargetingConditions { @@ -64,6 +_,10 @@
return false; return false;
} else if (this.selector != null && !this.selector.test(target, level)) { } else if (this.selector != null && !this.selector.test(target, level)) {
return false; return false;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java
index 912b099a51269f92f250c7d6094ad41817749f93..c1c9d056f5c78d26c777728c09b2481f9ccd1c3b 100644
--- a/net/minecraft/world/entity/ambient/Bat.java --- a/net/minecraft/world/entity/ambient/Bat.java
+++ b/net/minecraft/world/entity/ambient/Bat.java +++ b/net/minecraft/world/entity/ambient/Bat.java
@@ -233,7 +233,7 @@ public class Bat extends AmbientCreature { @@ -233,7 +_,7 @@
} else { } else {
int maxLocalRawBrightness = level.getMaxLocalRawBrightness(pos); int maxLocalRawBrightness = level.getMaxLocalRawBrightness(pos);
int i = 4; int i = 4;
@@ -17,7 +9,7 @@ index 912b099a51269f92f250c7d6094ad41817749f93..c1c9d056f5c78d26c777728c09b2481f
i = 7; i = 7;
} else if (randomSource.nextBoolean()) { } else if (randomSource.nextBoolean()) {
return false; return false;
@@ -245,6 +245,11 @@ public class Bat extends AmbientCreature { @@ -245,6 +_,11 @@
} }
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/AbstractCow.java b/net/minecraft/world/entity/animal/AbstractCow.java
index dd8ea03ba823996a5c97562e357650ab34d0e32e..4e81bc7215c845b316bcd46ce29f49af7f986088 100644
--- a/net/minecraft/world/entity/animal/AbstractCow.java --- a/net/minecraft/world/entity/animal/AbstractCow.java
+++ b/net/minecraft/world/entity/animal/AbstractCow.java +++ b/net/minecraft/world/entity/animal/AbstractCow.java
@@ -39,7 +39,7 @@ public abstract class AbstractCow extends Animal { @@ -39,7 +_,7 @@
this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(1, new PanicGoal(this, 2.0)); this.goalSelector.addGoal(1, new PanicGoal(this, 2.0));
this.goalSelector.addGoal(2, new BreedGoal(this, 1.0)); this.goalSelector.addGoal(2, new BreedGoal(this, 1.0));
@@ -17,7 +9,7 @@ index dd8ea03ba823996a5c97562e357650ab34d0e32e..4e81bc7215c845b316bcd46ce29f49af
this.goalSelector.addGoal(4, new FollowParentGoal(this, 1.25)); this.goalSelector.addGoal(4, new FollowParentGoal(this, 1.25));
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 1.0)); this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 1.0));
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F));
@@ -95,6 +95,10 @@ public abstract class AbstractCow extends Animal { @@ -95,6 +_,10 @@
ItemStack itemStack = ItemUtils.createFilledResult(itemInHand, player, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit ItemStack itemStack = ItemUtils.createFilledResult(itemInHand, player, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
player.setItemInHand(hand, itemStack); player.setItemInHand(hand, itemStack);
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
@@ -28,7 +20,7 @@ index dd8ea03ba823996a5c97562e357650ab34d0e32e..4e81bc7215c845b316bcd46ce29f49af
} else { } else {
return super.mobInteract(player, hand); return super.mobInteract(player, hand);
} }
@@ -104,4 +108,67 @@ public abstract class AbstractCow extends Animal { @@ -104,4 +_,67 @@
public EntityDimensions getDefaultDimensions(Pose pose) { public EntityDimensions getDefaultDimensions(Pose pose) {
return this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose); return this.isBaby() ? BABY_DIMENSIONS : super.getDefaultDimensions(pose);
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java
index cdf44c2586db396f1afdcbae4174b8b4fb00f48e..235f6514328338d28c2bf967bcd06f1413f12c65 100644
--- a/net/minecraft/world/entity/animal/Animal.java --- a/net/minecraft/world/entity/animal/Animal.java
+++ b/net/minecraft/world/entity/animal/Animal.java +++ b/net/minecraft/world/entity/animal/Animal.java
@@ -143,7 +143,7 @@ public abstract class Animal extends AgeableMob { @@ -143,7 +_,7 @@
ItemStack itemInHand = player.getItemInHand(hand); ItemStack itemInHand = player.getItemInHand(hand);
if (this.isFood(itemInHand)) { if (this.isFood(itemInHand)) {
int age = this.getAge(); int age = this.getAge();
@@ -17,7 +9,7 @@ index cdf44c2586db396f1afdcbae4174b8b4fb00f48e..235f6514328338d28c2bf967bcd06f14
final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying
this.usePlayerItem(player, hand, itemInHand); this.usePlayerItem(player, hand, itemInHand);
this.setInLove(serverPlayer, breedCopy); // Paper - Fix EntityBreedEvent copying this.setInLove(serverPlayer, breedCopy); // Paper - Fix EntityBreedEvent copying
@@ -235,10 +235,20 @@ public abstract class Animal extends AgeableMob { @@ -235,10 +_,20 @@
public void spawnChildFromBreeding(ServerLevel level, Animal mate) { public void spawnChildFromBreeding(ServerLevel level, Animal mate) {
AgeableMob breedOffspring = this.getBreedOffspring(level, mate); AgeableMob breedOffspring = this.getBreedOffspring(level, mate);
if (breedOffspring != null) { if (breedOffspring != null) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java
index 7d20de1741e5e9219dea84fe5692f31c05fa82a2..5b9d8c85f91396287b0deb4deac30e2c136cc461 100644
--- a/net/minecraft/world/entity/animal/Cat.java --- a/net/minecraft/world/entity/animal/Cat.java
+++ b/net/minecraft/world/entity/animal/Cat.java +++ b/net/minecraft/world/entity/animal/Cat.java
@@ -354,6 +354,14 @@ public class Cat extends TamableAnimal { @@ -354,6 +_,14 @@
return this.isTame() && otherAnimal instanceof Cat cat && cat.isTame() && super.canMate(otherAnimal); return this.isTame() && otherAnimal instanceof Cat cat && cat.isTame() && super.canMate(otherAnimal);
} }
@@ -23,7 +15,7 @@ index 7d20de1741e5e9219dea84fe5692f31c05fa82a2..5b9d8c85f91396287b0deb4deac30e2c
@Nullable @Nullable
@Override @Override
public SpawnGroupData finalizeSpawn( public SpawnGroupData finalizeSpawn(
@@ -452,7 +460,7 @@ public class Cat extends TamableAnimal { @@ -452,7 +_,7 @@
} }
private void tryToTame(Player player) { private void tryToTame(Player player) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java
index 4bb273b11dbfbc6557c6771f79aa63f5f69d03cf..f4a6f17bb158146e7287ab46930cd57c0ffb9454 100644
--- a/net/minecraft/world/entity/animal/Dolphin.java --- a/net/minecraft/world/entity/animal/Dolphin.java
+++ b/net/minecraft/world/entity/animal/Dolphin.java +++ b/net/minecraft/world/entity/animal/Dolphin.java
@@ -74,6 +74,7 @@ public class Dolphin extends AgeableWaterCreature { @@ -74,6 +_,7 @@
private static final boolean DEFAULT_GOT_FISH = false; private static final boolean DEFAULT_GOT_FISH = false;
@Nullable @Nullable
public BlockPos treasurePos; public BlockPos treasurePos;
@@ -16,7 +8,7 @@ index 4bb273b11dbfbc6557c6771f79aa63f5f69d03cf..f4a6f17bb158146e7287ab46930cd57c
public Dolphin(EntityType<? extends Dolphin> entityType, Level level) { public Dolphin(EntityType<? extends Dolphin> entityType, Level level) {
super(entityType, level); super(entityType, level);
@@ -90,6 +91,7 @@ public class Dolphin extends AgeableWaterCreature { @@ -90,6 +_,7 @@
this.setAirSupply(this.getMaxAirSupply()); this.setAirSupply(this.getMaxAirSupply());
this.setXRot(0.0F); this.setXRot(0.0F);
SpawnGroupData spawnGroupData1 = Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F)); SpawnGroupData spawnGroupData1 = Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F));
@@ -24,7 +16,7 @@ index 4bb273b11dbfbc6557c6771f79aa63f5f69d03cf..f4a6f17bb158146e7287ab46930cd57c
return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData1); return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData1);
} }
@@ -156,17 +158,19 @@ public class Dolphin extends AgeableWaterCreature { @@ -156,17 +_,19 @@
protected void registerGoals() { protected void registerGoals() {
this.goalSelector.addGoal(0, new BreathAirGoal(this)); this.goalSelector.addGoal(0, new BreathAirGoal(this));
this.goalSelector.addGoal(0, new TryFindWaterGoal(this)); this.goalSelector.addGoal(0, new TryFindWaterGoal(this));
@@ -45,7 +37,7 @@ index 4bb273b11dbfbc6557c6771f79aa63f5f69d03cf..f4a6f17bb158146e7287ab46930cd57c
} }
public static AttributeSupplier.Builder createAttributes() { public static AttributeSupplier.Builder createAttributes() {
@@ -399,6 +403,7 @@ public class Dolphin extends AgeableWaterCreature { @@ -399,6 +_,7 @@
@Override @Override
public boolean canUse() { public boolean canUse() {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java
index 517c546cfc8eca2191df57289e6a22ac64fc867c..354c7a41407fc6518965d09bfe3089676b6da794 100644
--- a/net/minecraft/world/entity/animal/Fox.java --- a/net/minecraft/world/entity/animal/Fox.java
+++ b/net/minecraft/world/entity/animal/Fox.java +++ b/net/minecraft/world/entity/animal/Fox.java
@@ -346,6 +346,11 @@ public class Fox extends Animal { @@ -346,6 +_,11 @@
} }
private void setTargetGoals() { private void setTargetGoals() {
@@ -20,7 +12,7 @@ index 517c546cfc8eca2191df57289e6a22ac64fc867c..354c7a41407fc6518965d09bfe308967
if (this.getVariant() == Fox.Variant.RED) { if (this.getVariant() == Fox.Variant.RED) {
this.targetSelector.addGoal(4, this.landTargetGoal); this.targetSelector.addGoal(4, this.landTargetGoal);
this.targetSelector.addGoal(4, this.turtleEggTargetGoal); this.targetSelector.addGoal(4, this.turtleEggTargetGoal);
@@ -373,6 +378,7 @@ public class Fox extends Animal { @@ -373,6 +_,7 @@
public void setVariant(Fox.Variant variant) { public void setVariant(Fox.Variant variant) {
this.entityData.set(DATA_TYPE_ID, variant.getId()); this.entityData.set(DATA_TYPE_ID, variant.getId());
@@ -28,10 +20,11 @@ index 517c546cfc8eca2191df57289e6a22ac64fc867c..354c7a41407fc6518965d09bfe308967
} }
@Nullable @Nullable
@@ -703,6 +709,29 @@ public class Fox extends Animal { @@ -702,6 +_,29 @@
return slot == EquipmentSlot.MAINHAND;
} }
// Paper end // Paper end
+
+ // Purpur start - Tulips change fox type + // Purpur start - Tulips change fox type
+ @Override + @Override
+ public net.minecraft.world.InteractionResult mobInteract(Player player, net.minecraft.world.InteractionHand hand) { + public net.minecraft.world.InteractionResult mobInteract(Player player, net.minecraft.world.InteractionHand hand) {
@@ -54,7 +47,6 @@ index 517c546cfc8eca2191df57289e6a22ac64fc867c..354c7a41407fc6518965d09bfe308967
+ return super.mobInteract(player, hand); + return super.mobInteract(player, hand);
+ } + }
+ // Purpur end - Tulips change fox type + // Purpur end - Tulips change fox type
+
@Override @Override
// Paper start - Cancellable death event // Paper start - Cancellable death event
protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(ServerLevel level, DamageSource damageSource) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java
index db309a1261778cc65da9b4bf5a962a372b83bba6..25e0438e1a98dc5f6aaabba8af2295cec871d6f1 100644
--- a/net/minecraft/world/entity/animal/IronGolem.java --- a/net/minecraft/world/entity/animal/IronGolem.java
+++ b/net/minecraft/world/entity/animal/IronGolem.java +++ b/net/minecraft/world/entity/animal/IronGolem.java
@@ -58,13 +58,26 @@ public class IronGolem extends AbstractGolem implements NeutralMob { @@ -58,13 +_,26 @@
private int remainingPersistentAngerTime; private int remainingPersistentAngerTime;
@Nullable @Nullable
private UUID persistentAngerTarget; private UUID persistentAngerTarget;
@@ -35,7 +27,7 @@ index db309a1261778cc65da9b4bf5a962a372b83bba6..25e0438e1a98dc5f6aaabba8af2295ce
this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0, true));
this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9, 32.0F)); this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9, 32.0F));
this.goalSelector.addGoal(2, new MoveBackToVillageGoal(this, 0.6, false)); this.goalSelector.addGoal(2, new MoveBackToVillageGoal(this, 0.6, false));
@@ -142,6 +155,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { @@ -142,6 +_,7 @@
protected void addAdditionalSaveData(ValueOutput output) { protected void addAdditionalSaveData(ValueOutput output) {
super.addAdditionalSaveData(output); super.addAdditionalSaveData(output);
output.putBoolean("PlayerCreated", this.isPlayerCreated()); output.putBoolean("PlayerCreated", this.isPlayerCreated());
@@ -43,7 +35,7 @@ index db309a1261778cc65da9b4bf5a962a372b83bba6..25e0438e1a98dc5f6aaabba8af2295ce
this.addPersistentAngerSaveData(output); this.addPersistentAngerSaveData(output);
} }
@@ -149,6 +163,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { @@ -149,6 +_,7 @@
protected void readAdditionalSaveData(ValueInput input) { protected void readAdditionalSaveData(ValueInput input) {
super.readAdditionalSaveData(input); super.readAdditionalSaveData(input);
this.setPlayerCreated(input.getBooleanOr("PlayerCreated", false)); this.setPlayerCreated(input.getBooleanOr("PlayerCreated", false));
@@ -51,7 +43,7 @@ index db309a1261778cc65da9b4bf5a962a372b83bba6..25e0438e1a98dc5f6aaabba8af2295ce
this.readPersistentAngerSaveData(this.level(), input); this.readPersistentAngerSaveData(this.level(), input);
} }
@@ -268,6 +283,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { @@ -268,6 +_,7 @@
float f = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F; float f = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
this.playSound(SoundEvents.IRON_GOLEM_REPAIR, 1.0F, f); this.playSound(SoundEvents.IRON_GOLEM_REPAIR, 1.0F, f);
itemInHand.consume(1, player); itemInHand.consume(1, player);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java
index 1f82848c97c5b52d6c4225b07a895f00d20c7d6c..32f3d5f66fb61074a2f9db751c0b3e16af9cf3ce 100644
--- a/net/minecraft/world/entity/animal/MushroomCow.java --- a/net/minecraft/world/entity/animal/MushroomCow.java
+++ b/net/minecraft/world/entity/animal/MushroomCow.java +++ b/net/minecraft/world/entity/animal/MushroomCow.java
@@ -199,6 +199,13 @@ public class MushroomCow extends AbstractCow implements Shearable { @@ -199,6 +_,13 @@
level.playSound(null, this, SoundEvents.MOOSHROOM_SHEAR, soundSource, 1.0F, 1.0F); level.playSound(null, this, SoundEvents.MOOSHROOM_SHEAR, soundSource, 1.0F, 1.0F);
this.convertTo(EntityType.COW, ConversionParams.single(this, false, false), cow -> { this.convertTo(EntityType.COW, ConversionParams.single(this, false, false), cow -> {
level.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5), this.getZ(), 1, 0.0, 0.0, 0.0, 0.0); level.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5), this.getZ(), 1, 0.0, 0.0, 0.0, 0.0);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java
index e8b184f2e1a98e565a50ce6ae6cab248d5a6e89b..a304a09eb20b84033ea9b84cf577749fe842fc57 100644
--- a/net/minecraft/world/entity/animal/Ocelot.java --- a/net/minecraft/world/entity/animal/Ocelot.java
+++ b/net/minecraft/world/entity/animal/Ocelot.java +++ b/net/minecraft/world/entity/animal/Ocelot.java
@@ -234,7 +234,7 @@ public class Ocelot extends Animal { @@ -234,7 +_,7 @@
public boolean checkSpawnObstruction(LevelReader level) { public boolean checkSpawnObstruction(LevelReader level) {
if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) { if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) {
BlockPos blockPos = this.blockPosition(); BlockPos blockPos = this.blockPosition();

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Pig.java b/net/minecraft/world/entity/animal/Pig.java
index 155a51233895955d01c2ee73416e2daefc4dfd0f..858913db98c6f46867e5f5d3d1231e7f94b669ab 100644
--- a/net/minecraft/world/entity/animal/Pig.java --- a/net/minecraft/world/entity/animal/Pig.java
+++ b/net/minecraft/world/entity/animal/Pig.java +++ b/net/minecraft/world/entity/animal/Pig.java
@@ -142,6 +142,19 @@ public class Pig extends Animal implements ItemSteerable { @@ -142,6 +_,19 @@
@Override @Override
public InteractionResult mobInteract(Player player, InteractionHand hand) { public InteractionResult mobInteract(Player player, InteractionHand hand) {
boolean isFood = this.isFood(player.getItemInHand(hand)); boolean isFood = this.isFood(player.getItemInHand(hand));

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/PolarBear.java b/net/minecraft/world/entity/animal/PolarBear.java
index d727e8e93e466b9bb91cbb43b9c1bbbccc56d486..0cbe162c952fe3cba5c33284d766aea514d6a40b 100644
--- a/net/minecraft/world/entity/animal/PolarBear.java --- a/net/minecraft/world/entity/animal/PolarBear.java
+++ b/net/minecraft/world/entity/animal/PolarBear.java +++ b/net/minecraft/world/entity/animal/PolarBear.java
@@ -65,6 +65,29 @@ public class PolarBear extends Animal implements NeutralMob { @@ -65,6 +_,29 @@
super(entityType, level); super(entityType, level);
} }
@@ -38,7 +30,7 @@ index d727e8e93e466b9bb91cbb43b9c1bbbccc56d486..0cbe162c952fe3cba5c33284d766aea5
@Nullable @Nullable
@Override @Override
public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob otherParent) { public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob otherParent) {
@@ -73,7 +96,7 @@ public class PolarBear extends Animal implements NeutralMob { @@ -73,7 +_,7 @@
@Override @Override
public boolean isFood(ItemStack stack) { public boolean isFood(ItemStack stack) {
@@ -47,7 +39,7 @@ index d727e8e93e466b9bb91cbb43b9c1bbbccc56d486..0cbe162c952fe3cba5c33284d766aea5
} }
@Override @Override
@@ -82,6 +105,12 @@ public class PolarBear extends Animal implements NeutralMob { @@ -82,6 +_,12 @@
this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(1, new PolarBear.PolarBearMeleeAttackGoal()); this.goalSelector.addGoal(1, new PolarBear.PolarBearMeleeAttackGoal());
this.goalSelector.addGoal(1, new PanicGoal(this, 2.0, mob -> mob.isBaby() ? DamageTypeTags.PANIC_CAUSES : DamageTypeTags.PANIC_ENVIRONMENTAL_CAUSES)); this.goalSelector.addGoal(1, new PanicGoal(this, 2.0, mob -> mob.isBaby() ? DamageTypeTags.PANIC_CAUSES : DamageTypeTags.PANIC_ENVIRONMENTAL_CAUSES));

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java
index ac99590dad689f2cfffb9b9e2465f6a252d41e9c..880cb3bdbd389a798c202c4dd572bf2b74bc0847 100644
--- a/net/minecraft/world/entity/animal/Rabbit.java --- a/net/minecraft/world/entity/animal/Rabbit.java
+++ b/net/minecraft/world/entity/animal/Rabbit.java +++ b/net/minecraft/world/entity/animal/Rabbit.java
@@ -404,10 +404,23 @@ public class Rabbit extends Animal { @@ -404,10 +_,23 @@
} }
this.setVariant(randomRabbitVariant); this.setVariant(randomRabbitVariant);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java
index 1b3a020e35fb2f9a28be718415c51fde5b52d399..1a7c14f9307629386af0a62b3e19545728fa3a8d 100644
--- a/net/minecraft/world/entity/animal/SnowGolem.java --- a/net/minecraft/world/entity/animal/SnowGolem.java
+++ b/net/minecraft/world/entity/animal/SnowGolem.java +++ b/net/minecraft/world/entity/animal/SnowGolem.java
@@ -46,15 +46,27 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM @@ -46,15 +_,27 @@
private static final EntityDataAccessor<Byte> DATA_PUMPKIN_ID = SynchedEntityData.defineId(SnowGolem.class, EntityDataSerializers.BYTE); private static final EntityDataAccessor<Byte> DATA_PUMPKIN_ID = SynchedEntityData.defineId(SnowGolem.class, EntityDataSerializers.BYTE);
private static final byte PUMPKIN_FLAG = 16; private static final byte PUMPKIN_FLAG = 16;
private static final boolean DEFAULT_PUMPKIN = true; private static final boolean DEFAULT_PUMPKIN = true;
@@ -38,7 +30,7 @@ index 1b3a020e35fb2f9a28be718415c51fde5b52d399..1a7c14f9307629386af0a62b3e195457
this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 6.0F));
this.goalSelector.addGoal(4, new RandomLookAroundGoal(this)); this.goalSelector.addGoal(4, new RandomLookAroundGoal(this));
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (entity, level) -> entity instanceof Enemy)); this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (entity, level) -> entity instanceof Enemy));
@@ -74,12 +86,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM @@ -74,12 +_,14 @@
protected void addAdditionalSaveData(ValueOutput output) { protected void addAdditionalSaveData(ValueOutput output) {
super.addAdditionalSaveData(output); super.addAdditionalSaveData(output);
output.putBoolean("Pumpkin", this.hasPumpkin()); output.putBoolean("Pumpkin", this.hasPumpkin());
@@ -53,7 +45,7 @@ index 1b3a020e35fb2f9a28be718415c51fde5b52d399..1a7c14f9307629386af0a62b3e195457
} }
@Override @Override
@@ -153,6 +167,14 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM @@ -153,6 +_,14 @@
} }
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java
index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..2e51e64991d326fc055520b6fefc76e80f7c2d97 100644
--- a/net/minecraft/world/entity/animal/Squid.java --- a/net/minecraft/world/entity/animal/Squid.java
+++ b/net/minecraft/world/entity/animal/Squid.java +++ b/net/minecraft/world/entity/animal/Squid.java
@@ -46,10 +46,29 @@ public class Squid extends AgeableWaterCreature { @@ -46,10 +_,29 @@
public Squid(EntityType<? extends Squid> entityType, Level level) { public Squid(EntityType<? extends Squid> entityType, Level level) {
super(entityType, level); super(entityType, level);
@@ -39,7 +31,7 @@ index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..2e51e64991d326fc055520b6fefc76e8
@Override @Override
protected void registerGoals() { protected void registerGoals() {
this.goalSelector.addGoal(0, new Squid.SquidRandomMovementGoal(this)); this.goalSelector.addGoal(0, new Squid.SquidRandomMovementGoal(this));
@@ -127,6 +146,7 @@ public class Squid extends AgeableWaterCreature { @@ -127,6 +_,7 @@
} }
if (this.isInWater()) { if (this.isInWater()) {
@@ -47,7 +39,7 @@ index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..2e51e64991d326fc055520b6fefc76e8
if (this.tentacleMovement < (float) Math.PI) { if (this.tentacleMovement < (float) Math.PI) {
float f = this.tentacleMovement / (float) Math.PI; float f = this.tentacleMovement / (float) Math.PI;
this.tentacleAngle = Mth.sin(f * f * (float) Math.PI) * (float) Math.PI * 0.25F; this.tentacleAngle = Mth.sin(f * f * (float) Math.PI) * (float) Math.PI * 0.25F;
@@ -308,7 +328,7 @@ public class Squid extends AgeableWaterCreature { @@ -308,7 +_,7 @@
int noActionTime = this.squid.getNoActionTime(); int noActionTime = this.squid.getNoActionTime();
if (noActionTime > 100) { if (noActionTime > 100) {
this.squid.movementVector = Vec3.ZERO; this.squid.movementVector = Vec3.ZERO;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/WaterAnimal.java b/net/minecraft/world/entity/animal/WaterAnimal.java
index 2b5e091b6ebe17e30d8d0e73999e19eed49e9a9f..6ff9ca735eba1c3376f3bc4916d5ab76af782de1 100644
--- a/net/minecraft/world/entity/animal/WaterAnimal.java --- a/net/minecraft/world/entity/animal/WaterAnimal.java
+++ b/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/net/minecraft/world/entity/animal/WaterAnimal.java
@@ -76,8 +76,7 @@ public abstract class WaterAnimal extends PathfinderMob { @@ -76,8 +_,7 @@
seaLevel = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(seaLevel); seaLevel = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(seaLevel);
i = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(i); i = level.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(i);
// Paper end - Make water animal spawn height configurable // Paper end - Make water animal spawn height configurable

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java
index 75af1b92a0a60cffa3317d83bd599a3d4d26f93c..d5e5ea2a20739b81742b1a5323d19f2d01baec25 100644
--- a/net/minecraft/world/entity/animal/goat/Goat.java --- a/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java
@@ -396,6 +396,7 @@ public class Goat extends Animal { @@ -396,6 +_,7 @@
// Paper start - Goat ram API // Paper start - Goat ram API
public void ram(net.minecraft.world.entity.LivingEntity entity) { public void ram(net.minecraft.world.entity.LivingEntity entity) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/horse/Llama.java b/net/minecraft/world/entity/animal/horse/Llama.java
index 1e2b629641e5fa1040307461dbbf03ad2d75ba00..5e3382351b1b5728750534f64babc85c4da3ac54 100644
--- a/net/minecraft/world/entity/animal/horse/Llama.java --- a/net/minecraft/world/entity/animal/horse/Llama.java
+++ b/net/minecraft/world/entity/animal/horse/Llama.java +++ b/net/minecraft/world/entity/animal/horse/Llama.java
@@ -78,6 +78,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { @@ -78,6 +_,7 @@
private Llama caravanHead; private Llama caravanHead;
@Nullable @Nullable
public Llama caravanTail; // Paper public Llama caravanTail; // Paper
@@ -16,7 +8,7 @@ index 1e2b629641e5fa1040307461dbbf03ad2d75ba00..5e3382351b1b5728750534f64babc85c
public Llama(EntityType<? extends Llama> entityType, Level level) { public Llama(EntityType<? extends Llama> entityType, Level level) {
super(entityType, level); super(entityType, level);
@@ -112,6 +113,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { @@ -112,6 +_,7 @@
super.addAdditionalSaveData(output); super.addAdditionalSaveData(output);
output.store("Variant", Llama.Variant.LEGACY_CODEC, this.getVariant()); output.store("Variant", Llama.Variant.LEGACY_CODEC, this.getVariant());
output.putInt("Strength", this.getStrength()); output.putInt("Strength", this.getStrength());
@@ -24,7 +16,7 @@ index 1e2b629641e5fa1040307461dbbf03ad2d75ba00..5e3382351b1b5728750534f64babc85c
} }
@Override @Override
@@ -119,6 +121,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { @@ -119,6 +_,7 @@
this.setStrength(input.getIntOr("Strength", 0)); this.setStrength(input.getIntOr("Strength", 0));
super.readAdditionalSaveData(input); super.readAdditionalSaveData(input);
this.setVariant(input.read("Variant", Llama.Variant.LEGACY_CODEC).orElse(Llama.Variant.DEFAULT)); this.setVariant(input.read("Variant", Llama.Variant.LEGACY_CODEC).orElse(Llama.Variant.DEFAULT));
@@ -32,7 +24,7 @@ index 1e2b629641e5fa1040307461dbbf03ad2d75ba00..5e3382351b1b5728750534f64babc85c
} }
@Override @Override
@@ -400,6 +403,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { @@ -400,6 +_,7 @@
public void leaveCaravan() { public void leaveCaravan() {
if (this.caravanHead != null) { if (this.caravanHead != null) {
@@ -40,7 +32,7 @@ index 1e2b629641e5fa1040307461dbbf03ad2d75ba00..5e3382351b1b5728750534f64babc85c
this.caravanHead.caravanTail = null; this.caravanHead.caravanTail = null;
} }
@@ -407,6 +411,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { @@ -407,6 +_,7 @@
} }
public void joinCaravan(Llama caravanHead) { public void joinCaravan(Llama caravanHead) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java
index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fbe81c9bee 100644
--- a/net/minecraft/world/entity/animal/wolf/Wolf.java --- a/net/minecraft/world/entity/animal/wolf/Wolf.java
+++ b/net/minecraft/world/entity/animal/wolf/Wolf.java +++ b/net/minecraft/world/entity/animal/wolf/Wolf.java
@@ -99,6 +99,37 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -99,6 +_,37 @@
EntityType<?> type = entity.getType(); EntityType<?> type = entity.getType();
return type == EntityType.SHEEP || type == EntityType.RABBIT || type == EntityType.FOX; return type == EntityType.SHEEP || type == EntityType.RABBIT || type == EntityType.FOX;
}; };
@@ -46,7 +38,7 @@ index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fb
private static final float START_HEALTH = 8.0F; private static final float START_HEALTH = 8.0F;
private static final float TAME_HEALTH = 40.0F; private static final float TAME_HEALTH = 40.0F;
private static final float ARMOR_REPAIR_UNIT = 0.125F; private static final float ARMOR_REPAIR_UNIT = 0.125F;
@@ -121,12 +152,47 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -121,12 +_,47 @@
this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F); this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F);
} }
@@ -94,7 +86,7 @@ index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fb
this.goalSelector.addGoal(4, new LeapAtTargetGoal(this, 0.4F)); this.goalSelector.addGoal(4, new LeapAtTargetGoal(this, 0.4F));
this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0, true));
this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.0, 10.0F, 2.0F)); this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.0, 10.0F, 2.0F));
@@ -139,7 +205,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -139,7 +_,7 @@
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this)); this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
this.targetSelector.addGoal(3, new HurtByTargetGoal(this).setAlertOthers()); this.targetSelector.addGoal(3, new HurtByTargetGoal(this).setAlertOthers());
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt)); this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
@@ -103,7 +95,7 @@ index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fb
this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR)); this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR));
this.targetSelector.addGoal(7, new NearestAttackableTargetGoal<>(this, AbstractSkeleton.class, false)); this.targetSelector.addGoal(7, new NearestAttackableTargetGoal<>(this, AbstractSkeleton.class, false));
this.targetSelector.addGoal(8, new ResetUniversalAngerTargetGoal<>(this, true)); this.targetSelector.addGoal(8, new ResetUniversalAngerTargetGoal<>(this, true));
@@ -230,6 +296,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -230,6 +_,7 @@
protected void addAdditionalSaveData(ValueOutput output) { protected void addAdditionalSaveData(ValueOutput output) {
super.addAdditionalSaveData(output); super.addAdditionalSaveData(output);
output.store("CollarColor", DyeColor.LEGACY_ID_CODEC, this.getCollarColor()); output.store("CollarColor", DyeColor.LEGACY_ID_CODEC, this.getCollarColor());
@@ -111,7 +103,7 @@ index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fb
VariantUtils.writeVariant(output, this.getVariant()); VariantUtils.writeVariant(output, this.getVariant());
this.addPersistentAngerSaveData(output); this.addPersistentAngerSaveData(output);
this.getSoundVariant() this.getSoundVariant()
@@ -244,6 +311,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -244,6 +_,10 @@
super.readAdditionalSaveData(input); super.readAdditionalSaveData(input);
VariantUtils.readVariant(input, Registries.WOLF_VARIANT).ifPresent(this::setVariant); VariantUtils.readVariant(input, Registries.WOLF_VARIANT).ifPresent(this::setVariant);
this.setCollarColor(input.read("CollarColor", DyeColor.LEGACY_ID_CODEC).orElse(DEFAULT_COLLAR_COLOR)); this.setCollarColor(input.read("CollarColor", DyeColor.LEGACY_ID_CODEC).orElse(DEFAULT_COLLAR_COLOR));
@@ -122,7 +114,7 @@ index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fb
this.readPersistentAngerSaveData(this.level(), input); this.readPersistentAngerSaveData(this.level(), input);
input.read("sound_variant", ResourceKey.codec(Registries.WOLF_SOUND_VARIANT)) input.read("sound_variant", ResourceKey.codec(Registries.WOLF_SOUND_VARIANT))
.flatMap(resourceKey -> this.registryAccess().lookupOrThrow(Registries.WOLF_SOUND_VARIANT).get((ResourceKey<WolfSoundVariant>)resourceKey)) .flatMap(resourceKey -> this.registryAccess().lookupOrThrow(Registries.WOLF_SOUND_VARIANT).get((ResourceKey<WolfSoundVariant>)resourceKey))
@@ -268,6 +339,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -268,6 +_,10 @@
} }
this.setSoundVariant(WolfSoundVariants.pickRandomSoundVariant(this.registryAccess(), level.getRandom())); this.setSoundVariant(WolfSoundVariants.pickRandomSoundVariant(this.registryAccess(), level.getRandom()));
@@ -133,7 +125,7 @@ index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fb
return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData);
} }
@@ -318,6 +393,11 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -318,6 +_,11 @@
public void tick() { public void tick() {
super.tick(); super.tick();
if (this.isAlive()) { if (this.isAlive()) {
@@ -145,7 +137,7 @@ index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..6fc2d5d558832dd55479deb9ad5984fb
this.interestedAngleO = this.interestedAngle; this.interestedAngleO = this.interestedAngle;
if (this.isInterested()) { if (this.isInterested()) {
this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F; this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F;
@@ -519,13 +599,27 @@ public class Wolf extends TamableAnimal implements NeutralMob { @@ -519,13 +_,27 @@
itemInHand.consume(1, player); itemInHand.consume(1, player);
this.tryToTame(player); this.tryToTame(player);
return InteractionResult.SUCCESS_SERVER; return InteractionResult.SUCCESS_SERVER;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
index a0e0fad40838fa7d835f31e5ce4ae3ab40e0bfa4..5bff703ae4f95091620dec5347246d7c0cbe5d5e 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java --- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java +++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
@@ -39,6 +39,24 @@ public class EndCrystal extends Entity { @@ -39,6 +_,24 @@
this.setPos(x, y, z); this.setPos(x, y, z);
} }
@@ -33,7 +25,7 @@ index a0e0fad40838fa7d835f31e5ce4ae3ab40e0bfa4..5bff703ae4f95091620dec5347246d7c
@Override @Override
protected Entity.MovementEmission getMovementEmission() { protected Entity.MovementEmission getMovementEmission() {
return Entity.MovementEmission.NONE; return Entity.MovementEmission.NONE;
@@ -75,6 +93,8 @@ public class EndCrystal extends Entity { @@ -75,6 +_,8 @@
} }
} }
// Paper end - Fix invulnerable end crystals // Paper end - Fix invulnerable end crystals
@@ -42,7 +34,7 @@ index a0e0fad40838fa7d835f31e5ce4ae3ab40e0bfa4..5bff703ae4f95091620dec5347246d7c
} }
@Override @Override
@@ -115,15 +135,17 @@ public class EndCrystal extends Entity { @@ -115,15 +_,17 @@
} }
// CraftBukkit end // CraftBukkit end
if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) { if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 84d215a498d9bf6f1232bf4af5a4a98d3ba9b131..3389c79e18601d582f95fe3765c291d46706d015 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java --- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -961,6 +961,7 @@ public class EnderDragon extends Mob implements Enemy { @@ -961,6 +_,7 @@
@Override @Override
protected boolean canRide(Entity entity) { protected boolean canRide(Entity entity) {
@@ -16,7 +8,7 @@ index 84d215a498d9bf6f1232bf4af5a4a98d3ba9b131..3389c79e18601d582f95fe3765c291d4
return false; return false;
} }
@@ -996,7 +997,7 @@ public class EnderDragon extends Mob implements Enemy { @@ -996,7 +_,7 @@
boolean flag = level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT); boolean flag = level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT);
int i = 500; int i = 500;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 030721328b05526c3f56d9875859ee8860a1d36b..f8aeb8364723cf09bbe7f4fad00ddede784338b6 100644
--- a/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -79,6 +79,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { @@ -79,6 +_,7 @@
private static final TargetingConditions.Selector LIVING_ENTITY_SELECTOR = (entity, level) -> !entity.getType().is(EntityTypeTags.WITHER_FRIENDS) private static final TargetingConditions.Selector LIVING_ENTITY_SELECTOR = (entity, level) -> !entity.getType().is(EntityTypeTags.WITHER_FRIENDS)
&& entity.attackable(); && entity.attackable();
private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0).selector(LIVING_ENTITY_SELECTOR); private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0).selector(LIVING_ENTITY_SELECTOR);
@@ -16,7 +8,7 @@ index 030721328b05526c3f56d9875859ee8860a1d36b..f8aeb8364723cf09bbe7f4fad00ddede
public WitherBoss(EntityType<? extends WitherBoss> entityType, Level level) { public WitherBoss(EntityType<? extends WitherBoss> entityType, Level level) {
super(entityType, level); super(entityType, level);
@@ -87,6 +88,17 @@ public class WitherBoss extends Monster implements RangedAttackMob { @@ -87,6 +_,17 @@
this.xpReward = 50; this.xpReward = 50;
} }
@@ -34,7 +26,7 @@ index 030721328b05526c3f56d9875859ee8860a1d36b..f8aeb8364723cf09bbe7f4fad00ddede
@Override @Override
protected PathNavigation createNavigation(Level level) { protected PathNavigation createNavigation(Level level) {
FlyingPathNavigation flyingPathNavigation = new FlyingPathNavigation(this, level); FlyingPathNavigation flyingPathNavigation = new FlyingPathNavigation(this, level);
@@ -119,6 +131,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { @@ -119,6 +_,7 @@
protected void addAdditionalSaveData(ValueOutput output) { protected void addAdditionalSaveData(ValueOutput output) {
super.addAdditionalSaveData(output); super.addAdditionalSaveData(output);
output.putInt("Invul", this.getInvulnerableTicks()); output.putInt("Invul", this.getInvulnerableTicks());
@@ -42,7 +34,7 @@ index 030721328b05526c3f56d9875859ee8860a1d36b..f8aeb8364723cf09bbe7f4fad00ddede
} }
@Override @Override
@@ -128,6 +141,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { @@ -128,6 +_,7 @@
if (this.hasCustomName()) { if (this.hasCustomName()) {
this.bossEvent.setName(this.getDisplayName()); this.bossEvent.setName(this.getDisplayName());
} }
@@ -50,7 +42,7 @@ index 030721328b05526c3f56d9875859ee8860a1d36b..f8aeb8364723cf09bbe7f4fad00ddede
} }
@Override @Override
@@ -271,7 +285,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { @@ -271,7 +_,7 @@
level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
} }
// CraftBukkit end // CraftBukkit end
@@ -59,7 +51,7 @@ index 030721328b05526c3f56d9875859ee8860a1d36b..f8aeb8364723cf09bbe7f4fad00ddede
// CraftBukkit start - Use relative location for far away sounds // CraftBukkit start - Use relative location for far away sounds
// level.globalLevelEvent(1023, this.blockPosition(), 0); // level.globalLevelEvent(1023, this.blockPosition(), 0);
int viewDistance = level.getCraftServer().getViewDistance() * 16; int viewDistance = level.getCraftServer().getViewDistance() * 16;
@@ -378,8 +392,10 @@ public class WitherBoss extends Monster implements RangedAttackMob { @@ -378,8 +_,10 @@
} }
} }
@@ -72,7 +64,7 @@ index 030721328b05526c3f56d9875859ee8860a1d36b..f8aeb8364723cf09bbe7f4fad00ddede
} }
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth()); this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
@@ -576,6 +592,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { @@ -576,6 +_,7 @@
@Override @Override
protected boolean canRide(Entity entity) { protected boolean canRide(Entity entity) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
index 46369e554be8c72e6fc2e6d58374dbfc77d94879..e2ffc9b4a95a7684a28b47ad93644c95f9eb5ec8 100644
--- a/net/minecraft/world/entity/decoration/ArmorStand.java --- a/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -91,10 +91,13 @@ public class ArmorStand extends LivingEntity { @@ -91,10 +_,13 @@
public boolean canTickSetByAPI = false; public boolean canTickSetByAPI = false;
private boolean noTickEquipmentDirty = false; private boolean noTickEquipmentDirty = false;
// Paper end - Allow ArmorStands not to tick // Paper end - Allow ArmorStands not to tick
@@ -22,7 +14,7 @@ index 46369e554be8c72e6fc2e6d58374dbfc77d94879..e2ffc9b4a95a7684a28b47ad93644c95
} }
public ArmorStand(Level level, double x, double y, double z) { public ArmorStand(Level level, double x, double y, double z) {
@@ -521,6 +524,7 @@ public class ArmorStand extends LivingEntity { @@ -521,6 +_,7 @@
// Paper start - Allow ArmorStands not to tick // Paper start - Allow ArmorStands not to tick
@Override @Override
public void tick() { public void tick() {
@@ -30,7 +22,7 @@ index 46369e554be8c72e6fc2e6d58374dbfc77d94879..e2ffc9b4a95a7684a28b47ad93644c95
if (!this.canTick) { if (!this.canTick) {
if (this.noTickEquipmentDirty) { if (this.noTickEquipmentDirty) {
this.noTickEquipmentDirty = false; this.noTickEquipmentDirty = false;
@@ -811,4 +815,18 @@ public class ArmorStand extends LivingEntity { @@ -811,4 +_,18 @@
} }
} }
// Paper end // Paper end

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
index 51804b611f469f2ab53e455e8c633b867b00cc88..d650d4f34fde0682ab76360408f7ff6a7d4b4c3a 100644
--- a/net/minecraft/world/entity/item/ItemEntity.java --- a/net/minecraft/world/entity/item/ItemEntity.java
+++ b/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java
@@ -56,6 +56,12 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -56,6 +_,12 @@
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
public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API
@@ -21,7 +13,7 @@ index 51804b611f469f2ab53e455e8c633b867b00cc88..d650d4f34fde0682ab76360408f7ff6a
public ItemEntity(EntityType<? extends ItemEntity> entityType, Level level) { public ItemEntity(EntityType<? extends ItemEntity> entityType, Level level) {
super(entityType, level); super(entityType, level);
@@ -342,7 +348,16 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -342,7 +_,16 @@
@Override @Override
public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) {
@@ -39,7 +31,7 @@ index 51804b611f469f2ab53e455e8c633b867b00cc88..d650d4f34fde0682ab76360408f7ff6a
return false; return false;
} else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) {
return false; return false;
@@ -521,6 +536,12 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -521,6 +_,12 @@
public void setItem(ItemStack stack) { public void setItem(ItemStack stack) {
this.getEntityData().set(DATA_ITEM, stack); this.getEntityData().set(DATA_ITEM, stack);
this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper - Alternative item-despawn-rate this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper - Alternative item-despawn-rate

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java
index 17d54d38dcec39eefeb989cd576cc640a36e82f5..ef070f8a9ab3a4676e2141f7c0bc20a000d0cc3a 100644
--- a/net/minecraft/world/entity/item/PrimedTnt.java --- a/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/net/minecraft/world/entity/item/PrimedTnt.java +++ b/net/minecraft/world/entity/item/PrimedTnt.java
@@ -238,4 +238,32 @@ public class PrimedTnt extends Entity implements TraceableEntity { @@ -238,4 +_,32 @@
return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid(); return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid();
} }
// Paper end - Option to prevent TNT from moving in water // Paper end - Option to prevent TNT from moving in water

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java
index 894a3d988d0530d42d3a282b61cdb445a0f820ad..4e14f1a9ee22d08065a3e971c2aecc9363ebff13 100644
--- a/net/minecraft/world/entity/monster/AbstractSkeleton.java --- a/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -158,10 +158,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @@ -158,10 +_,7 @@
this.reassessWeaponGoal(); this.reassessWeaponGoal();
this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || random.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || random.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
@@ -20,7 +12,7 @@ index 894a3d988d0530d42d3a282b61cdb445a0f820ad..4e14f1a9ee22d08065a3e971c2aecc93
this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN));
this.setDropChance(EquipmentSlot.HEAD, 0.0F); this.setDropChance(EquipmentSlot.HEAD, 0.0F);
} }
@@ -209,7 +206,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @@ -209,7 +_,7 @@
double squareRoot = Math.sqrt(d * d + d2 * d2); double squareRoot = Math.sqrt(d * d + d2 * d2);
if (this.level() instanceof ServerLevel serverLevel) { if (this.level() instanceof ServerLevel serverLevel) {
Projectile.Delayed<AbstractArrow> delayedEntity = Projectile.spawnProjectileUsingShootDelayed( // Paper - delayed Projectile.Delayed<AbstractArrow> delayedEntity = Projectile.spawnProjectileUsingShootDelayed( // Paper - delayed

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java
index eabc778ba06c14f3020391b9850ae1a283ecf106..d82fe9db4d074a0484d8c5e2998ff9faf87dfd6e 100644
--- a/net/minecraft/world/entity/monster/Creeper.java --- a/net/minecraft/world/entity/monster/Creeper.java
+++ b/net/minecraft/world/entity/monster/Creeper.java +++ b/net/minecraft/world/entity/monster/Creeper.java
@@ -55,6 +55,7 @@ public class Creeper extends Monster { @@ -55,6 +_,7 @@
public int explosionRadius = 3; public int explosionRadius = 3;
private int droppedSkulls; private int droppedSkulls;
public @Nullable Entity entityIgniter; // CraftBukkit public @Nullable Entity entityIgniter; // CraftBukkit
@@ -16,7 +8,7 @@ index eabc778ba06c14f3020391b9850ae1a283ecf106..d82fe9db4d074a0484d8c5e2998ff9fa
public Creeper(EntityType<? extends Creeper> entityType, Level level) { public Creeper(EntityType<? extends Creeper> entityType, Level level) {
super(entityType, level); super(entityType, level);
@@ -158,6 +159,27 @@ public class Creeper extends Monster { @@ -158,6 +_,27 @@
return false; // CraftBukkit return false; // CraftBukkit
} }
@@ -44,7 +36,7 @@ index eabc778ba06c14f3020391b9850ae1a283ecf106..d82fe9db4d074a0484d8c5e2998ff9fa
@Override @Override
public SoundEvent getHurtSound(DamageSource damageSource) { public SoundEvent getHurtSound(DamageSource damageSource) {
return SoundEvents.CREEPER_HURT; return SoundEvents.CREEPER_HURT;
@@ -240,14 +262,16 @@ public class Creeper extends Monster { @@ -240,14 +_,16 @@
} }
public void explodeCreeper() { public void explodeCreeper() {
@@ -63,7 +55,7 @@ index eabc778ba06c14f3020391b9850ae1a283ecf106..d82fe9db4d074a0484d8c5e2998ff9fa
this.spawnLingeringCloud(); this.spawnLingeringCloud();
this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED); this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED);
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
@@ -258,6 +282,7 @@ public class Creeper extends Monster { @@ -258,6 +_,7 @@
} }
// CraftBukkit end // CraftBukkit end
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java
index f42f9c232fa588835654de0fdea36b9cdfa34571..84c6b5552f2b408b7b9f24a85b8c4fd54310c349 100644
--- a/net/minecraft/world/entity/monster/Drowned.java --- a/net/minecraft/world/entity/monster/Drowned.java
+++ b/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java
@@ -83,10 +83,23 @@ public class Drowned extends Zombie implements RangedAttackMob { @@ -83,10 +_,23 @@
this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0, false)); this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0, false));
this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0)); this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0));
this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0, this.level().getSeaLevel())); this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0, this.level().getSeaLevel()));

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
index 4edd94ac765d2ab107612504b67e6e07da609313..ddb916856cff7179eca474738dfbba910408434c 100644
--- a/net/minecraft/world/entity/monster/EnderMan.java --- a/net/minecraft/world/entity/monster/EnderMan.java
+++ b/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java
@@ -101,7 +101,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -101,7 +_,7 @@
this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this)); this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this));
this.targetSelector.addGoal(1, new EnderMan.EndermanLookForPlayerGoal(this, this::isAngryAt)); this.targetSelector.addGoal(1, new EnderMan.EndermanLookForPlayerGoal(this, this::isAngryAt));
this.targetSelector.addGoal(2, new HurtByTargetGoal(this)); this.targetSelector.addGoal(2, new HurtByTargetGoal(this));
@@ -17,7 +9,7 @@ index 4edd94ac765d2ab107612504b67e6e07da609313..ddb916856cff7179eca474738dfbba91
this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false)); this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false));
} }
@@ -216,7 +216,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -216,7 +_,7 @@
boolean isBeingStaredBy(Player player) { boolean isBeingStaredBy(Player player) {
// Paper start - EndermanAttackPlayerEvent // Paper start - EndermanAttackPlayerEvent
@@ -26,7 +18,7 @@ index 4edd94ac765d2ab107612504b67e6e07da609313..ddb916856cff7179eca474738dfbba91
final com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity()); final com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity());
event.setCancelled(!shouldAttack); event.setCancelled(!shouldAttack);
return event.callEvent(); return event.callEvent();
@@ -372,6 +372,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -372,6 +_,7 @@
public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) {
if (this.isInvulnerableTo(level, damageSource)) { if (this.isInvulnerableTo(level, damageSource)) {
return false; return false;
@@ -34,7 +26,7 @@ index 4edd94ac765d2ab107612504b67e6e07da609313..ddb916856cff7179eca474738dfbba91
} else { } else {
AbstractThrownPotion abstractThrownPotion1 = damageSource.getDirectEntity() instanceof AbstractThrownPotion abstractThrownPotion AbstractThrownPotion abstractThrownPotion1 = damageSource.getDirectEntity() instanceof AbstractThrownPotion abstractThrownPotion
? abstractThrownPotion ? abstractThrownPotion
@@ -388,6 +389,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -388,6 +_,7 @@
} else { } else {
boolean flag = abstractThrownPotion1 != null && this.hurtWithCleanWater(level, damageSource, abstractThrownPotion1, amount); boolean flag = abstractThrownPotion1 != null && this.hurtWithCleanWater(level, damageSource, abstractThrownPotion1, amount);
@@ -42,7 +34,7 @@ index 4edd94ac765d2ab107612504b67e6e07da609313..ddb916856cff7179eca474738dfbba91
if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent
for (int i = 0; i < 64; i++) { for (int i = 0; i < 64; i++) {
if (this.teleport()) { if (this.teleport()) {
@@ -431,7 +433,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -431,7 +_,7 @@
@Override @Override
public boolean requiresCustomPersistence() { public boolean requiresCustomPersistence() {
@@ -51,7 +43,7 @@ index 4edd94ac765d2ab107612504b67e6e07da609313..ddb916856cff7179eca474738dfbba91
} }
static class EndermanFreezeWhenLookedAt extends Goal { static class EndermanFreezeWhenLookedAt extends Goal {
@@ -475,6 +477,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -475,6 +_,7 @@
@Override @Override
public boolean canUse() { public boolean canUse() {
@@ -59,7 +51,7 @@ index 4edd94ac765d2ab107612504b67e6e07da609313..ddb916856cff7179eca474738dfbba91
return this.enderman.getCarriedBlock() != null return this.enderman.getCarriedBlock() != null
&& getServerLevel(this.enderman).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && getServerLevel(this.enderman).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)
&& this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0; && this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0;
@@ -624,6 +627,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -624,6 +_,7 @@
@Override @Override
public boolean canUse() { public boolean canUse() {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java
index f448aac89c6125246c730a71e7ee21c8168d7003..50eefb77a6c346b2643324f526c5c01d5e667ce4 100644
--- a/net/minecraft/world/entity/monster/Endermite.java --- a/net/minecraft/world/entity/monster/Endermite.java
+++ b/net/minecraft/world/entity/monster/Endermite.java +++ b/net/minecraft/world/entity/monster/Endermite.java
@@ -30,12 +30,23 @@ public class Endermite extends Monster { @@ -30,12 +_,23 @@
private static final int MAX_LIFE = 2400; private static final int MAX_LIFE = 2400;
private static final int DEFAULT_LIFE = 0; private static final int DEFAULT_LIFE = 0;
public int life = 0; public int life = 0;
@@ -32,7 +24,7 @@ index f448aac89c6125246c730a71e7ee21c8168d7003..50eefb77a6c346b2643324f526c5c01d
@Override @Override
protected void registerGoals() { protected void registerGoals() {
this.goalSelector.addGoal(1, new FloatGoal(this)); this.goalSelector.addGoal(1, new FloatGoal(this));
@@ -81,12 +92,14 @@ public class Endermite extends Monster { @@ -81,12 +_,14 @@
protected void readAdditionalSaveData(ValueInput input) { protected void readAdditionalSaveData(ValueInput input) {
super.readAdditionalSaveData(input); super.readAdditionalSaveData(input);
this.life = input.getIntOr("Lifetime", 0); this.life = input.getIntOr("Lifetime", 0);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Monster.java b/net/minecraft/world/entity/monster/Monster.java
index 5ef9566b16a4d0300ee45a993c46e734db156416..04d5910d736dee2a88a2602f4a98495459277157 100644
--- a/net/minecraft/world/entity/monster/Monster.java --- a/net/minecraft/world/entity/monster/Monster.java
+++ b/net/minecraft/world/entity/monster/Monster.java +++ b/net/minecraft/world/entity/monster/Monster.java
@@ -88,6 +88,14 @@ public abstract class Monster extends PathfinderMob implements Enemy { @@ -88,6 +_,14 @@
} }
public static boolean isDarkEnoughToSpawn(ServerLevelAccessor level, BlockPos pos, RandomSource random) { public static boolean isDarkEnoughToSpawn(ServerLevelAccessor level, BlockPos pos, RandomSource random) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java
index 666d50b738622d26cc15ccc3c11414490296abf6..dd808ce350aa8755df69a84ba5e779f82a76a960 100644
--- a/net/minecraft/world/entity/monster/Phantom.java --- a/net/minecraft/world/entity/monster/Phantom.java
+++ b/net/minecraft/world/entity/monster/Phantom.java +++ b/net/minecraft/world/entity/monster/Phantom.java
@@ -174,7 +174,11 @@ public class Phantom extends Mob implements Enemy { @@ -174,7 +_,11 @@
ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData
) { ) {
this.anchorPoint = this.blockPosition().above(5); this.anchorPoint = this.blockPosition().above(5);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Ravager.java b/net/minecraft/world/entity/monster/Ravager.java
index 9d84bf2cffee25404eebbefdc9cc3f37ebc386b0..2b9a72b8742bf13c69df5ce0c905d47a92b9d8bc 100644
--- a/net/minecraft/world/entity/monster/Ravager.java --- a/net/minecraft/world/entity/monster/Ravager.java
+++ b/net/minecraft/world/entity/monster/Ravager.java +++ b/net/minecraft/world/entity/monster/Ravager.java
@@ -74,6 +74,7 @@ public class Ravager extends Raider { @@ -74,6 +_,7 @@
protected void registerGoals() { protected void registerGoals() {
super.registerGoals(); super.registerGoals();
this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(0, new FloatGoal(this));
@@ -16,7 +8,7 @@ index 9d84bf2cffee25404eebbefdc9cc3f37ebc386b0..2b9a72b8742bf13c69df5ce0c905d47a
this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(4, new MeleeAttackGoal(this, 1.0, true));
this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4)); this.goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 0.4));
this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6.0F));
@@ -154,7 +155,7 @@ public class Ravager extends Raider { @@ -154,7 +_,7 @@
)) { )) {
BlockState blockState = serverLevel.getBlockState(blockPos); BlockState blockState = serverLevel.getBlockState(blockPos);
Block block = blockState.getBlock(); Block block = blockState.getBlock();

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java
index f667fc5ff1ea4149cb25608e0d12f9f73f86095e..ff16e0dd78687f4c9a0bce5ede4eda30e2a06263 100644
--- a/net/minecraft/world/entity/monster/Shulker.java --- a/net/minecraft/world/entity/monster/Shulker.java
+++ b/net/minecraft/world/entity/monster/Shulker.java +++ b/net/minecraft/world/entity/monster/Shulker.java
@@ -94,6 +94,21 @@ public class Shulker extends AbstractGolem implements Enemy { @@ -94,6 +_,21 @@
this.lookControl = new Shulker.ShulkerLookControl(this); this.lookControl = new Shulker.ShulkerLookControl(this);
} }
@@ -30,7 +22,7 @@ index f667fc5ff1ea4149cb25608e0d12f9f73f86095e..ff16e0dd78687f4c9a0bce5ede4eda30
@Override @Override
protected void registerGoals() { protected void registerGoals() {
this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F, 0.02F, true)); this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F, 0.02F, true));
@@ -461,11 +476,21 @@ public class Shulker extends AbstractGolem implements Enemy { @@ -461,11 +_,21 @@
private void hitByShulkerBullet() { private void hitByShulkerBullet() {
Vec3 vec3 = this.position(); Vec3 vec3 = this.position();
AABB boundingBox = this.getBoundingBox(); AABB boundingBox = this.getBoundingBox();
@@ -56,7 +48,7 @@ index f667fc5ff1ea4149cb25608e0d12f9f73f86095e..ff16e0dd78687f4c9a0bce5ede4eda30
if (shulker != null) { if (shulker != null) {
shulker.setVariant(this.getVariant()); shulker.setVariant(this.getVariant());
shulker.snapTo(vec3); shulker.snapTo(vec3);
@@ -573,7 +598,7 @@ public class Shulker extends AbstractGolem implements Enemy { @@ -573,7 +_,7 @@
} }
public Optional<DyeColor> getVariant() { public Optional<DyeColor> getVariant() {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Strider.java b/net/minecraft/world/entity/monster/Strider.java
index afa584e2aba6bebfb2dd343215b043c983281853..4b9e60d930bc3a4bfe9aad2e81391e57cfc45d40 100644
--- a/net/minecraft/world/entity/monster/Strider.java --- a/net/minecraft/world/entity/monster/Strider.java
+++ b/net/minecraft/world/entity/monster/Strider.java +++ b/net/minecraft/world/entity/monster/Strider.java
@@ -392,6 +392,19 @@ public class Strider extends Animal implements ItemSteerable { @@ -392,6 +_,19 @@
@Override @Override
public InteractionResult mobInteract(Player player, InteractionHand hand) { public InteractionResult mobInteract(Player player, InteractionHand hand) {
boolean isFood = this.isFood(player.getItemInHand(hand)); boolean isFood = this.isFood(player.getItemInHand(hand));

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java
index 835b522a77fc4e1ec84bd5134e12233a02b66a66..71d84306788be023bc949400d30966548d968c86 100644
--- a/net/minecraft/world/entity/monster/Vindicator.java --- a/net/minecraft/world/entity/monster/Vindicator.java
+++ b/net/minecraft/world/entity/monster/Vindicator.java +++ b/net/minecraft/world/entity/monster/Vindicator.java
@@ -131,6 +131,11 @@ public class Vindicator extends AbstractIllager { @@ -131,6 +_,11 @@
RandomSource random = level.getRandom(); RandomSource random = level.getRandom();
this.populateDefaultEquipmentSlots(random, difficulty); this.populateDefaultEquipmentSlots(random, difficulty);
this.populateDefaultEquipmentEnchantments(level, random, difficulty); this.populateDefaultEquipmentEnchantments(level, random, difficulty);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
index a23607874a72723914cbfeea0ad1c51236c044d8..e8f54f358b0af0a6755912df7cceb2909da9f0a9 100644
--- a/net/minecraft/world/entity/monster/Zombie.java --- a/net/minecraft/world/entity/monster/Zombie.java
+++ b/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java
@@ -117,7 +117,19 @@ public class Zombie extends Monster { @@ -117,7 +_,19 @@
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0)); this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0));
this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(ZombifiedPiglin.class)); this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(ZombifiedPiglin.class));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
@@ -29,7 +21,7 @@ index a23607874a72723914cbfeea0ad1c51236c044d8..e8f54f358b0af0a6755912df7cceb290
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR)); this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
} }
@@ -551,10 +563,7 @@ public class Zombie extends Monster { @@ -551,10 +_,7 @@
} }
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
index 822712eaff2f6c579d982734ab14a00c02182770..1be7c756d56cca63347d97f7896b491f3a343fa4 100644
--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java --- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
@@ -113,6 +113,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { @@ -113,6 +_,12 @@
this.maybeAlertOthers(); this.maybeAlertOthers();
} }
@@ -21,16 +13,16 @@ index 822712eaff2f6c579d982734ab14a00c02182770..1be7c756d56cca63347d97f7896b491f
super.customServerAiStep(level); super.customServerAiStep(level);
} }
@@ -160,6 +166,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { @@ -159,6 +_,12 @@
this.playFirstAngerSoundIn = FIRST_ANGER_SOUND_DELAY.sample(this.random);
this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random); this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random);
} }
+
+ // Purpur start - Toggle for Zombified Piglin death always counting as player kill when angry + // Purpur start - Toggle for Zombified Piglin death always counting as player kill when angry
+ if (livingEntity instanceof Player player && this.level().purpurConfig.zombifiedPiglinCountAsPlayerKillWhenAngry) { + if (livingEntity instanceof Player player && this.level().purpurConfig.zombifiedPiglinCountAsPlayerKillWhenAngry) {
+ this.setLastHurtByPlayer(player, this.tickCount); + this.setLastHurtByPlayer(player, this.tickCount);
+ } + }
+ // Purpur end - Toggle for Zombified Piglin death always counting as player kill when angry + // Purpur end - Toggle for Zombified Piglin death always counting as player kill when angry
+
return super.setTarget(livingEntity, reason); // CraftBukkit return super.setTarget(livingEntity, reason); // CraftBukkit
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..2841c765b2bd804f08bd0e603b4b29cf8a801fab 100644
--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java --- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -661,7 +661,10 @@ public class PiglinAi { @@ -661,13 +_,23 @@
public static boolean isWearingSafeArmor(LivingEntity entity) { public static boolean isWearingSafeArmor(LivingEntity entity) {
for (EquipmentSlot equipmentSlot : EquipmentSlotGroup.ARMOR) { for (EquipmentSlot equipmentSlot : EquipmentSlotGroup.ARMOR) {
@@ -20,17 +12,16 @@ index 4b1a3772f9e6b9e4efcf11e14b0fb882512ec86d..2841c765b2bd804f08bd0e603b4b29cf
return true; return true;
} }
} }
@@ -669,6 +672,13 @@ public class PiglinAi {
return false; return false;
} }
+
+ // Purpur start - piglins ignore gold-trimmed armor + // Purpur start - piglins ignore gold-trimmed armor
+ private static boolean isWearingGoldTrim(net.minecraft.world.item.ItemStack itemstack) { + private static boolean isWearingGoldTrim(net.minecraft.world.item.ItemStack itemstack) {
+ net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.getComponents().get(net.minecraft.core.component.DataComponents.TRIM); + net.minecraft.world.item.equipment.trim.ArmorTrim armorTrim = itemstack.getComponents().get(net.minecraft.core.component.DataComponents.TRIM);
+ return armorTrim != null && armorTrim.material().is(net.minecraft.world.item.equipment.trim.TrimMaterials.GOLD); + return armorTrim != null && armorTrim.material().is(net.minecraft.world.item.equipment.trim.TrimMaterials.GOLD);
+ } + }
+ // Purpur end - piglins ignore gold-trimmed armor + // Purpur end - piglins ignore gold-trimmed armor
+
private static void stopWalking(Piglin piglin) { private static void stopWalking(Piglin piglin) {
piglin.getBrain().eraseMemory(MemoryModuleType.WALK_TARGET); piglin.getBrain().eraseMemory(MemoryModuleType.WALK_TARGET);
piglin.getNavigation().stop();

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576ba2a7938 100644
--- a/net/minecraft/world/entity/npc/Villager.java --- a/net/minecraft/world/entity/npc/Villager.java
+++ b/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java
@@ -178,6 +178,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -178,6 +_,8 @@
MemoryModuleType.MEETING_POINT, MemoryModuleType.MEETING_POINT,
(villager, poiType) -> poiType.is(PoiTypes.MEETING) (villager, poiType) -> poiType.is(PoiTypes.MEETING)
); );
@@ -17,7 +9,7 @@ index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576
public Villager(EntityType<? extends Villager> entityType, Level level) { public Villager(EntityType<? extends Villager> entityType, Level level) {
this(entityType, level, VillagerType.PLAINS); this(entityType, level, VillagerType.PLAINS);
@@ -196,6 +198,57 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -196,6 +_,57 @@
this.setVillagerData(this.getVillagerData().withType(villagerType).withProfession(level.registryAccess(), VillagerProfession.NONE)); this.setVillagerData(this.getVillagerData().withType(villagerType).withProfession(level.registryAccess(), VillagerProfession.NONE));
} }
@@ -75,7 +67,7 @@ index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576
@Override @Override
public Brain<Villager> getBrain() { public Brain<Villager> getBrain() {
return (Brain<Villager>)super.getBrain(); return (Brain<Villager>)super.getBrain();
@@ -292,11 +345,24 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -292,11 +_,24 @@
// Paper start - EAR 2 // Paper start - EAR 2
this.customServerAiStep(level, false); this.customServerAiStep(level, false);
} }
@@ -102,7 +94,7 @@ index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576
profilerFiller.pop(); profilerFiller.pop();
if (this.assignProfessionWhenSpawned) { if (this.assignProfessionWhenSpawned) {
this.assignProfessionWhenSpawned = false; this.assignProfessionWhenSpawned = false;
@@ -368,6 +434,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -368,6 +_,7 @@
return InteractionResult.CONSUME; return InteractionResult.CONSUME;
} }
@@ -110,7 +102,7 @@ index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576
this.startTrading(player); this.startTrading(player);
} }
@@ -504,7 +571,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -504,7 +_,7 @@
public void updateDemand() { public void updateDemand() {
for (MerchantOffer merchantOffer : this.getOffers()) { for (MerchantOffer merchantOffer : this.getOffers()) {
@@ -119,7 +111,7 @@ index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576
} }
} }
@@ -697,7 +764,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -697,7 +_,7 @@
@Override @Override
public boolean canBreed() { public boolean canBreed() {
@@ -128,7 +120,7 @@ index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576
} }
private boolean hungry() { private boolean hungry() {
@@ -919,6 +986,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -919,6 +_,7 @@
} }
public void spawnGolemIfNeeded(ServerLevel serverLevel, long gameTime, int minVillagerAmount) { public void spawnGolemIfNeeded(ServerLevel serverLevel, long gameTime, int minVillagerAmount) {
@@ -136,7 +128,7 @@ index e1e2bdb35866a8f32a41f6efd24ad77cf916b2e9..98303277236f2205f20e3db29f17f576
if (this.wantsToSpawnGolem(gameTime)) { if (this.wantsToSpawnGolem(gameTime)) {
AABB aabb = this.getBoundingBox().inflate(10.0, 10.0, 10.0); AABB aabb = this.getBoundingBox().inflate(10.0, 10.0, 10.0);
List<Villager> entitiesOfClass = serverLevel.getEntitiesOfClass(Villager.class, aabb); List<Villager> entitiesOfClass = serverLevel.getEntitiesOfClass(Villager.class, aabb);
@@ -992,6 +1060,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -992,6 +_,12 @@
@Override @Override
public void startSleeping(BlockPos pos) { public void startSleeping(BlockPos pos) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java
index c2573946dd1244eb5d1ef2be7823211064daa80d..93ed977260f369677028bbd8396862f344dfeaa3 100644
--- a/net/minecraft/world/entity/npc/WanderingTrader.java --- a/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/net/minecraft/world/entity/npc/WanderingTrader.java
@@ -60,6 +60,13 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill @@ -60,6 +_,13 @@
super(entityType, level); super(entityType, level);
} }
@@ -22,7 +14,7 @@ index c2573946dd1244eb5d1ef2be7823211064daa80d..93ed977260f369677028bbd8396862f3
@Override @Override
protected void registerGoals() { protected void registerGoals() {
this.goalSelector.addGoal(0, new FloatGoal(this)); this.goalSelector.addGoal(0, new FloatGoal(this));
@@ -80,7 +87,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill @@ -80,7 +_,7 @@
this, this,
new ItemStack(Items.MILK_BUCKET), new ItemStack(Items.MILK_BUCKET),
SoundEvents.WANDERING_TRADER_REAPPEARED, SoundEvents.WANDERING_TRADER_REAPPEARED,
@@ -31,7 +23,7 @@ index c2573946dd1244eb5d1ef2be7823211064daa80d..93ed977260f369677028bbd8396862f3
) )
); );
this.goalSelector.addGoal(1, new TradeWithPlayerGoal(this)); this.goalSelector.addGoal(1, new TradeWithPlayerGoal(this));
@@ -124,8 +131,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill @@ -124,8 +_,10 @@
return InteractionResult.CONSUME; return InteractionResult.CONSUME;
} }

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
index fce3f0f81d3195045cdc9ad7320f1d92f033c36d..352f55882ea77e8d89942e6c58ef3b4b78eec887 100644
--- a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java --- a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
+++ b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
@@ -137,7 +137,17 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -137,7 +_,17 @@
int i1 = pos.getX() + this.random.nextInt(maxDistance * 2) - maxDistance; int i1 = pos.getX() + this.random.nextInt(maxDistance * 2) - maxDistance;
int i2 = pos.getZ() + this.random.nextInt(maxDistance * 2) - maxDistance; int i2 = pos.getZ() + this.random.nextInt(maxDistance * 2) - maxDistance;
int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i1, i2); int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i1, i2);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java
index 11adb3eacce9d46f15e6c5216e9b2494df158baf..5a27dfa9ea24a93e7bd09cfed8190d7ca772d33e 100644
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java --- a/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -76,6 +76,7 @@ public abstract class AbstractArrow extends Projectile { @@ -76,6 +_,7 @@
public ItemStack pickupItemStack = this.getDefaultPickupItem(); public ItemStack pickupItemStack = this.getDefaultPickupItem();
@Nullable @Nullable
public ItemStack firedFromWeapon = null; public ItemStack firedFromWeapon = null;
@@ -16,7 +8,7 @@ index 11adb3eacce9d46f15e6c5216e9b2494df158baf..5a27dfa9ea24a93e7bd09cfed8190d7c
protected AbstractArrow(EntityType<? extends AbstractArrow> entityType, Level level) { protected AbstractArrow(EntityType<? extends AbstractArrow> entityType, Level level) {
super(entityType, level); super(entityType, level);
@@ -349,7 +350,7 @@ public abstract class AbstractArrow extends Projectile { @@ -349,7 +_,7 @@
this.setInGround(false); this.setInGround(false);
Vec3 deltaMovement = this.getDeltaMovement(); Vec3 deltaMovement = this.getDeltaMovement();
this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F)); this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F));
@@ -25,16 +17,16 @@ index 11adb3eacce9d46f15e6c5216e9b2494df158baf..5a27dfa9ea24a93e7bd09cfed8190d7c
} }
public boolean isInGround() { public boolean isInGround() {
@@ -573,6 +574,12 @@ public abstract class AbstractArrow extends Projectile { @@ -572,6 +_,12 @@
public ItemStack getWeaponItem() {
return this.firedFromWeapon; return this.firedFromWeapon;
} }
+
+ // Purpur start - Add an option to fix MC-3304 projectile looting + // Purpur start - Add an option to fix MC-3304 projectile looting
+ public void setActualEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments) { + public void setActualEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments) {
+ this.actualEnchantments = actualEnchantments; + this.actualEnchantments = actualEnchantments;
+ } + }
+ // Purpur end - Add an option to fix MC-3304 projectile looting + // Purpur end - Add an option to fix MC-3304 projectile looting
+
protected SoundEvent getDefaultHitGroundSoundEvent() { protected SoundEvent getDefaultHitGroundSoundEvent() {
return SoundEvents.ARROW_HIT; return SoundEvents.ARROW_HIT;
}

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/Snowball.java b/net/minecraft/world/entity/projectile/Snowball.java
index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b4844daf4 100644
--- a/net/minecraft/world/entity/projectile/Snowball.java --- a/net/minecraft/world/entity/projectile/Snowball.java
+++ b/net/minecraft/world/entity/projectile/Snowball.java +++ b/net/minecraft/world/entity/projectile/Snowball.java
@@ -52,10 +52,40 @@ public class Snowball extends ThrowableItemProjectile { @@ -52,9 +_,39 @@
protected void onHitEntity(EntityHitResult result) { protected void onHitEntity(EntityHitResult result) {
super.onHitEntity(result); super.onHitEntity(result);
Entity entity = result.getEntity(); Entity entity = result.getEntity();
@@ -16,7 +8,7 @@ index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b
+ int i = entity.level().purpurConfig.snowballDamage >= 0 ? entity.level().purpurConfig.snowballDamage : entity instanceof Blaze ? 3 : 0; // Purpur - Add configurable snowball damage + int i = entity.level().purpurConfig.snowballDamage >= 0 ? entity.level().purpurConfig.snowballDamage : entity instanceof Blaze ? 3 : 0; // Purpur - Add configurable snowball damage
entity.hurt(this.damageSources().thrown(this, this.getOwner()), i); entity.hurt(this.damageSources().thrown(this, this.getOwner()), i);
} }
+
+ // Purpur start - options to extinguish fire blocks with snowballs - borrowed and modified code from ThrownPotion#onHitBlock and ThrownPotion#dowseFire + // Purpur start - options to extinguish fire blocks with snowballs - borrowed and modified code from ThrownPotion#onHitBlock and ThrownPotion#dowseFire
+ @Override + @Override
+ protected void onHitBlock(net.minecraft.world.phys.BlockHitResult blockHitResult) { + protected void onHitBlock(net.minecraft.world.phys.BlockHitResult blockHitResult) {
@@ -46,7 +38,6 @@ index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b
+ } + }
+ } + }
+ // Purpur end - options to extinguish fire blocks with snowballs + // Purpur end - options to extinguish fire blocks with snowballs
+
@Override @Override
protected void onHit(HitResult result) { protected void onHit(HitResult result) {
super.onHit(result);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
index 5aa63c90e1c0605faef76588efdc7c3903be4605..ebc7db0fc6e8fb8f4bd19945e61287b2ff61cdbc 100644
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java --- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
@@ -129,9 +129,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { @@ -129,9 +_,10 @@
return; return;
} }
// CraftBukkit end // CraftBukkit end
@@ -20,7 +12,7 @@ index 5aa63c90e1c0605faef76588efdc7c3903be4605..ebc7db0fc6e8fb8f4bd19945e61287b2
endermite.snapTo(preTeleportX, preTeleportY, preTeleportZ, preTeleportYRot, preTeleportXRot); // Paper - spawn endermite at pre teleport position as teleport has been moved up endermite.snapTo(preTeleportX, preTeleportY, preTeleportZ, preTeleportYRot, preTeleportXRot); // Paper - spawn endermite at pre teleport position as teleport has been moved up
serverLevel.addFreshEntity(endermite, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ENDER_PEARL); serverLevel.addFreshEntity(endermite, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
} }
@@ -151,7 +152,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { @@ -151,7 +_,7 @@
if (serverPlayer1 != null) { if (serverPlayer1 != null) {
serverPlayer1.resetFallDistance(); serverPlayer1.resetFallDistance();
serverPlayer1.resetCurrentImpulseContext(); serverPlayer1.resetCurrentImpulseContext();

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/ThrownTrident.java b/net/minecraft/world/entity/projectile/ThrownTrident.java
index bc04812ec840e255c0ae8651bf7a43e0f562aa9c..b6826fc742640e7f8311bd0269aa0d8a6a9b2db4 100644
--- a/net/minecraft/world/entity/projectile/ThrownTrident.java --- a/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/net/minecraft/world/entity/projectile/ThrownTrident.java +++ b/net/minecraft/world/entity/projectile/ThrownTrident.java
@@ -66,7 +66,7 @@ public class ThrownTrident extends AbstractArrow { @@ -66,7 +_,7 @@
Entity owner = this.getOwner(); Entity owner = this.getOwner();
int i = this.entityData.get(ID_LOYALTY); int i = this.entityData.get(ID_LOYALTY);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/projectile/WitherSkull.java b/net/minecraft/world/entity/projectile/WitherSkull.java
index 2419c1db39c9ffbc54352c7fa5e0ac1ef813c13a..5f20dded96fac2dd5d1b0282e7f8487344beb4ee 100644
--- a/net/minecraft/world/entity/projectile/WitherSkull.java --- a/net/minecraft/world/entity/projectile/WitherSkull.java
+++ b/net/minecraft/world/entity/projectile/WitherSkull.java +++ b/net/minecraft/world/entity/projectile/WitherSkull.java
@@ -94,7 +94,7 @@ public class WitherSkull extends AbstractHurtingProjectile { @@ -94,7 +_,7 @@
super.onHit(result); super.onHit(result);
if (!this.level().isClientSide) { if (!this.level().isClientSide) {
// CraftBukkit start // CraftBukkit start
@@ -17,17 +9,17 @@ index 2419c1db39c9ffbc54352c7fa5e0ac1ef813c13a..5f20dded96fac2dd5d1b0282e7f84873
if (event.callEvent()) { if (event.callEvent()) {
this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
} }
@@ -103,6 +103,13 @@ public class WitherSkull extends AbstractHurtingProjectile { @@ -102,6 +_,13 @@
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
} }
} }
+
+ // Purpur start - Add canSaveToDisk to Entity + // Purpur start - Add canSaveToDisk to Entity
+ @Override + @Override
+ public boolean canSaveToDisk() { + public boolean canSaveToDisk() {
+ return false; + return false;
+ } + }
+ // Purpur end - Add canSaveToDisk to Entity + // Purpur end - Add canSaveToDisk to Entity
+
@Override @Override
protected void defineSynchedData(SynchedEntityData.Builder builder) { protected void defineSynchedData(SynchedEntityData.Builder builder) {
builder.define(DATA_DANGEROUS, false);

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/raid/Raids.java b/net/minecraft/world/entity/raid/Raids.java
index b8de00c5f13257d0b79b44b19fbfb88a3ca20353..fc5c1acec3cc2afed40589be6f8e159c3426c08e 100644
--- a/net/minecraft/world/entity/raid/Raids.java --- a/net/minecraft/world/entity/raid/Raids.java
+++ b/net/minecraft/world/entity/raid/Raids.java +++ b/net/minecraft/world/entity/raid/Raids.java
@@ -29,6 +29,7 @@ import net.minecraft.world.phys.Vec3; @@ -29,6 +_,7 @@
public class Raids extends SavedData { public class Raids extends SavedData {
private static final String RAID_FILE_ID = "raids"; private static final String RAID_FILE_ID = "raids";
@@ -16,7 +8,7 @@ index b8de00c5f13257d0b79b44b19fbfb88a3ca20353..fc5c1acec3cc2afed40589be6f8e159c
public static final Codec<Raids> CODEC = RecordCodecBuilder.create( public static final Codec<Raids> CODEC = RecordCodecBuilder.create(
instance -> instance.group( instance -> instance.group(
Raids.RaidWithId.CODEC Raids.RaidWithId.CODEC
@@ -81,6 +82,17 @@ public class Raids extends SavedData { @@ -81,6 +_,17 @@
public void tick(ServerLevel level) { public void tick(ServerLevel level) {
this.tick++; this.tick++;
@@ -34,7 +26,7 @@ index b8de00c5f13257d0b79b44b19fbfb88a3ca20353..fc5c1acec3cc2afed40589be6f8e159c
Iterator<Raid> iterator = this.raidMap.values().iterator(); Iterator<Raid> iterator = this.raidMap.values().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -148,11 +160,13 @@ public class Raids extends SavedData { @@ -148,11 +_,13 @@
// } // }
if (!raid.isStarted() || (raid.isInProgress() && raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel())) { // CraftBukkit - fixed a bug with raid: players could add up Bad Omen level even when the raid had finished if (!raid.isStarted() || (raid.isInProgress() && raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel())) { // CraftBukkit - fixed a bug with raid: players could add up Bad Omen level even when the raid had finished

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java
index df360ff06d10fc7f996055dce5148825539e9261..4dcf6daa146645f096ac8815588c837715073c22 100644
--- a/net/minecraft/world/entity/vehicle/AbstractBoat.java --- a/net/minecraft/world/entity/vehicle/AbstractBoat.java
+++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java
@@ -436,6 +436,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { @@ -436,6 +_,7 @@
float groundFriction = this.getGroundFriction(); float groundFriction = this.getGroundFriction();
if (groundFriction > 0.0F) { if (groundFriction > 0.0F) {
this.landFriction = groundFriction; this.landFriction = groundFriction;

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
index 090b19752fbfc856d9fbf118510afc6cda2b9989..325ec57df2885f5e81b8a6b61e3a9fed9484b30f 100644
--- a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java --- a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
+++ b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java +++ b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
@@ -391,7 +391,7 @@ public class NewMinecartBehavior extends MinecartBehavior { @@ -391,7 +_,7 @@
private Vec3 calculateBoostTrackSpeed(Vec3 speed, BlockPos pos, BlockState state) { private Vec3 calculateBoostTrackSpeed(Vec3 speed, BlockPos pos, BlockState state) {
if (state.is(Blocks.POWERED_RAIL) && state.getValue(PoweredRailBlock.POWERED)) { if (state.is(Blocks.POWERED_RAIL) && state.getValue(PoweredRailBlock.POWERED)) {
if (speed.length() > 0.01) { if (speed.length() > 0.01) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
index 0d09b0809e7b224538cf5cfac9e36ec5ba10b709..4d224dc127d245556892e761fa4927a76e4b8e9a 100644
--- a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java --- a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
+++ b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java +++ b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
@@ -243,8 +243,8 @@ public class OldMinecartBehavior extends MinecartBehavior { @@ -243,8 +_,8 @@
Vec3 deltaMovement1 = this.getDeltaMovement(); Vec3 deltaMovement1 = this.getDeltaMovement();
double d13 = deltaMovement1.horizontalDistance(); double d13 = deltaMovement1.horizontalDistance();
if (d13 > 0.01) { if (d13 > 0.01) {

View File

@@ -1,14 +1,6 @@
From 1e4693c6129676cacc2e29a157b5a69107c78543 Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 06:37:42 -0700
Subject: [PATCH] purpur File Patches
diff --git a/net/minecraft/world/food/FoodData.java b/net/minecraft/world/food/FoodData.java
index a1b99dea0fa5860a01158897006e1065050c029b..d1080acfe91bd1ca28e21ffc68a928dc0f233be3 100644
--- a/net/minecraft/world/food/FoodData.java --- a/net/minecraft/world/food/FoodData.java
+++ b/net/minecraft/world/food/FoodData.java +++ b/net/minecraft/world/food/FoodData.java
@@ -39,6 +39,7 @@ public class FoodData { @@ -39,6 +_,7 @@
int oldFoodLevel = this.foodLevel; int oldFoodLevel = this.foodLevel;
org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(serverPlayer, foodProperties.nutrition() + oldFoodLevel, stack); org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(serverPlayer, foodProperties.nutrition() + oldFoodLevel, stack);
if (!event.isCancelled()) { if (!event.isCancelled()) {
@@ -16,7 +8,7 @@ index a1b99dea0fa5860a01158897006e1065050c029b..d1080acfe91bd1ca28e21ffc68a928dc
this.add(event.getFoodLevel() - oldFoodLevel, foodProperties.saturation()); this.add(event.getFoodLevel() - oldFoodLevel, foodProperties.saturation());
} }
serverPlayer.getBukkitEntity().sendHealthUpdate(); serverPlayer.getBukkitEntity().sendHealthUpdate();
@@ -87,7 +88,7 @@ public class FoodData { @@ -87,7 +_,7 @@
this.tickTimer++; this.tickTimer++;
if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation
if (player.getHealth() > 10.0F || difficulty == Difficulty.HARD || player.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) { if (player.getHealth() > 10.0F || difficulty == Difficulty.HARD || player.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) {

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