-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MrBunnyDc
committed
Sep 22, 2024
1 parent
b8bbad3
commit 1f69915
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
XPlat/src/main/java/de/wonejo/wuidebook/api/util/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
package de.wonejo.wuidebook.api.util; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
|
||
public class Constants { | ||
public static final String MOD_ID = "wuidebook"; | ||
|
||
public static final ResourceLocation CFG_STR_SERIALIZER = ResourceLocationUtils.wuidebook("wuidebook_str_cfg"); | ||
public static final ResourceLocation CFG_INT_SERIALIZER = ResourceLocationUtils.wuidebook("wuidebook_int_cfg"); | ||
public static final ResourceLocation CFG_FLOAT_SERIALIZER = ResourceLocationUtils.wuidebook("wuidebook_float_cfg"); | ||
public static final ResourceLocation CFG_DOUBLE_SERIALIZER = ResourceLocationUtils.wuidebook("wuidebook_double_cfg"); | ||
public static final ResourceLocation CFG_BOOL_SERIALIZER = ResourceLocationUtils.wuidebook("wuidebook_bool_cfg"); | ||
public static final ResourceLocation CFG_LIST_SERIALIZER = ResourceLocationUtils.wuidebook("wuidebook_list_cfg"); | ||
public static final ResourceLocation CFG_COLOR_SERIALIZER = ResourceLocationUtils.wuidebook("wuidebook_color_cfg"); | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
XPlat/src/main/java/de/wonejo/wuidebook/api/util/ResourceLocationUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package de.wonejo.wuidebook.api.util; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class ResourceLocationUtils { | ||
|
||
@NotNull | ||
public static ResourceLocation minecraft (String pPath) { | ||
return ResourceLocation.withDefaultNamespace(pPath); | ||
} | ||
|
||
@NotNull | ||
public static ResourceLocation wuidebook ( String pPath ) { | ||
return ResourceLocation.fromNamespaceAndPath(Constants.MOD_ID, pPath); | ||
} | ||
|
||
@NotNull | ||
public static ResourceLocation common ( String pPath ) { | ||
return ResourceLocation.fromNamespaceAndPath("c", pPath); | ||
} | ||
|
||
} |