Skip to content

Commit

Permalink
feat: More wood set helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed May 24, 2024
1 parent d222cba commit 7306b81
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;
import net.zepalesque.zenith.api.blockset.util.WoodSetNamed;
import net.zepalesque.zenith.entity.misc.ZenithBoat;
import net.zepalesque.zenith.entity.misc.ZenithChestBoat;
import net.zepalesque.zenith.tile.ZenithHangingSignBlockEntity;
Expand All @@ -23,7 +24,7 @@
/**
* Should implement methods by having the first of each (with the parameters) used as a construction method and the second (without parameters) as a getter function
*/
public abstract class BaseWoodSet implements BlockSet {
public abstract class BaseWoodSet implements BlockSet, WoodSetNamed {

// Blocks

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package net.zepalesque.zenith.api.blockset.util;

public interface WoodSetNamed {

public String logSuffix(boolean isLang);

public String woodSuffix(boolean isLang);

public String treesName(boolean isLang);

public String langIDOverride(boolean isLang);
}
4 changes: 4 additions & 0 deletions src/main/java/net/zepalesque/zenith/util/DatagenUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ public static <T> String getNameLocalized(Supplier<? extends T> object, Registry
public static <T> String getNameLocalized(DeferredHolder<?, ?> holder) {
return getNameLocalized(holder.getId().getPath());
}

public static boolean isVowel(char c) {
return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
}

0 comments on commit 7306b81

Please sign in to comment.