Initial work on 1.14 pre-5
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
new file mode 100644
|
||||
index 000000000..2e79b0b5f
|
||||
index 0000000000..2e79b0b5ff
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -253,7 +253,7 @@ index 000000000..2e79b0b5f
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
new file mode 100644
|
||||
index 000000000..db79fe41b
|
||||
index 0000000000..db79fe41b9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -443,7 +443,7 @@ index 000000000..db79fe41b
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
new file mode 100644
|
||||
index 000000000..a73865739
|
||||
index 0000000000..a738657394
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -515,32 +515,32 @@ index 000000000..a73865739
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 64a6a681f..ad9c00bc8 100644
|
||||
index e1ba833f3e..b60956218d 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
|
||||
org.spigotmc.SpigotConfig.registerCommands();
|
||||
// Spigot end
|
||||
+ // Paper start
|
||||
+ try {
|
||||
+ com.destroystokyo.paper.PaperConfig.init((File) options.valueOf("paper-settings"));
|
||||
+ } catch (Exception e) {
|
||||
+ DedicatedServer.LOGGER.error("Unable to load server configuration", e);
|
||||
+ return false;
|
||||
+ }
|
||||
+ com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
+ // Paper end
|
||||
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
|
||||
org.spigotmc.SpigotConfig.registerCommands();
|
||||
// Spigot end
|
||||
+ // Paper start
|
||||
+ try {
|
||||
+ com.destroystokyo.paper.PaperConfig.init((File) options.valueOf("paper-settings"));
|
||||
+ } catch (Exception e) {
|
||||
+ DedicatedServer.LOGGER.error("Unable to load server configuration", e);
|
||||
+ return false;
|
||||
+ }
|
||||
+ com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
+ // Paper end
|
||||
|
||||
DedicatedServer.LOGGER.info("Generating keypair");
|
||||
this.a(MinecraftEncryption.b());
|
||||
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
|
||||
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 9a8bbeea7..cd998fcfb 100644
|
||||
index 43dc487eaa..cec990f357 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
private static final DataWatcherObject<Boolean> aG = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Boolean> aH = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
|
||||
public boolean inChunk;
|
||||
- public int chunkX;
|
||||
- public int chunkY;
|
||||
@@ -548,56 +548,55 @@ index 9a8bbeea7..cd998fcfb 100644
|
||||
+ public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
|
||||
+ public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
|
||||
+ public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
|
||||
public boolean ak;
|
||||
public boolean af;
|
||||
public boolean impulse;
|
||||
public int portalCooldown;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index ee16fac91..b8abd6363 100644
|
||||
index e2a844c786..2ee4069173 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
|
||||
import com.mojang.datafixers.DataFixUtils;
|
||||
@@ -0,0 +0,0 @@ import com.mojang.datafixers.DataFixUtils;
|
||||
import com.mojang.datafixers.types.Type;
|
||||
+
|
||||
+import java.util.Set;
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
+import java.util.Set; // Paper
|
||||
import java.util.UUID;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
|
||||
return new EntityTypes<>(this.a, this.b, this.c, this.d, type);
|
||||
return new EntityTypes<>(this.a, this.b, this.c, this.d, this.e, type, this.f);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ public static Set<MinecraftKey> getEntityNameList() {
|
||||
+ return REGISTRY.keySet();
|
||||
+ return IRegistry.ENTITY_TYPE.keySet();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a84a182b2..9d5b3958b 100644
|
||||
index f31f407fa1..28fa346b7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
private int tickPosition;
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
public boolean populating;
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
+ public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
+
|
||||
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
||||
private boolean guardEntityList; // Spigot
|
||||
public static BlockPosition lastPhysicsProblem; // Spigot
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
|
||||
protected World(IDataManager idatamanager, @Nullable PersistentCollection persistentcollection, WorldData worlddata, WorldProvider worldprovider, MethodProfiler methodprofiler, boolean flag, ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction<World, WorldProvider, IChunkProvider> bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
|
||||
+ this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
|
||||
this.generator = gen;
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3b70a2857..6a44f0d91 100644
|
||||
index 142b4a3a17..60a5ba6c73 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
@@ -606,8 +605,8 @@ index 3b70a2857..6a44f0d91 100644
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
+ com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldData.setDifficulty(difficulty);
|
||||
world.setSpawnFlags(monsters, animals);
|
||||
world.worldData.setDifficulty(config.difficulty);
|
||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
|
||||
}
|
||||
@@ -652,7 +651,7 @@ index 3b70a2857..6a44f0d91 100644
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 76abec66f..a62359ba6 100644
|
||||
index c9668afc65..3e7024780b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
@@ -671,7 +670,7 @@ index 76abec66f..a62359ba6 100644
|
||||
};
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 2578c4957..d3c2abc39 100644
|
||||
index 20597d30c5..222adb40c1 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
||||
|
||||
Reference in New Issue
Block a user