3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

Current progress

Dieser Commit ist enthalten in:
Aikar 2020-06-25 00:02:26 -04:00
Ursprung 0ec07fc0ce
Commit e27149bff4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
2 geänderte Dateien mit 39 neuen und 39 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d45118d75526 100644
index 0466cd48f5ccd1479f2909c70654d884dc1e8f24..7bc5bf271e435e1e0d85af133f1352f319f462b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,15 +1,14 @@
@ -16,7 +16,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451
- <artifactId>spigot</artifactId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.15.2-R0.1-SNAPSHOT</version>
<version>1.16.1-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
+ <name>Paper</name>
@ -27,7 +27,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version>
<minecraft.version>1.15.2</minecraft.version>
<minecraft.version>1.16.1</minecraft.version>
@@ -19,16 +18,22 @@
</properties>
@ -56,7 +56,7 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451
<scope>compile</scope>
</dependency>
@@ -50,6 +55,17 @@
<version>7.3.1</version>
<version>8.0.1</version>
<scope>compile</scope>
</dependency>
+ <dependency>
@ -190,18 +190,18 @@ index 9fc92e347f24a0210a9190513e93cba3b6772557..3554314526b3f33ad02df2adfd42d451
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 91e2d0b9d9f698f54b49636944a6282adcff5b4b..3fb78997d8c4d913770a9a6a35f34e2c61b896fa 100644
index 4ac80c20ba970a2078fe62c452e7fdfb8ad0b46e..a5c4b7f28f13f0aad4712912f60ba5fc6785539a 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -186,7 +186,7 @@ public class Main {
}
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
- Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
+ Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -21);
deadline.add(Calendar.DAY_OF_YEAR, -3);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..674096cab190d62622f9947853b056f57d43a2a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java

Datei anzeigen

@ -530,10 +530,10 @@ index 0000000000000000000000000000000000000000..a738657394bcccd859ef260a801736d4
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 87c4b4c6b7793808308c0bfab957f9fd6425f452..beb6b63fa483f0a7b29f5403bebf7ee47b27cd29 100644
index 062a82c37723b7f032103ba2904877ae79b1ae01..5585b5646b5f3650aa3b795be06f920699a85403 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -270,15 +270,15 @@ public class ChunkProviderServer extends IChunkProvider {
@@ -273,15 +273,15 @@ public class ChunkProviderServer extends IChunkProvider {
}
}
@ -543,22 +543,22 @@ index 87c4b4c6b7793808308c0bfab957f9fd6425f452..beb6b63fa483f0a7b29f5403bebf7ee4
+ @Override public boolean a(Entity entity) {
long i = ChunkCoordIntPair.pair(MathHelper.floor(entity.locX()) >> 4, MathHelper.floor(entity.locZ()) >> 4);
return this.a(i, PlayerChunk::b);
return this.a(i, (Function<PlayerChunk, CompletableFuture<Either<Chunk, PlayerChunk.Failure>>>) PlayerChunk::b); // CraftBukkit - decompile error
}
- @Override
- public boolean a(ChunkCoordIntPair chunkcoordintpair) {
+ public final boolean isEntityTickingChunk(ChunkCoordIntPair chunkcoordintpair) { return this.a(chunkcoordintpair); } // Paper - OBFHELPER
+ @Override public boolean a(ChunkCoordIntPair chunkcoordintpair) {
return this.a(chunkcoordintpair.pair(), PlayerChunk::b);
return this.a(chunkcoordintpair.pair(), (Function<PlayerChunk, CompletableFuture<Either<Chunk, PlayerChunk.Failure>>>) PlayerChunk::b); // CraftBukkit - decompile error
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 136d1b50f1cfe71aa5ce1495d9ffdf4a3cbd5aac..9eed98e3796be6d49dc51af9038a7376c94edeee 100644
index 27e6872c675647d7e61040b76183dac4e347a40c..1964130ae411ff7d5e1b456a23629804d294a5d0 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -170,6 +170,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
@@ -148,6 +148,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
+ // Paper start
@ -571,14 +571,14 @@ index 136d1b50f1cfe71aa5ce1495d9ffdf4a3cbd5aac..9eed98e3796be6d49dc51af9038a7376
+ com.destroystokyo.paper.PaperConfig.registerCommands();
+ // Paper end
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
this.setPVP(dedicatedserverproperties.pvp);
this.setAllowFlight(dedicatedserverproperties.allowFlight);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9fddbae24c7cb7b24e3899714ced1375b928654f..f4863852b04c5fa55b79acabe40ce59909b9bbbd 100644
index 390dafff979ebdd99b98db312035d665ab1eabda..2f81613099f3fa8828ce0a20c2cc26d431f208e5 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
@@ -136,9 +136,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
private static final DataWatcherObject<Boolean> aA = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
protected static final DataWatcherObject<EntityPose> POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
public boolean inChunk;
- public int chunkX;
@ -587,23 +587,23 @@ index 9fddbae24c7cb7b24e3899714ced1375b928654f..f4863852b04c5fa55b79acabe40ce599
+ 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
private boolean aB;
public long Z;
public long aa;
public long ab;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 158cc1beb2d6b00642d025a5dd6797c4a20464bd..29e776ca19621b93d5b295d12f0576e6980cf11a 100644
index 62f62c2c98fbaff163d9079091e6f39db2d77fa0..484e78746aa62bb0b12968165bf8e056b27152f3 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -3,6 +3,7 @@ package net.minecraft.server;
import com.mojang.datafixers.DataFixUtils;
import java.util.Collections;
@@ -2,6 +2,7 @@ package net.minecraft.server;
import com.google.common.collect.ImmutableSet;
import java.util.Optional;
+import java.util.Set; // Paper
import java.util.UUID;
import java.util.function.Function;
import java.util.stream.Stream;
@@ -435,4 +436,10 @@ public class EntityTypes<T extends Entity> {
return new EntityTypes<>(this.a, this.b, this.c, this.d, this.e, this.f, this.g);
@@ -463,4 +464,10 @@ public class EntityTypes<T extends Entity> {
return new EntityTypes<>(this.a, this.b, this.d, this.e, this.f, this.g, this.c, this.j, this.h, this.i);
}
}
+
@ -614,10 +614,10 @@ index 158cc1beb2d6b00642d025a5dd6797c4a20464bd..29e776ca19621b93d5b295d12f0576e6
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ad43b48073f5d59e6f6b5b2ec3de8cc9f03f9956..2e1eabba14a3757d03fd90741651001e78c6322f 100644
index 74ad1325727bdc41ed5b2e67058aeaa4fe6db4f2..03dc3dd41015dc210d2781c207261fc310c65519 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -70,6 +70,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -76,6 +76,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public boolean populating;
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
@ -626,27 +626,27 @@ index ad43b48073f5d59e6f6b5b2ec3de8cc9f03f9956..2e1eabba14a3757d03fd90741651001e
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
public static BlockPosition lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
@@ -90,6 +92,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -92,6 +94,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
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
protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, ResourceKey<DimensionManager> resourcekey1, DimensionManager dimensionmanager, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).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 be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b549172bea56ec 100644
index 9c13f39e85b019440cb59bbd736ad9920e2151da..174c63f2c93693aa06a3574dc6dea91c98ea1e25 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -769,6 +769,7 @@ public final class CraftServer implements Server {
@@ -792,6 +792,7 @@ public final class CraftServer implements Server {
}
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(config.difficulty);
world.worldDataServer.setDifficulty(config.difficulty);
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -796,6 +797,7 @@ public final class CraftServer implements Server {
@@ -819,6 +820,7 @@ public final class CraftServer implements Server {
world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns();
}
world.spigotConfig.init(); // Spigot
@ -654,7 +654,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917
}
pluginManager.clearPlugins();
@@ -803,6 +805,7 @@ public final class CraftServer implements Server {
@@ -826,6 +828,7 @@ public final class CraftServer implements Server {
resetRecipes();
reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
@ -662,7 +662,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2000,4 +2003,35 @@ public final class CraftServer implements Server {
@@ -2051,4 +2054,35 @@ public final class CraftServer implements Server {
{
return spigot;
}
@ -699,7 +699,7 @@ index be30f6bf6a978dfe14af1aca1099cb9a6f7ab443..ad1dcf53040695a1b3194efa92b54917
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 3fb78997d8c4d913770a9a6a35f34e2c61b896fa..daa65aaf8c9616e5e058f3337fc4fc0895d13364 100644
index a5c4b7f28f13f0aad4712912f60ba5fc6785539a..3d15661eb1f15f74213ecb7e8eceb1f231ad2c1c 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -129,6 +129,14 @@ public class Main {
@ -718,7 +718,7 @@ index 3fb78997d8c4d913770a9a6a35f34e2c61b896fa..daa65aaf8c9616e5e058f3337fc4fc08
};
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index a52cbba6e681bc96a15a3eea62831a1628f921a7..98ed975a6241395b6119d5b3a62d24329aa1f05b 100644
index 0005d4226467cc25b55f9863eb5b7aaeb4dd6917..5c394d26e2d2dbc5d65e38c1273b7e5d02464f3a 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -39,36 +39,36 @@ public class SpigotWorldConfig