Current non compilable status of all patches - THIS IS NOT READY

THERE IS STILL NO ETA. GOBLINS WILL EAT YOU.
This commit is contained in:
Aikar
2020-06-25 21:58:00 -04:00
parent cfd598512a
commit bc5acdddad
43 changed files with 316 additions and 1533 deletions

View File

@@ -12,20 +12,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -0,0 +0,0 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return null;
return getHandle().sleepTicks;
}
+ // Paper start - Potential bed api
+ @Override
+ public Location getPotentialBedLocation() {
+ BlockPosition bed = getHandle().getBed();
+ EntityPlayer handle = (EntityPlayer) getHandle();
+ BlockPosition bed = handle.getSpawn();
+ if (bed == null) {
+ return null;
+ }
+ return new Location(getServer().getWorld(getHandle().spawnWorld), bed.getX(), bed.getY(), bed.getZ());
+
+ net.minecraft.server.WorldServer worldServer = handle.server.getWorldServer(handle.getSpawnDimension());
+ if (worldServer == null) {
+ return null;
+ }
+ return new Location(worldServer.getWorld(), bed.getX(), bed.getY(), bed.getZ());
+ }
+ // Paper end
+
@Override
public void setBedSpawnLocation(Location location) {
setBedSpawnLocation(location, false);
public boolean sleep(Location location, boolean force) {
Preconditions.checkArgument(location != null, "Location cannot be null");