Use spigot.yml's view distance setting

This commit is contained in:
Zach Brown 2015-08-29 03:12:41 -05:00
parent 25a137f3a3
commit 477b22d36c

View File

@ -1,11 +1,11 @@
From 0ee891f55462310888c36e8f787ef799345490cb Mon Sep 17 00:00:00 2001
From 29c575de4f07018891ef38d18e6c99fd23d0a9e7 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 1 Jul 2015 00:59:06 -0700
Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 592fb75..baa08c9 100644
index 161b191..3e4869b 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -64,6 +64,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -20,7 +20,7 @@ index 592fb75..baa08c9 100644
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
super(worldserver, gameprofile);
+ this.viewDistance = worldserver.getServer().getViewDistance(); // PaperSpigot - Player view distance API
+ this.viewDistance = world.spigotConfig.viewDistance; // PaperSpigot - Player view distance API
playerinteractmanager.player = this;
this.playerInteractManager = playerinteractmanager;
BlockPosition blockposition = worldserver.getSpawn();
@ -135,5 +135,5 @@ index 9612c79..8fdfdcf 100644
public Player.Spigot spigot()
--
1.9.5.msysgit.1
2.5.0.windows.1