mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
d454bbd5e1
This patch replaces the vanilla collision code for both block and entity collisions with faster implementations by JellySquid, used originally in her Lithium mod. Optimizes Full Block voxel collisions, and removes streams from Entity collisions Original code by JellySquid, licensed under GNU Lesser General Public License v3.0 you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.15.x/fabric (Yarn mappings) Ported by Co-authored-by: Zoutelande <54509836+Zoutelande@users.noreply.github.com> Touched up by Aikar to keep previous paper optimizations
28 lines
1.4 KiB
Diff
28 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: 2277 <38501234+2277@users.noreply.github.com>
|
|
Date: Tue, 31 Mar 2020 10:33:55 +0100
|
|
Subject: [PATCH] Move player to spawn point if spawn in unloaded world
|
|
|
|
The code following this has better support for null worlds to move
|
|
them back to the world spawn.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 7df66f0399d3ce346ba205f941f9e0bdc65f3781..c4f56fc4ba0e6da5e24ab3c1ac4e4a15235442bc 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -1791,9 +1791,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
bworld = server.getWorld(worldName);
|
|
}
|
|
|
|
- if (bworld == null) {
|
|
- bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getWorldServer(DimensionManager.OVERWORLD).getWorld();
|
|
- }
|
|
+ // Paper start - Move player to spawn point if spawn in unloaded world
|
|
+ // if (bworld == null) {
|
|
+ // bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getWorldServer(DimensionManager.OVERWORLD).getWorld();
|
|
+ // }
|
|
+ // Paper end
|
|
|
|
spawnIn(bworld == null ? null : ((CraftWorld) bworld).getHandle());
|
|
}
|