Skip to content

Commit

Permalink
Move shader to overlay, so it won't load on 1.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Oct 15, 2024
1 parent a48b6ea commit f9bbc3a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -680,9 +681,10 @@ public CompletableFuture<Boolean> 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));
Expand Down

0 comments on commit f9bbc3a

Please sign in to comment.