diff options
author | Owen1212055 <[email protected]> | 2023-06-08 04:47:19 -0400 |
---|---|---|
committer | Owen1212055 <[email protected]> | 2023-06-08 04:47:19 -0400 |
commit | aa1c25c88d5eadd79e6e05f4963657beccb064cb (patch) | |
tree | 183043492cadea79259148e4c13602dde9398c7f /patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch | |
parent | bab0b3a7c38edbd05cfdfe86c7289c352b5a6726 (diff) | |
download | Paper-aa1c25c88d5eadd79e6e05f4963657beccb064cb.tar.gz Paper-aa1c25c88d5eadd79e6e05f4963657beccb064cb.zip |
vine boom sound
Diffstat (limited to 'patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch')
-rw-r--r-- | patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch new file mode 100644 index 0000000000..76f698efd9 --- /dev/null +++ b/patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch @@ -0,0 +1,40 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath <[email protected]> +Date: Thu, 27 Oct 2022 15:35:47 +0200 +Subject: [PATCH] Add config option for spider worldborder climbing + + +diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java +index f200a50d09e50fec0005fa7db77c5777e4384504..84c7564c1357cf413c5d3f8b2195265606d94f38 100644 +--- a/src/main/java/net/minecraft/world/entity/Entity.java ++++ b/src/main/java/net/minecraft/world/entity/Entity.java +@@ -402,6 +402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { + @javax.annotation.Nullable + private UUID originWorld; + public boolean freezeLocked = false; // Paper - Freeze Tick Lock API ++ public boolean collidingWithWorldBorder; // Paper + + public void setOrigin(@javax.annotation.Nonnull Location location) { + this.origin = location.toVector(); +@@ -1436,7 +1437,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { + io.papermc.paper.util.CollisionUtil.getCollisions(world, this, collisionBox, potentialCollisions, false, this.level.paperConfig().chunks.preventMovingIntoUnloadedChunks, + false, false, null, null); + +- if (io.papermc.paper.util.CollisionUtil.isCollidingWithBorderEdge(world.getWorldBorder(), collisionBox)) { ++ if (collidingWithWorldBorder = io.papermc.paper.util.CollisionUtil.isCollidingWithBorderEdge(world.getWorldBorder(), collisionBox)) { // Paper - this line *is* correct, ignore the IDE warning about assignments being used as a condition + io.papermc.paper.util.CollisionUtil.addBoxesToIfIntersects(world.getWorldBorder().getCollisionShape(), collisionBox, potentialCollisions); + } + +diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java +index dd7c7fb6ed3086b1439499df806cdb84ce7d6eb2..4e291c4a06d2c9a6c54e91cebc0570fd566fb7d5 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java ++++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java +@@ -84,7 +84,7 @@ public class Spider extends Monster { + public void tick() { + super.tick(); + if (!this.level().isClientSide) { +- this.setClimbing(this.horizontalCollision); ++ this.setClimbing(this.horizontalCollision && (this.level().paperConfig().entities.behavior.allowSpiderWorldBorderClimbing || !collidingWithWorldBorder)); // Paper + } + + } |