diff options
author | stonar96 <[email protected]> | 2021-11-29 12:55:13 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2021-11-30 19:26:33 +0100 |
commit | 4ab59e13260e61cecc85c9f4c09ff70db0a4d08e (patch) | |
tree | 10135ffd5471a2fb513eb1dcd1f74c5ca658f305 /patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch | |
parent | ebb727e6299d2f4a7d6ff537b8c280ecaaef64fa (diff) | |
download | Paper-4ab59e13260e61cecc85c9f4c09ff70db0a4d08e.tar.gz Paper-4ab59e13260e61cecc85c9f4c09ff70db0a4d08e.zip |
Port Anti-Xray to 1.18 (#6947)
Diffstat (limited to 'patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch')
-rw-r--r-- | patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch b/patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch new file mode 100644 index 0000000000..5a420fb241 --- /dev/null +++ b/patches/server/0792-Mark-fish-and-axolotls-from-buckets-as-persistent.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Fri, 13 Aug 2021 16:38:08 -0700 +Subject: [PATCH] Mark fish and axolotls from buckets as persistent + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java b/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java +index 58428eebf24e328b3faf32ca473be8f19d4f6cca..3484defdfd5a487b11917310d7b1d1543291eee1 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java ++++ b/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java +@@ -81,7 +81,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { + @Override + public void setFromBucket(boolean fromBucket) { + this.entityData.set(AbstractFish.FROM_BUCKET, fromBucket); +- this.setPersistenceRequired(this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence ++ this.setPersistenceRequired(fromBucket || this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence // Paper - actually set as persistent + } + + @Override +diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +index 67bb476693fa16aa391c120f8acae7c7279efc20..86acf89ce875e215da8469947b382f70e42314b0 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java ++++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +@@ -237,7 +237,7 @@ public class Axolotl extends Animal implements LerpingModel, Bucketable { + @Override + public void setFromBucket(boolean fromBucket) { + this.entityData.set(Axolotl.FROM_BUCKET, fromBucket); +- this.setPersistenceRequired(this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence ++ this.setPersistenceRequired(fromBucket || this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence // Paper - actually set as persistent + } + + @Nullable |