Skip to content

Commit

Permalink
chore: enable rich console output
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Sep 5, 2024
1 parent 03da36e commit c637699
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
org.gradle.console=rich
org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class CustomEnchantmentRegistry {

TagKey<Enchantment> exclusive_with_tags;
List<TypedKey<Enchantment>> exclusive_with = List.of();

public CustomEnchantmentRegistry(String name, TagKey<ItemType> supported_item_tags, int max_level) {
this.key = Key.key(NAMESPACE, name);
this.description = Component.translatable(String.format(TRANSLATE_KEY, name));
Expand Down Expand Up @@ -67,15 +67,15 @@ public CustomEnchantmentRegistry exclusive_with(TagKey<Enchantment> enchantment_
*/
public RegistryKeySet<Enchantment> exclusive_with(RegistryFreezeEvent<Enchantment, EnchantmentRegistryEntry.Builder> freezeEvent) {
if(this.exclusive_with_tags != null) {
return freezeEvent.getOrCreateTag(exclusive_with_tags);
return freezeEvent.getOrCreateTag(exclusive_with_tags);
} else {
return RegistrySet.keySet(RegistryKey.ENCHANTMENT, this.exclusive_with);
}
}

/**
* Register the enchantment in the registry
*
*
* @see https://docs.papermc.io/paper/dev/registries#create-new-entries
*/
public void register(RegistryFreezeEvent<Enchantment, EnchantmentRegistryEntry.Builder> freezeEvent){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public AngelRegistry(RegistryFreezeEvent<Enchantment, EnchantmentRegistryEntry.B
this.exclusive_with(List.of(TypedKey.create(RegistryKey.ENCHANTMENT, Key.key(NAMESPACE, "wings"))))
.register(freezeEvent);
}

}

0 comments on commit c637699

Please sign in to comment.