geforkt von Mirrors/Paper
Avoid collision shapes outside world border in findFreePosition
This is to correctly adhere to Vanilla behavior.
Dieser Commit ist enthalten in:
Ursprung
084923b9ac
Commit
e08de25a2a
@ -31633,6 +31633,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ null
|
||||
+ );
|
||||
+
|
||||
+ final WorldBorder worldBorder = this.getWorldBorder();
|
||||
+ if (worldBorder != null) {
|
||||
+ aabbs.removeIf((final AABB aabb) -> {
|
||||
+ return !worldBorder.isWithinBounds(aabb);
|
||||
+ });
|
||||
+ voxels.removeIf((final VoxelShape shape) -> {
|
||||
+ return !worldBorder.isWithinBounds(shape.bounds());
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ // push voxels into aabbs
|
||||
+ for (int i = 0, len = voxels.size(); i < len; ++i) {
|
||||
+ aabbs.addAll(voxels.get(i).toAabbs());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren