Skip to content

Commit

Permalink
Made ShellPatterns more accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeryn99 committed Dec 19, 2023
1 parent a50115c commit 952ec69
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static ShellPattern next(List<ShellPattern> patterns, ShellPattern curren
* <br> Also assigns the {@link ShellPattern} its parent {@link ShellTheme}'s ID
* @implSpec INTERNAL USE ONLY
* */
private static ShellPattern addDefaultPattern(ResourceLocation themeId, ShellPattern datagenPattern) {
public static ShellPattern addDefaultPattern(ResourceLocation themeId, ShellPattern datagenPattern) {
List<ShellPattern> patternList;
ShellPattern pattern = (ShellPattern) datagenPattern.setThemeId(themeId);
if (DEFAULT_PATTERNS.containsKey(themeId)) {
Expand All @@ -121,17 +121,25 @@ private static ShellPattern addDefaultPattern(ResourceLocation themeId, ShellPat
return pattern;
}

private static ShellPattern addDefaultPattern(ResourceLocation themeId, String patternName, boolean hasEmissiveTexture) {
public static ShellPattern addDefaultPattern(ResourceLocation themeId, String patternName, boolean hasEmissiveTexture) {
ShellPattern pattern = (ShellPattern) new ShellPattern(patternName, new PatternTexture(exteriorTextureLocation(themeId, patternName), hasEmissiveTexture)
, new PatternTexture(interiorTextureLocation(themeId, patternName), hasEmissiveTexture)).setThemeId(themeId);
return addDefaultPattern(themeId, pattern);
}

private static ResourceLocation exteriorTextureLocation(ResourceLocation themeId, String textureName){
public static ResourceLocation exteriorTextureLocation(ResourceLocation themeId, String textureName){
return new ResourceLocation(TardisRefined.MODID, "textures/blockentity/shell/" + themeId.getPath() + "/" + textureName + ".png");
}

private static ResourceLocation interiorTextureLocation(ResourceLocation themeId, String textureName){
public static ResourceLocation exteriorTextureLocation(ResourceLocation themeId, String modid, String textureName){
return new ResourceLocation(modid, "textures/blockentity/shell/" + themeId.getPath() + "/" + textureName + ".png");
}

public static ResourceLocation interiorTextureLocation(ResourceLocation themeId, String modid, String textureName){
return new ResourceLocation(modid, "textures/blockentity/shell/" + themeId.getPath() + "/" + textureName + "_interior.png");
}

public static ResourceLocation interiorTextureLocation(ResourceLocation themeId, String textureName){
return new ResourceLocation(TardisRefined.MODID, "textures/blockentity/shell/" + themeId.getPath() + "/" + textureName + "_interior.png");
}

Expand Down

0 comments on commit 952ec69

Please sign in to comment.