Skip to content

Commit

Permalink
fix pixelmon's missing textures hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Dec 28, 2023
1 parent ae8d50e commit afd082e
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ public static Identifier getTextureId(Block block, String postfix) {
blockToTextureMap.put(pair, new Pair<>(id, attemptNum));
return id;
}
id = model.getQuads(block.getDefaultState(), Direction.DOWN, new Random(42L)).get(0).getSprite().getId();
if (id != null) {
blockToTextureMap.put(pair, new Pair<>(id, attemptNum));
return id;
}
}
}

Expand Down Expand Up @@ -259,6 +264,10 @@ public static Identifier getPlankId(Block block) {
return id;

path = "planks_" + path;
if (namespace.contains("pixelmon") && path.contains("ultra")) {
path = path.replace("ultra_", "").replace("_ultra", "");
path = "ultra_space/" + path;
}
id = new Identifier(namespace, "block/" + path);
path = path.replace("mining", "mine").replace("sorting", "sort").replace("transformation", "trans").replace("dark", "darkwood").replace("alpha_", "alpha_oak_").replace("flowering_pink", "flowerypink").replace("flowering_purple", "floweringpurple");
Identifier id2 = new Identifier(namespace, "block/wood/" + path);
Expand Down Expand Up @@ -299,6 +308,10 @@ public static Identifier getLogId(Block block, String postFix) {
if (namespace.contains("luphieclutteredmod") && path.contains("flowering_log")) {
path = path.replace("flowering_log", "flowering_yellow_log");
}
if (namespace.contains("pixelmon") && path.contains("ultra")) {
path = path.replace("ultra_", "").replace("_ultra", "");
path = "ultra_space/" + path;
}
if (namespace.equals("byg") && path.contains("pedu"))
path = path.replace("pedu", "log");
if (path.contains("log") || path.contains("stem")) {
Expand Down

0 comments on commit afd082e

Please sign in to comment.