diff options
author | Owen1212055 <[email protected]> | 2024-11-18 11:25:15 -0500 |
---|---|---|
committer | Owen1212055 <[email protected]> | 2024-11-18 14:50:39 -0500 |
commit | ed7c913b56183aac508a56fa38819432be6988f8 (patch) | |
tree | 7de3ac2444e48aeeab4c710359df21c470deb2ff | |
parent | 330057ac0d2d869603b7cff5a42b9712e2e409d5 (diff) | |
download | Paper-ed7c913b56183aac508a56fa38819432be6988f8.tar.gz Paper-ed7c913b56183aac508a56fa38819432be6988f8.zip |
Undo diffs
-rw-r--r-- | paper-api-generator/src/main/java/io/papermc/generator/Generators.java | 7 | ||||
-rw-r--r-- | paper-api-generator/src/main/java/io/papermc/generator/types/GeneratedKeyType.java | 6 |
2 files changed, 1 insertions, 12 deletions
diff --git a/paper-api-generator/src/main/java/io/papermc/generator/Generators.java b/paper-api-generator/src/main/java/io/papermc/generator/Generators.java index 9bf5ac92aa..a33d52a696 100644 --- a/paper-api-generator/src/main/java/io/papermc/generator/Generators.java +++ b/paper-api-generator/src/main/java/io/papermc/generator/Generators.java @@ -4,12 +4,8 @@ import io.papermc.generator.types.GeneratedKeyType; import io.papermc.generator.types.GeneratedTagKeyType; import io.papermc.generator.types.SourceGenerator; import io.papermc.generator.types.goal.MobGoalGenerator; -import io.papermc.paper.datacomponent.DataComponentType; import io.papermc.paper.registry.RegistryKey; -import java.util.Set; -import net.minecraft.core.Holder; import net.minecraft.core.Registry; -import net.minecraft.core.component.DataComponents; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; import org.bukkit.Art; @@ -36,10 +32,7 @@ import org.bukkit.inventory.meta.trim.TrimMaterial; import org.bukkit.inventory.meta.trim.TrimPattern; import org.bukkit.map.MapCursor; import org.bukkit.potion.PotionEffectType; -import org.checkerframework.framework.qual.DefaultQualifier; -import org.jspecify.annotations.NonNull; -@DefaultQualifier(NonNull.class) public interface Generators { SourceGenerator[] API = { diff --git a/paper-api-generator/src/main/java/io/papermc/generator/types/GeneratedKeyType.java b/paper-api-generator/src/main/java/io/papermc/generator/types/GeneratedKeyType.java index 3189882222..624ceae475 100644 --- a/paper-api-generator/src/main/java/io/papermc/generator/types/GeneratedKeyType.java +++ b/paper-api-generator/src/main/java/io/papermc/generator/types/GeneratedKeyType.java @@ -139,7 +139,7 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator { final Set<ResourceKey<T>> experimental = this.collectExperimentalKeys(registry); boolean allExperimental = true; - for (final Holder.Reference<T> reference : registry.listElements().filter(this::canPrintKey).sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) { + for (final Holder.Reference<T> reference : registry.listElements().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) { final ResourceKey<T> key = reference.key(); final String keyPath = key.location().getPath(); String fieldName = Formatting.formatKeyAsField(keyPath); @@ -166,10 +166,6 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator { return typeBuilder.addMethod(createMethod.build()).build(); } - protected boolean canPrintKey(Holder.Reference<T> reference) { - return true; - } - // todo at some point this should be per feature data pack not all merged private Set<ResourceKey<T>> collectExperimentalKeys(final Registry<T> registry) { if (FeatureElement.FILTERED_REGISTRIES.contains(registry.key())) { |