review fixes

This commit is contained in:
danyadev committed 2026-10-11 12:52:19 +03:00
1 parent c1e8606629
commit 6eed99f030
10 files changed
+183 -37

No files matched your search

@@ -31,6 +31,7 @@ import team.chisel.ctmlib.ISubmapManager;
import team.chisel.ctmlib.RenderBlocksCTM;
import team.chisel.ctmlib.RenderBlocksColumn;
import team.chisel.ctmlib.TextureSubmap;
import team.chisel.ctmlib.TextureSubmapCTM;
/**
* Handles all default {@link ISubmapManager} behavior
@@ -197,8 +198,8 @@ public enum TextureType {
IIcon baseIcon = register.registerIcon(modName + ":" + texturePath);
return Triple.of(
baseIcon,
new TextureSubmap(register.registerIcon(modName + ":" + texturePath + "-ctm"), 4, 4),
new TextureSubmap(baseIcon, 2, 2)
new TextureSubmapCTM(register.registerIcon(modName + ":" + texturePath + "-ctm"), 4),
new TextureSubmapCTM(baseIcon, 2)
);
}
@@ -19,8 +19,8 @@ import team.chisel.ctmlib.TextureSubmapResource;
/**
* Provides generated resources for independently stitched CTM submap sprites.
* <p>
* For example, a request for chisel:textures/blocks/__chisel_submap/4x4/2_1/foo.png is resolved from
* chisel:textures/blocks/foo.png and cropped to the requested cell. This lets Minecraft and other mods treat each
* For example, a request for chisel:textures/blocks/__chisel_submap/2x2/1_0/foo.png is resolved from
* chisel:textures/blocks/foo.png and cropped to its top-right tile. This lets Minecraft and other mods treat each
* submap sprite like an ordinary texture resource.
*/
@Mixin(FallbackResourceManager.class)
@@ -54,6 +54,7 @@ public abstract class MixinFallbackResourceManager {
List<IResource> resources = new ArrayList<>(sources.size());
for (IResource source : sources) {
// Different resource packs may provide different images for the same location, so we can't cache them
resources.add(new TextureSubmapResource(source, submap, false));
}