mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Revert "Remove getCubes patch as under some circumstances it can loop around itself forever. For anyone wishing to reimplement this patch, the rationale behind it is quite simple, get all cubes within each chunk at the same time."
This reverts commit 5261962003
.
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
From 656c027b527e27b97b7224c00e898248d1de9a09 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
||||
Subject: [PATCH] View Distance
|
||||
|
||||
This commit allows the user to select per world view distances, and view distances below 3. Be wary of the issues selecting a view distance of 1 or 2 may cause!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 4e0398c..ae4ca63 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -24,7 +24,7 @@ public class PlayerChunkMap {
|
||||
public PlayerChunkMap(WorldServer worldserver, int i) {
|
||||
if (i > 15) {
|
||||
throw new IllegalArgumentException("Too big view radius!");
|
||||
- } else if (i < 3) {
|
||||
+ } else if (i < 1) {
|
||||
throw new IllegalArgumentException("Too small view radius!");
|
||||
} else {
|
||||
this.f = i;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 812e887..9f09a3d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -54,7 +54,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
// CraftBukkit end
|
||||
this.server = minecraftserver;
|
||||
this.tracker = new EntityTracker(this);
|
||||
- this.manager = new PlayerChunkMap(this, minecraftserver.getPlayerList().o());
|
||||
+ this.manager = new PlayerChunkMap(this, spigotConfig.viewDistance); // Spigot
|
||||
if (this.entitiesById == null) {
|
||||
this.entitiesById = new IntHashMap();
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 9f07e71..97d56bd 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -120,4 +120,11 @@ public class SpigotWorldConfig
|
||||
expMerge = getDouble("merge-radius.exp", 3.0 );
|
||||
log( "Experience Merge Radius: " + expMerge );
|
||||
}
|
||||
+
|
||||
+ public int viewDistance;
|
||||
+ private void viewDistance()
|
||||
+ {
|
||||
+ viewDistance = getInt( "view-distance", Bukkit.getViewDistance() );
|
||||
+ log( "View Distance: " + viewDistance );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
1.8.3.2
|
||||
|
Reference in New Issue
Block a user