Skip to content

Commit

Permalink
Move water colormap textures to own namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
b3spectacled committed Nov 3, 2023
1 parent 653dd4c commit e66f414
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn_mappings=1.20.2+build.4
loader_version=0.14.24

# Mod Properties
mod_version = 6.4.2
mod_version = 6.5
maven_group = mod.bespectacled
archives_base_name = modern-beta-fabric

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/mod/bespectacled/modernbeta/ModernBeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ public void onInitialize() {
ResourceManagerHelper resourceManager = ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES);

resourceManager.registerReloadListener(new ModernBetaColormapResource(
"colormap/water.png",
"textures/colormap/water.png",
BlockColorSampler.INSTANCE.colormapWater::setColormap
));

resourceManager.registerReloadListener(new ModernBetaColormapResource(
"colormap/underwater.png",
"textures/colormap/underwater.png",
BlockColorSampler.INSTANCE.colormapUnderwater::setColormap
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@

public class ModernBetaColormapResource implements SimpleSynchronousResourceReloadListener {
private final Identifier id;
private final Identifier optifineId;
private final Consumer<int[]> consumer;

public ModernBetaColormapResource(String path, Consumer<int[]> consumer) {
this.id = ModernBeta.createId(path);
this.optifineId = new Identifier("optifine/" + path);
this.consumer = consumer;
}

Expand All @@ -31,7 +29,7 @@ public void reload(ResourceManager resourceManager) {
int[] map;

try {
map = RawTextureDataLoader.loadRawTextureData(resourceManager, this.optifineId);
map = RawTextureDataLoader.loadRawTextureData(resourceManager, this.id);
} catch (IOException exception) {
throw new IllegalStateException("[Modern Beta] Failed to load colormap texture!", exception);
}
Expand Down

0 comments on commit e66f414

Please sign in to comment.