geforkt von Mirrors/Paper
bf92f3e4db
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9153f77e PR-841: Remove incorrect ClickType.CONTROL_DROP from ClickType#isShiftClick bceda6ab PR-840: Adjust annotations in Display entity interface a6b85ac3 PR-835: Add Jukebox#hasRecord() and #startPlaying(), clarify #setRecord() CraftBukkit Changes: e142fb9fd SPIGOT-7188: ChunkSnapshot biome y coordinate doesn't match chunk biome y coord eff1743b9 SPIGOT-7313: More accurately edit data on Jukeboxes
41 Zeilen
2.5 KiB
Diff
41 Zeilen
2.5 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/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 448b3d68b440cfeeb4bf8c5c7aabfdc9bdb97fc0..4d5c68aaea1fe44517862075b60e1989170618ab 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -398,6 +398,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();
|
|
@@ -1392,7 +1393,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 61fd27992516e1238195f8e60766428f01719ba7..0c36bb47bd7040f1544817810e1c87157cdaff96 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
|
|
}
|
|
|
|
}
|