From f9bbc3a73c78f5f339bf927849d004055648fe71 Mon Sep 17 00:00:00 2001 From: Patbox Date: Tue, 15 Oct 2024 23:08:26 +0200 Subject: [PATCH] Move shader to overlay, so it won't load on 1.21.2 --- .../resourcepack/impl/generation/DefaultRPBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/polymer-resource-pack/src/main/java/eu/pb4/polymer/resourcepack/impl/generation/DefaultRPBuilder.java b/polymer-resource-pack/src/main/java/eu/pb4/polymer/resourcepack/impl/generation/DefaultRPBuilder.java index 21f910e7..34fae7d1 100644 --- a/polymer-resource-pack/src/main/java/eu/pb4/polymer/resourcepack/impl/generation/DefaultRPBuilder.java +++ b/polymer-resource-pack/src/main/java/eu/pb4/polymer/resourcepack/impl/generation/DefaultRPBuilder.java @@ -19,6 +19,7 @@ import net.minecraft.item.Item; import net.minecraft.registry.Registries; import net.minecraft.util.Identifier; +import net.minecraft.util.dynamic.Range; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; @@ -680,9 +681,10 @@ public CompletableFuture buildResourcePack() { } for (String string : new String[]{"fsh", "json", "vsh"}) { - this.fileMap.put("assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull." + string, Files.readString(getSelfPath("base-armor/rendertype_armor_cutout_no_cull." + string)).replace("${polymer_texture_resolution}", "" + (16 * globalScale)).getBytes(StandardCharsets.UTF_8)); + this.fileMap.put("polymer_armor_shader/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull." + string, Files.readString(getSelfPath("base-armor/rendertype_armor_cutout_no_cull." + string)).replace("${polymer_texture_resolution}", "" + (16 * globalScale)).getBytes(StandardCharsets.UTF_8)); } + this.packMetadata.addOverlay(new Range<>(0, 35), "polymer_armor_shader"); } this.fileMap.put(AssetPaths.PACK_METADATA, this.packMetadata.build().asString().getBytes(StandardCharsets.UTF_8));