Skip to content

Commit 0d53bfc

Browse files
committed
Fix Leather Armor Overlay For Real This Time
1 parent 7981108 commit 0d53bfc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

conversions/Forwards/src/main/java/com/agentdid127/resourcepack/forwards/impl/textures/ArmorMoverConverter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ public void convert(Pack pack) throws IOException {
5454
for (String material : MATERIALS) {
5555
moveArmorLayers(material, modelsArmorPath, humanoidPath, humanoidLeggingsPath);
5656
if (material.equals("leather")) {
57-
moveLeatherArmorFiles(modelsPath, humanoidPath, humanoidLeggingsPath);
57+
moveLeatherArmorFiles(modelsArmorPath, humanoidPath, humanoidLeggingsPath);
5858
}
5959
}
6060

61+
modelsArmorPath.toFile().delete(); // TODO/NOTE: For some reason, it will only delete "models" folder if I delete this first
6162
modelsPath.toFile().delete();
6263
}
6364

@@ -81,14 +82,14 @@ private void moveArmorLayers(String material, Path modelsArmorPath, Path humanoi
8182
}
8283
}
8384

84-
private void moveLeatherArmorFiles(Path modelsPath, Path humanoidPath, Path humanoidLeggingsPath) throws IOException {
85-
Path overlayLayer1 = modelsPath.resolve("leather_layer_1_overlay.png");
85+
private void moveLeatherArmorFiles(Path modelsArmorPath, Path humanoidPath, Path humanoidLeggingsPath) throws IOException {
86+
Path overlayLayer1 = modelsArmorPath.resolve("leather_layer_1_overlay.png");
8687
ensureFolder(overlayLayer1, humanoidPath);
8788
if (overlayLayer1.toFile().exists()) {
8889
Files.move(overlayLayer1, humanoidPath.resolve("leather_overlay.png"));
8990
}
9091

91-
Path overlayLayer2 = modelsPath.resolve("leather_layer_2_overlay.png");
92+
Path overlayLayer2 = modelsArmorPath.resolve("leather_layer_2_overlay.png");
9293
ensureFolder(overlayLayer2, humanoidLeggingsPath);
9394
if (overlayLayer2.toFile().exists()) {
9495
Files.move(overlayLayer2, humanoidLeggingsPath.resolve("leather_overlay.png"));

0 commit comments

Comments
 (0)