2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2021-11-27 09:11:43 +01:00
|
|
|
From: MiniDigger <admin@benndorf.dev>
|
2021-06-11 14:02:28 +02:00
|
|
|
Date: Wed, 29 Apr 2020 02:09:17 +0200
|
|
|
|
Subject: [PATCH] Allow delegation to vanilla chunk gen
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
Updated Upstream (Bukkit/CraftBukkit) (#10034)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
f29cb801 Separate checkstyle-suppressions file is not required
86f99bbe SPIGOT-7540, PR-946: Add ServerTickManager API
d4119585 SPIGOT-6903, PR-945: Add BlockData#getMapColor
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries
CraftBukkit Changes:
b3b43a6ad Add Checkstyle check for unused imports
13fb3358e SPIGOT-7544: Scoreboard#getEntries() doesn't get entries but class names
3dda99c06 SPIGOT-7540, PR-1312: Add ServerTickManager API
2ab4508c0 SPIGOT-6903, PR-1311: Add BlockData#getMapColor
1dbdbbed4 PR-1238: Remove unnecessary sign ticking
659728d2a MC-264285, SPIGOT-7439, PR-1237: Fix unbreakable flint and steel is completely consumed while igniting creeper
e37e29ce0 Increase outdated build delay
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
e11fbb9d7 Upgrade MySQL driver
9f3a0bd2a Attempt upgrade of resolver libraries
60d16d7ca PR-1306: Centralize Bukkit and Minecraft entity conversion
Spigot Changes:
06d602e7 Rebuild patches
2023-12-17 03:09:28 +01:00
|
|
|
index 2e29da775e60c149d2c251d78ee7c60b494215a4..c5ac78c4a4711e9c44d5eb7f66b28f448bcda63a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
Updated Upstream (Bukkit/CraftBukkit) (#10034)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
f29cb801 Separate checkstyle-suppressions file is not required
86f99bbe SPIGOT-7540, PR-946: Add ServerTickManager API
d4119585 SPIGOT-6903, PR-945: Add BlockData#getMapColor
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries
CraftBukkit Changes:
b3b43a6ad Add Checkstyle check for unused imports
13fb3358e SPIGOT-7544: Scoreboard#getEntries() doesn't get entries but class names
3dda99c06 SPIGOT-7540, PR-1312: Add ServerTickManager API
2ab4508c0 SPIGOT-6903, PR-1311: Add BlockData#getMapColor
1dbdbbed4 PR-1238: Remove unnecessary sign ticking
659728d2a MC-264285, SPIGOT-7439, PR-1237: Fix unbreakable flint and steel is completely consumed while igniting creeper
e37e29ce0 Increase outdated build delay
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
e11fbb9d7 Upgrade MySQL driver
9f3a0bd2a Attempt upgrade of resolver libraries
60d16d7ca PR-1306: Centralize Bukkit and Minecraft entity conversion
Spigot Changes:
06d602e7 Rebuild patches
2023-12-17 03:09:28 +01:00
|
|
|
@@ -2056,6 +2056,24 @@ public final class Bukkit {
|
2021-06-11 14:02:28 +02:00
|
|
|
return server.createChunkData(world);
|
|
|
|
}
|
2021-12-05 11:27:20 +01:00
|
|
|
|
2021-06-11 14:02:28 +02:00
|
|
|
+ // Paper start
|
|
|
|
+ /**
|
|
|
|
+ * Create a ChunkData for use in a generator, that is populated by the vanilla generator for that world
|
|
|
|
+ *
|
|
|
|
+ * @param world the world to create the ChunkData for
|
|
|
|
+ * @param x the x coordinate of the chunk
|
|
|
|
+ * @param z the z coordinate of the chunk
|
|
|
|
+ * @return a new ChunkData for the world
|
2021-12-05 11:27:20 +01:00
|
|
|
+ * @deprecated The new multi-stage worldgen API allows a similar effect by overriding all of the "shouldGenerate..." methods to
|
|
|
|
+ * return true, and then modifying the chunkdata in a later stage such as surface or bedrock generation.
|
2021-06-11 14:02:28 +02:00
|
|
|
+ */
|
|
|
|
+ @NotNull
|
2021-12-05 11:27:20 +01:00
|
|
|
+ @Deprecated(forRemoval = true)
|
2021-06-11 14:02:28 +02:00
|
|
|
+ public static ChunkGenerator.ChunkData createVanillaChunkData(@NotNull World world, int x, int z) {
|
|
|
|
+ return server.createVanillaChunkData(world, x, z);
|
|
|
|
+ }
|
|
|
|
+ // Paper stop
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Creates a boss bar instance to display to players. The progress
|
|
|
|
* defaults to 1.0
|
|
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
Updated Upstream (Bukkit/CraftBukkit) (#10034)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
f29cb801 Separate checkstyle-suppressions file is not required
86f99bbe SPIGOT-7540, PR-946: Add ServerTickManager API
d4119585 SPIGOT-6903, PR-945: Add BlockData#getMapColor
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries
CraftBukkit Changes:
b3b43a6ad Add Checkstyle check for unused imports
13fb3358e SPIGOT-7544: Scoreboard#getEntries() doesn't get entries but class names
3dda99c06 SPIGOT-7540, PR-1312: Add ServerTickManager API
2ab4508c0 SPIGOT-6903, PR-1311: Add BlockData#getMapColor
1dbdbbed4 PR-1238: Remove unnecessary sign ticking
659728d2a MC-264285, SPIGOT-7439, PR-1237: Fix unbreakable flint and steel is completely consumed while igniting creeper
e37e29ce0 Increase outdated build delay
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
e11fbb9d7 Upgrade MySQL driver
9f3a0bd2a Attempt upgrade of resolver libraries
60d16d7ca PR-1306: Centralize Bukkit and Minecraft entity conversion
Spigot Changes:
06d602e7 Rebuild patches
2023-12-17 03:09:28 +01:00
|
|
|
index 61701b6e8291cb5816b0a7eb511152eed3db43e8..d2c4887184661b68726ff8539d022b8dee8313fa 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
Updated Upstream (Bukkit/CraftBukkit) (#10034)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
f29cb801 Separate checkstyle-suppressions file is not required
86f99bbe SPIGOT-7540, PR-946: Add ServerTickManager API
d4119585 SPIGOT-6903, PR-945: Add BlockData#getMapColor
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries
CraftBukkit Changes:
b3b43a6ad Add Checkstyle check for unused imports
13fb3358e SPIGOT-7544: Scoreboard#getEntries() doesn't get entries but class names
3dda99c06 SPIGOT-7540, PR-1312: Add ServerTickManager API
2ab4508c0 SPIGOT-6903, PR-1311: Add BlockData#getMapColor
1dbdbbed4 PR-1238: Remove unnecessary sign ticking
659728d2a MC-264285, SPIGOT-7439, PR-1237: Fix unbreakable flint and steel is completely consumed while igniting creeper
e37e29ce0 Increase outdated build delay
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
e11fbb9d7 Upgrade MySQL driver
9f3a0bd2a Attempt upgrade of resolver libraries
60d16d7ca PR-1306: Centralize Bukkit and Minecraft entity conversion
Spigot Changes:
06d602e7 Rebuild patches
2023-12-17 03:09:28 +01:00
|
|
|
@@ -1738,6 +1738,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
2021-06-11 14:02:28 +02:00
|
|
|
@NotNull
|
|
|
|
public ChunkGenerator.ChunkData createChunkData(@NotNull World world);
|
2021-12-05 11:27:20 +01:00
|
|
|
|
2021-06-11 14:02:28 +02:00
|
|
|
+ // Paper start
|
|
|
|
+ /**
|
2021-12-05 11:27:20 +01:00
|
|
|
+ * Create a ChunkData for use in a generator, that is populated by the vanilla generator for that world.
|
2021-06-11 14:02:28 +02:00
|
|
|
+ *
|
|
|
|
+ * @param world the world to create the ChunkData for
|
|
|
|
+ * @param x the x coordinate of the chunk
|
|
|
|
+ * @param z the z coordinate of the chunk
|
|
|
|
+ * @return a new ChunkData for the world
|
2021-12-05 11:27:20 +01:00
|
|
|
+ * @deprecated The new multi-stage worldgen API allows a similar effect by overriding all of the "shouldGenerate..." methods to
|
|
|
|
+ * return true, and then modifying the chunkdata in a later stage such as surface or bedrock generation.
|
2021-06-11 14:02:28 +02:00
|
|
|
+ */
|
|
|
|
+ @NotNull
|
2021-12-05 11:27:20 +01:00
|
|
|
+ @Deprecated(forRemoval = true)
|
2021-06-11 14:02:28 +02:00
|
|
|
+ ChunkGenerator.ChunkData createVanillaChunkData(@NotNull World world, int x, int z);
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
/**
|
|
|
|
* Creates a boss bar instance to display to players. The progress
|
|
|
|
* defaults to 1.0
|
|
|
|
diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
2023-03-31 06:09:13 +02:00
|
|
|
index 7e7a53b41013f1bf8956c0e278820f18d77b2f0d..c942b7101a38ac7dc70e11e87afa1f9210000bc1 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
|
|
|
+++ b/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
2022-12-03 19:19:09 +01:00
|
|
|
@@ -577,6 +577,22 @@ public abstract class ChunkGenerator {
|
2021-06-11 14:02:28 +02:00
|
|
|
return false;
|
|
|
|
}
|
2021-12-05 11:27:20 +01:00
|
|
|
|
2021-06-11 14:02:28 +02:00
|
|
|
+ // Paper start
|
|
|
|
+ /**
|
|
|
|
+ * Create a ChunkData for use in a generator, that is populated by the vanilla generator for that world
|
|
|
|
+ *
|
|
|
|
+ * @param world the world to create the ChunkData for
|
|
|
|
+ * @param x the x coordinate of the chunk
|
|
|
|
+ * @param z the z coordinate of the chunk
|
|
|
|
+ * @return a new ChunkData for the world
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+ @NotNull
|
|
|
|
+ public ChunkData createVanillaChunkData(@NotNull World world, int x, int z) {
|
|
|
|
+ return Bukkit.getServer().createVanillaChunkData(world, x, z);
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
/**
|
2022-12-03 19:19:09 +01:00
|
|
|
* Gets if the server should generate Vanilla structures after this
|
|
|
|
* ChunkGenerator.
|