Compare commits
7 Commits
release-41
...
release-47
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c997c2e0c | ||
|
|
8c336c7e8e | ||
|
|
af9f9f76f3 | ||
|
|
ed191511cf | ||
|
|
f0e1e58914 | ||
|
|
6bf0230eb6 | ||
|
|
11623bf432 |
@@ -1,2 +1,2 @@
|
||||
purpurCommit = 68117a4e35802c17c89eb0b8ff993d08a8e2bd66
|
||||
pufferfishCommit = 19a70d2ca38093d36f233cb3b590f4d28b85c078
|
||||
purpurCommit = d6cfa8f939efaa1e8d91b0193ee6f0495a94bd5b
|
||||
pufferfishCommit = 845c015664150048d0a7c02b706fe1c05a91ac16
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
group = org.plazmamc.plazma
|
||||
version = 1.19.4-R0.1-SNAPSHOT
|
||||
|
||||
paperCommit = bcd8dc2c1189293c4fc0b57048f0f0668c1b7e60
|
||||
paperCommit = 2eda177116e93a1ef5b2c7c4e88f76e6e7a16ce8
|
||||
|
||||
org.gradle.caching = true
|
||||
org.gradle.parallel = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 17 May 2023 05:33:40 +0000
|
||||
Date: Wed, 31 May 2023 12:39:00 +0000
|
||||
Subject: [PATCH] Pufferfish API Changes
|
||||
|
||||
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 17 May 2023 05:41:48 +0000
|
||||
Date: Wed, 31 May 2023 12:46:00 +0000
|
||||
Subject: [PATCH] Purpur API Changes
|
||||
|
||||
Original: PurpurMC
|
||||
@@ -1171,10 +1171,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 9cd49bf6db451af67cd15c8857d7bf51a4e1a67a..838f32eb3397d847071f54648dbac02c35d621cf 100644
|
||||
index 88c4885569d2b8b22fce55601d50608ac8e9388c..dc437885404ae147a06cac653e519a4674a9a951 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3057,4 +3057,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3068,4 +3068,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 17 May 2023 05:33:40 +0000
|
||||
Date: Wed, 31 May 2023 12:39:00 +0000
|
||||
Subject: [PATCH] Pufferfish Server Changes
|
||||
|
||||
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
@@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 9cf389defdaeb887e9cad4f0fed3f3b95667b238..b41b186397d013c19436c345be98b785d4bd0295 100644
|
||||
index 4f2fa65ade89c5703451dad4f80eeef162b277d1..3ee1160c796cc86db9bc9438055b307239e9a8f7 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -7,8 +7,12 @@ plugins {
|
||||
@@ -3190,7 +3190,7 @@ index d190bad5d287766ed4165ed827d9901a9d878687..13594b96cc8f451723c3598ef302ccee
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..b5e118456af6421ae3f85cb8232dc97a8b2d46b7 100644
|
||||
index 854865f28bcae0fb0c17717c914687f78e951e21..c6297917e94f5a8b4b1447b2c29c44b806ccaff6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -27,6 +27,7 @@ public class LevelChunkSection {
|
||||
@@ -3217,7 +3217,7 @@ index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..b5e118456af6421ae3f85cb8232dc97a
|
||||
}
|
||||
|
||||
this.updateKnownBlockInfo(x | (z << 4) | (y << 8), iblockdata1, state); // Paper
|
||||
@@ -260,6 +263,7 @@ public class LevelChunkSection {
|
||||
@@ -261,6 +264,7 @@ public class LevelChunkSection {
|
||||
if (fluid.isRandomlyTicking()) {
|
||||
this.tickingFluidCount = (short) (this.tickingFluidCount + 1);
|
||||
}
|
||||
@@ -3431,10 +3431,10 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..42142c512b12e5b269c19f1e821c50e7
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e769f7b0904814ee63e2a73dca57e5dc33382fba..e38391da44a1b5e3b845eba2d80453021a1e0c25 100644
|
||||
index 894c0d5bfa001def4374b657e3eb8f15a0caa1e9..a49520fbb3cbce866338c964dd0aadbd113bf411 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -259,7 +259,7 @@ import javax.annotation.Nullable; // Paper
|
||||
import javax.annotation.Nonnull; // Paper
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
@@ -3443,7 +3443,7 @@ index e769f7b0904814ee63e2a73dca57e5dc33382fba..e38391da44a1b5e3b845eba2d8045302
|
||||
private final String serverVersion;
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
@@ -1040,6 +1040,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1042,6 +1042,11 @@ public final class CraftServer implements Server {
|
||||
plugin.getPluginMeta().getDisplayName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
||||
));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 17 May 2023 05:41:47 +0000
|
||||
Date: Wed, 31 May 2023 12:46:00 +0000
|
||||
Subject: [PATCH] Purpur Server Changes
|
||||
|
||||
Original: PurpurMC
|
||||
@@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b41b186397d013c19436c345be98b785d4bd0295..22470f0ab8354a9f31a0f195f3fe80f2f5ee2f0e 100644
|
||||
index 3ee1160c796cc86db9bc9438055b307239e9a8f7..9c01005751c0088f560f96401cdfdebbbda4e7ec 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -7,12 +7,8 @@ plugins {
|
||||
@@ -3620,7 +3620,7 @@ index 9ddbfcf80d9a381dace78a62880f85a4d767e0eb..7383c7d3820dce06108eaafd236a7c6c
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5c21de0d48fba88c3164b72e0eb624706b683fab..c27e455321951e76e4818fec0e64301f5620dbf6 100644
|
||||
index 92e758a286a5db079c32d53cc52c8a422457daef..ff56981a03b55f9ee1ec8ad36adaf9849b2c914b 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -469,6 +469,7 @@ public abstract class PlayerList {
|
||||
@@ -18061,37 +18061,31 @@ index a6c25647fb37f59307de0d390f8e8cf55504d7d3..52aae8bd4023b2bb48f12983f54b20fa
|
||||
world.scheduleTick(pos, this, 1);
|
||||
return super.updateShape(state, direction, neighborState, world, pos, neighborPos);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f13809744 100644
|
||||
index 6fab2b69a0af298bd00b309efcd6aa8399e23d1f..4f7b21caa123ea7896788fd25133d8de3ab1ccaf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -228,26 +228,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -228,20 +228,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
ItemStack itemstack = player.getItemInHand(hand);
|
||||
|
||||
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
|
||||
- if (i < 7 && !world.isClientSide) {
|
||||
- // Paper start - EntityChangeBlockEvent
|
||||
- double rand = world.getRandom().nextDouble();
|
||||
- BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
|
||||
- if (dummyBlockState == null) {
|
||||
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
|
||||
- // Paper start - handle cancelled events
|
||||
- if (iblockdata1 == null) {
|
||||
- return InteractionResult.PASS;
|
||||
- }
|
||||
- if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
|
||||
- return InteractionResult.sidedSuccess(world.isClientSide);
|
||||
- }
|
||||
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
|
||||
- // Paper end
|
||||
-
|
||||
+ // Purpur start
|
||||
+ BlockState newState = process(i, state, world, itemstack, pos, player);
|
||||
+ if (newState == null) {
|
||||
+ return InteractionResult.PASS;
|
||||
+ }
|
||||
|
||||
- world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||
- player.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
|
||||
- if (!player.getAbilities().instabuild) {
|
||||
- itemstack.shrink(1);
|
||||
- }
|
||||
+ // Purpur start
|
||||
+ BlockState newState = process(i, state, world, itemstack, pos, player);
|
||||
+ if (newState == null) {
|
||||
+ return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
+ if (world.purpurConfig.composterBulkProcess && player.isShiftKeyDown() && newState != state) {
|
||||
+ BlockState oldState;
|
||||
+ int oldCount, newCount, oldLevel, newLevel;
|
||||
@@ -18106,28 +18100,22 @@ index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f
|
||||
+ newCount = itemstack.getCount();
|
||||
+ newLevel = newState.getValue(ComposterBlock.LEVEL);
|
||||
+ } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel || newState != oldState));
|
||||
+ }
|
||||
}
|
||||
+ // Purpur end
|
||||
|
||||
return InteractionResult.sidedSuccess(world.isClientSide);
|
||||
} else if (i == 8) {
|
||||
ComposterBlock.extractProduce(player, state, world, pos);
|
||||
@@ -257,6 +259,32 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -252,6 +260,26 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ private static BlockState process(int level, BlockState state, Level world, ItemStack itemstack, BlockPos pos, Player player) {
|
||||
+ if (level < 7 && !world.isClientSide) {
|
||||
+ // Paper start - EntityChangeBlockEvent
|
||||
+ double rand = world.getRandom().nextDouble();
|
||||
+ BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
|
||||
+ if (dummyBlockState == null) {
|
||||
+ return dummyBlockState;
|
||||
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
|
||||
+ // Paper start - handle cancelled events
|
||||
+ if (iblockdata1 == null) {
|
||||
+ return iblockdata1;
|
||||
+ }
|
||||
+ if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
|
||||
+ return state;
|
||||
+ }
|
||||
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
|
||||
+ // Paper end
|
||||
+
|
||||
+ world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||
@@ -18135,7 +18123,7 @@ index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f
|
||||
+ if (!player.getAbilities().instabuild) {
|
||||
+ itemstack.shrink(1);
|
||||
+ }
|
||||
+ return dummyBlockState;
|
||||
+ return iblockdata1;
|
||||
+ }
|
||||
+ return state;
|
||||
+ }
|
||||
@@ -20240,10 +20228,10 @@ index 714afc98b5150907b45a00060be4e41582333204..312a6d90c0a09570aef24c205dc2ff27
|
||||
+ // Purpur end - OfflinePlayer API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147fb14dbad 100644
|
||||
index a49520fbb3cbce866338c964dd0aadbd113bf411..3f80b16c8d69f284a26b16cf2513a955005bf458 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -259,7 +259,7 @@ import javax.annotation.Nullable; // Paper
|
||||
import javax.annotation.Nonnull; // Paper
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
@@ -20252,7 +20240,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
private final String serverVersion;
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
@@ -317,6 +317,20 @@ public final class CraftServer implements Server {
|
||||
@@ -319,6 +319,20 @@ public final class CraftServer implements Server {
|
||||
this.structureManager = new CraftStructureManager(console.getStructureManager());
|
||||
|
||||
Bukkit.setServer(this);
|
||||
@@ -20273,7 +20261,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
|
||||
// Register all the Enchantments and PotionTypes now so we can stop new registration immediately after
|
||||
Enchantments.SHARPNESS.getClass();
|
||||
@@ -957,6 +971,7 @@ public final class CraftServer implements Server {
|
||||
@@ -959,6 +973,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
@@ -20281,7 +20269,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||
@@ -972,6 +987,7 @@ public final class CraftServer implements Server {
|
||||
@@ -974,6 +989,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
world.spigotConfig.init(); // Spigot
|
||||
@@ -20289,7 +20277,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
}
|
||||
|
||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||
@@ -987,6 +1003,7 @@ public final class CraftServer implements Server {
|
||||
@@ -989,6 +1005,7 @@ public final class CraftServer implements Server {
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
||||
@@ -20297,7 +20285,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -1429,6 +1446,55 @@ public final class CraftServer implements Server {
|
||||
@@ -1431,6 +1448,55 @@ public final class CraftServer implements Server {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -20353,7 +20341,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
@Override
|
||||
public List<Recipe> getRecipesFor(ItemStack result) {
|
||||
Validate.notNull(result, "Result cannot be null");
|
||||
@@ -2700,6 +2766,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2702,6 +2768,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public double[] getTPS() {
|
||||
return new double[] {
|
||||
@@ -20361,7 +20349,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(),
|
||||
net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
@@ -2746,6 +2813,18 @@ public final class CraftServer implements Server {
|
||||
@@ -2748,6 +2815,18 @@ public final class CraftServer implements Server {
|
||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
}
|
||||
|
||||
@@ -20380,7 +20368,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
@Override
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
@@ -2921,4 +3000,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2961,4 +3040,16 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
// Paper end
|
||||
@@ -20398,10 +20386,10 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 8d3a32a0538a6065fd0725721ab8a1a011c4d64a..3013aeb442799aba5b2ae45edcb3c2c72a18a740 100644
|
||||
index dafd2c85f89d8822e50db63c21631199c69a97a0..39a2ff8c34f995ab860aadc24d24136d602af646 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2249,6 +2249,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2282,6 +2282,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight());
|
||||
}
|
||||
|
||||
@@ -20801,10 +20789,10 @@ index 4d7a2c4c1001aefe9fcd4be8dbcb414f721bfff9..2c7716a9d65ebda209a144b82c2126b6
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0c8945c9e 100644
|
||||
index 5f0146255b050dfc873789e7dd4bc1dc4a929f02..69fe6480a52dca86b09a331345347e88f77a298d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -533,10 +533,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -534,10 +534,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setPlayerListName(String name) {
|
||||
@@ -20821,7 +20809,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
|
||||
for (ServerPlayer player : (List<ServerPlayer>) server.getHandle().players) {
|
||||
if (player.getBukkitEntity().canSee(this)) {
|
||||
player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
|
||||
@@ -1357,6 +1362,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1358,6 +1363,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API
|
||||
@@ -20832,7 +20820,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2404,6 +2413,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2405,6 +2414,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.getHandle().getAbilities().walkingSpeed * 2f;
|
||||
}
|
||||
|
||||
@@ -20861,7 +20849,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
|
||||
private void validateSpeed(float value) {
|
||||
if (value < 0) {
|
||||
if (value < -1f) {
|
||||
@@ -3196,4 +3227,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3180,4 +3211,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
||||
60
patches/server/0003-MC-Dev-fixes.patch
Normal file
60
patches/server/0003-MC-Dev-fixes.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: IPECTER <ipectert@gmail.com>
|
||||
Date: Tue, 30 May 2023 12:12:29 +0900
|
||||
Subject: [PATCH] MC-Dev-fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||
index 75f1d1f06978d836aab5ebbfe8f7d1e0ca5a95b6..89d70a992e0bcc8e7292c4f736470eafd8747b24 100644
|
||||
--- a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||
+++ b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||
@@ -71,14 +71,14 @@ public class LeavesFix extends DataFix {
|
||||
return this.fixTypeEverywhereTyped("Leaves fix", type, (typed) -> {
|
||||
return typed.updateTyped(opticFinder, (typedx) -> {
|
||||
int[] is = new int[]{0};
|
||||
- Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed) -> {
|
||||
- Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed.getAllTyped(opticFinder3).stream().map((typedx) -> {
|
||||
- return new LeavesFix.LeavesSection(typedx, this.getInputSchema());
|
||||
+ Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed2x) -> {
|
||||
+ Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed2x.getAllTyped(opticFinder3).stream().map((typedx2) -> {
|
||||
+ return new LeavesFix.LeavesSection(typedx2, this.getInputSchema());
|
||||
}).collect(Collectors.toMap(LeavesFix.Section::getIndex, (leavesSection) -> {
|
||||
return leavesSection;
|
||||
})));
|
||||
if (int2ObjectMap.values().stream().allMatch(LeavesFix.Section::isSkippable)) {
|
||||
- return typed;
|
||||
+ return typed2x;
|
||||
} else {
|
||||
List<IntSet> list = Lists.newArrayList();
|
||||
|
||||
@@ -134,8 +134,8 @@ public class LeavesFix extends DataFix {
|
||||
}
|
||||
}
|
||||
|
||||
- return typed.updateTyped(opticFinder3, (typedx) -> {
|
||||
- return int2ObjectMap.get(typedx.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx);
|
||||
+ return typed.updateTyped(opticFinder3, (typedx2) -> {
|
||||
+ return int2ObjectMap.get(typedx2.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx2);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -298,8 +298,8 @@ public class LeavesFix extends DataFix {
|
||||
throw new IllegalStateException("Block state type is not what was expected.");
|
||||
} else {
|
||||
Optional<List<Pair<String, Dynamic<?>>>> optional = typed.getOptional(this.paletteFinder);
|
||||
- this.palette = optional.map((list) -> {
|
||||
- return list.stream().map(Pair::getSecond).collect(Collectors.toList());
|
||||
+ this.palette = (java.util.List)optional.map((list) -> {
|
||||
+ return (java.util.List)list.stream().map(Pair::getSecond).collect(Collectors.toList());
|
||||
}).orElse(ImmutableList.of());
|
||||
Dynamic<?> dynamic = typed.get(DSL.remainderFinder());
|
||||
this.index = dynamic.get("Y").asInt(0);
|
||||
@@ -321,7 +321,7 @@ public class LeavesFix extends DataFix {
|
||||
public Typed<?> write(Typed<?> typed) {
|
||||
return this.isSkippable() ? typed : typed.update(DSL.remainderFinder(), (dynamic) -> {
|
||||
return dynamic.set("BlockStates", dynamic.createLongList(Arrays.stream(this.storage.getRaw())));
|
||||
- }).set(this.paletteFinder, this.palette.stream().map((dynamic) -> {
|
||||
+ }).set(this.paletteFinder, (java.util.List)this.palette.stream().map((dynamic) -> {
|
||||
return Pair.of(References.BLOCK_STATE.typeName(), dynamic);
|
||||
}).collect(Collectors.toList()));
|
||||
}
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 22470f0ab8354a9f31a0f195f3fe80f2f5ee2f0e..dc89b3a8956af69fa71a2bfa17c22aee6c5e9edf 100644
|
||||
index 9c01005751c0088f560f96401cdfdebbbda4e7ec..46fda579a95f9ab92a1ba61cad8218024a722208 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -7,7 +7,7 @@ plugins {
|
||||
@@ -245,10 +245,10 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..d72f61f545c3929825e628607b85e0d2
|
||||
|
||||
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e5bac6bc792196226f975e7f3dd8f147fb14dbad..4ca714c797e42102e2cd65ba5176ff20e6e5d0ca 100644
|
||||
index 3f80b16c8d69f284a26b16cf2513a955005bf458..26c4f8da23bf83abf2e78894b731312028bed191 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -259,7 +259,7 @@ import javax.annotation.Nullable; // Paper
|
||||
import javax.annotation.Nonnull; // Paper
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
@@ -300,10 +300,10 @@ index 92b440b24c6b083f81837611d08fbd6773a2a6e6..058449f24eb3260dc230dad2a0b4c552
|
||||
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
|
||||
this.generator = gen;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4ca714c797e42102e2cd65ba5176ff20e6e5d0ca..7ab657fba87964db3dc7d6b4ba2d7f635e9f1f17 100644
|
||||
index 26c4f8da23bf83abf2e78894b731312028bed191..bb5ec38711f369ffcbd184b4e144bc0d8d576013 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -971,6 +971,7 @@ public final class CraftServer implements Server {
|
||||
@@ -973,6 +973,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
@@ -311,7 +311,7 @@ index 4ca714c797e42102e2cd65ba5176ff20e6e5d0ca..7ab657fba87964db3dc7d6b4ba2d7f63
|
||||
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||
@@ -2813,6 +2814,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2815,6 +2816,13 @@ public final class CraftServer implements Server {
|
||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
}
|
||||
|
||||
@@ -261,10 +261,10 @@ index 1ea3012995c738c67b31e997c138f824f9e69ba1..8ed00a650b712cbf4bc8796165a539d7
|
||||
this.enableStatus = this.get("enable-status", true);
|
||||
this.hideOnlinePlayers = this.get("hide-online-players", false);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7ab657fba87964db3dc7d6b4ba2d7f635e9f1f17..75290e5f555f1401b1b6904e8a44c97332bbd01f 100644
|
||||
index bb5ec38711f369ffcbd184b4e144bc0d8d576013..5df6fd278a6555e483ea4ebc4e9625907585f77f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -347,7 +347,7 @@ public final class CraftServer implements Server {
|
||||
@@ -349,7 +349,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.configuration.options().copyDefaults(true);
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add permission to bypass reducedDebugInfo gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c27e455321951e76e4818fec0e64301f5620dbf6..7bfba4d638cd42cdd98a22d87effe9a3be005315 100644
|
||||
index ff56981a03b55f9ee1ec8ad36adaf9849b2c914b..b22b86d7f226e0e24d6be27ea33ec9d690f8f238 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -275,7 +275,7 @@ public abstract class PlayerList {
|
||||
@@ -103,7 +103,7 @@ index 8f911f589bf04902e38e2c625d84ba0c47cbd9ee..b15de37a06c3efb1c4bc790ccb23ebff
|
||||
if (packet == null || this.processedDisconnect) { // Spigot
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 7bfba4d638cd42cdd98a22d87effe9a3be005315..f89d66d65b39324011718068840295bb77d2a3e2 100644
|
||||
index b22b86d7f226e0e24d6be27ea33ec9d690f8f238..022da50912d357581b2132cf57e1a767e436022c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1464,7 +1464,7 @@ public abstract class PlayerList {
|
||||
@@ -7,7 +7,7 @@ Original: frikinjay/let-me-despawn
|
||||
Copyright (C) 2023 frikinjay
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 3a365d7efd439cb8ddb99381bd714fb48896f4d2..e440cba3c4cd169e9771cc2f3c19b4c9861a640e 100644
|
||||
index 3a365d7efd439cb8ddb99381bd714fb48896f4d2..b6d27332eb151bdf408909b241c493da54841c8e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -885,7 +885,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
1235
patches/server/0040-Reduce-allocations.patch
Normal file
1235
patches/server/0040-Reduce-allocations.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user