diff --git a/cheetah-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java.patch b/cheetah-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java.patch new file mode 100644 index 0000000..e6790a6 --- /dev/null +++ b/cheetah-server/minecraft-patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java ++++ b/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java +@@ -402,7 +_,7 @@ + shulker.setPos(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); + level.addFreshEntity(shulker); + } +- } else if (name.startsWith("Elytra")) { ++ } else if (name.startsWith("Elytra") && io.papermc.paper.configuration.GlobalConfiguration.get().misc.enableElytraInEndCities) { // Cheetah - Added option to disable elytra in end cities + ItemFrame itemFrame = new ItemFrame(level.getLevel(), pos, this.placeSettings.getRotation().rotate(Direction.SOUTH)); + itemFrame.setItem(new ItemStack(Items.ELYTRA), false); + level.addFreshEntity(itemFrame); diff --git a/cheetah-server/paper-patches/files/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java.patch b/cheetah-server/paper-patches/files/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java.patch new file mode 100644 index 0000000..4839248 --- /dev/null +++ b/cheetah-server/paper-patches/files/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java.patch @@ -0,0 +1,10 @@ +--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java ++++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +@@ -344,6 +_,7 @@ + public IntOr.Default compressionLevel = IntOr.Default.USE_DEFAULT; + @Comment("Defines the leniency distance added on the server to the interaction range of a player when validating interact packets.") + public DoubleOr.Default clientInteractionLeniencyDistance = DoubleOr.Default.USE_DEFAULT; ++ public boolean enableElytraInEndCities = true; // Cheetah - Added option to disable elytra in end cities + } + + public BlockUpdates blockUpdates; diff --git a/patches/server/0014-added-option-to-disable-elytra-in-end-cities.patch b/patches/server/0014-added-option-to-disable-elytra-in-end-cities.patch deleted file mode 100644 index 9f3fa02..0000000 --- a/patches/server/0014-added-option-to-disable-elytra-in-end-cities.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: lukas81298 -Date: Fri, 9 Jun 2023 18:23:30 +0200 -Subject: [PATCH] added option to disable elytra in end cities - - -diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -index 17e23ca4dd2bbfba49ea00aa2b719a95feb931be..6419e1c66f607cab07e0a7292cec00714eeb402d 100644 ---- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -@@ -344,6 +344,7 @@ public class GlobalConfiguration extends ConfigurationPart { - public IntOr.Default compressionLevel = IntOr.Default.USE_DEFAULT; - @Comment("Defines the leniency distance added on the server to the interaction range of a player when validating interact packets.") - public DoubleOr.Default clientInteractionLeniencyDistance = DoubleOr.Default.USE_DEFAULT; -+ public boolean enableElytraInEndCities = true; // Cheetah - Added option to disable elytra in end cities - } - - public BlockUpdates blockUpdates; -diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java b/src/main/java/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java -index 62c51feab91536cc4d3e8826ee64312697301b68..5f1a586cc1110c16f6902be29d7308bffbaf4bd1 100644 ---- a/src/main/java/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java -+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java -@@ -300,7 +300,7 @@ public class EndCityPieces { - entityshulker.setPos((double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D); - world.addFreshEntity(entityshulker); - } -- } else if (metadata.startsWith("Elytra")) { -+ } else if (metadata.startsWith("Elytra") && io.papermc.paper.configuration.GlobalConfiguration.get().misc.enableElytraInEndCities) { // Cheetah - Added option to disable elytra in end cities - ItemFrame entityitemframe = new ItemFrame(world.getLevel(), pos, this.placeSettings.getRotation().rotate(Direction.SOUTH)); - - entityitemframe.setItem(new ItemStack(Items.ELYTRA), false);