mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
More compile fixes
- Re-removes Bukkit#getServerName - This was (hopefully?) only added back for Timings v2. It should be kept in that scope. - Intend to let PlayerViewDistance API slip. Given the scope of the changes in this area it seems best to let this slip past initial release. It can be re-added when there is additional time to focus on it and the changed systems it relies on. If it is fixed prior to release this is implemented as a single shim patch that can be dropped.
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Mon, 6 May 2019 01:29:25 -0400
|
||||
Subject: [PATCH] Per-Player View Distance API placeholders
|
||||
|
||||
I hope to look at this more in-depth soon. It appears doable.
|
||||
However this should not block the update.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
index 3abf89b74..c558661d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
@@ -0,0 +0,0 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.b(1028, new BlockPosition(this), 0);
|
||||
// Paper start
|
||||
- //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
|
||||
+ int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
|
||||
for (EntityPlayer player : ((WorldServer)world).getPlayers()) {
|
||||
- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
// Paper end
|
||||
double deltaX = this.locX - player.locX;
|
||||
double deltaZ = this.locZ - player.locZ;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
index 48b22894a..dbd854206 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
@@ -0,0 +0,0 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.b(1023, new BlockPosition(this), 0);
|
||||
// Paper start
|
||||
- //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
|
||||
+ int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
|
||||
for (EntityPlayer player : ((WorldServer)world).getPlayers()) {
|
||||
- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
// Paper end
|
||||
double deltaX = this.locX - player.locX;
|
||||
double deltaZ = this.locZ - player.locZ;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3bc7a64fa..d94f4c03c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
super.remove();
|
||||
}
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public int getViewDistance() {
|
||||
+ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement"); // TODO
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setViewDistance(int viewDistance) {
|
||||
+ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement"); // TODO
|
||||
+ }
|
||||
//Paper end
|
||||
|
||||
// Spigot start
|
||||
--
|
Reference in New Issue
Block a user