mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 08:20:51 +01:00
0b952981e6
Vanilla now requires the use of WorldBorder#isInsideCloseToBorder to consider a border collision
20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <blake.galbreath@gmail.com>
|
|
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/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
|
index 9e5d68fe86d17118df3d6a1c36b296f32b4d7fc1..5a9f4a022c8e7a0804543335bfe91e1328d040e6 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
|
@@ -86,7 +86,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 || !io.papermc.paper.util.CollisionUtil.isCollidingWithBorder(this.level().getWorldBorder(), this.getBoundingBox().inflate(io.papermc.paper.util.CollisionUtil.COLLISION_EPSILON)))); // Paper - inflate by +EPSILON as collision will place us outside the border, but just barely
|
|
}
|
|
|
|
}
|