aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server')
-rw-r--r--patches/server/1052-Add-FeatureFlag-API.patch18
1 files changed, 15 insertions, 3 deletions
diff --git a/patches/server/1052-Add-FeatureFlag-API.patch b/patches/server/1052-Add-FeatureFlag-API.patch
index 5f3aa9ba14..9c718a7db4 100644
--- a/patches/server/1052-Add-FeatureFlag-API.patch
+++ b/patches/server/1052-Add-FeatureFlag-API.patch
@@ -233,6 +233,19 @@ index 450c63c31d2f5d056d989aa00452231f50c8224d..b9d9f1df2720c301915c8b07c0bdc129
private final NamespacedKey key;
private final Item item;
+diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java
+index d658634ea4468c9dbfb29bc12282441c96358566..fbde94b72063da69cc1a1f7934e069c6c8c0f804 100644
+--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java
++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java
+@@ -18,7 +18,7 @@ import org.bukkit.entity.HumanEntity;
+ import org.bukkit.inventory.InventoryView;
+ import org.bukkit.inventory.MenuType;
+
+-public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>, Handleable<net.minecraft.world.inventory.MenuType<?>> {
++public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>, Handleable<net.minecraft.world.inventory.MenuType<?>>, io.papermc.paper.world.flag.PaperFeatureDependent { // Paper - make FeatureDependant
+
+ private final NamespacedKey key;
+ private final net.minecraft.world.inventory.MenuType<?> handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPack.java b/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPack.java
index 9525a7d4602b9b98dcc5e5e60dbcb628a656ae53..a0c0ad832726dcf9c8c25c1cfce2a6ddf770bf0f 100644
--- a/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPack.java
@@ -310,10 +323,10 @@ index 0000000000000000000000000000000000000000..c3e6b96013f6dd0b784bd867196552d9
+io.papermc.paper.world.flag.PaperFeatureFlagProviderImpl
diff --git a/src/test/java/io/papermc/paper/world/flag/FeatureFlagTest.java b/src/test/java/io/papermc/paper/world/flag/FeatureFlagTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..1fd830b148468e1db84e0e27d54c4fd6449fa9d8
+index 0000000000000000000000000000000000000000..4817040741de8b0e12c96994f59b58681c09852d
--- /dev/null
+++ b/src/test/java/io/papermc/paper/world/flag/FeatureFlagTest.java
-@@ -0,0 +1,99 @@
+@@ -0,0 +1,98 @@
+package io.papermc.paper.world.flag;
+
+import io.papermc.paper.adventure.PaperAdventure;
@@ -380,7 +393,6 @@ index 0000000000000000000000000000000000000000..1fd830b148468e1db84e0e27d54c4fd6
+ static Set<RegistryKey<?>> featureFilteredRegistries() {
+ final Set<RegistryKey<?>> registryKeys = new HashSet<>();
+ for (final ResourceKey filteredRegistry : FeatureElement.FILTERED_REGISTRIES) {
-+ if (filteredRegistry == Registries.MENU) continue; // not applicable atm
+ registryKeys.add(PaperRegistries.registryFromNms(filteredRegistry));
+ }
+ return registryKeys;