/**
     * Recolors map colors in the aether dimension to look nicer.
     * Could be a redirect, but that would actually probably be less compatible with other mods.
     * However, if the game updates this won't break, which is a bad thing
     */
@Inject(
            method = "updateTexture()V",
            at = @At(
                    value = "HEAD",
                    target = "net/minecraft/client/render/MapRenderer$MapTexture.updateTexture()V"
            ),
            cancellable = true)
    private void updateAetherTexture(CallbackInfo ci) {
        if (this.state.dimension == AetherDimension.AETHER_WORLD_KEY){
            for (int i = 0; i < 128; ++i) {
                for (int j = 0; j < 128; ++j) {
                    int k = j + i * 128;
                    int l = this.state.colors[k] & 255;
                    if (l >> 2 == 0) { // MapColor.CLEAR
                        // Who knows what this does? Nothing, it seems. But just in case I'll let it stick around.
                        // Comment your code please!
                        this.texture.getImage().setColor(j, i, (k + k / 128 & 1) * 8 + 16 << 24);
                    } else {
                        this.texture.getImage().setColor(j, i, AetherMapColorUtil.getColor(MapColor.COLORS[l >> 2], l & 3));
                    }
                }
            }
            this.texture.upload();
            ci.cancel();
        }
    }
@Inject(
method = "updateTexture()V",
at = @At(
value = "HEAD",
target = "net/minecraft/client/render/MapRenderer$MapTexture.updateTexture()V"
),
cancellable = true)
private void updateAetherTexture(CallbackInfo ci) {
if (this.state.dimension == AetherDimension.AETHER_WORLD_KEY){
for (int i = 0; i < 128; ++i) {
for (int j = 0; j < 128; ++j) {
int k = j + i * 128;
int l = this.state.colors[k] & 255;
if (l >> 2 == 0) { // MapColor.CLEAR
// Who knows what this does? Nothing, it seems. But just in case I'll let it stick around.
// Comment your code please!
this.texture.getImage().setColor(j, i, (k + k / 128 & 1) * 8 + 16 << 24);
} else {
this.texture.getImage().setColor(j, i, AetherMapColorUtil.getColor(MapColor.COLORS[l >> 2], l & 3));
}
}
}
this.texture.upload();
ci.cancel();
}
}
@Inject(
method = "updateTexture()V",
at = @At(
value = "HEAD",
target = "net/minecraft/client/render/MapRenderer$MapTexture.updateTexture()V"
),
cancellable = true)
private void updateAetherTexture(CallbackInfo ci) {
if (this.state.dimension == AetherDimension.AETHER_WORLD_KEY){
for (int i = 0; i < 128; ++i) {
for (int j = 0; j < 128; ++j) {
int k = j + i * 128;
int l = this.state.colors[k] & 255;
if (l >> 2 == 0) { // MapColor.CLEAR
// Who knows what this does? Nothing, it seems. But just in case I'll let it stick around.
// Comment your code please!
this.texture.getImage().setColor(j, i, (k + k / 128 & 1) * 8 + 16 << 24);
} else {
this.texture.getImage().setColor(j, i, AetherMapColorUtil.getColor(MapColor.COLORS[l >> 2], l & 3));
}
}
}
this.texture.upload();
ci.cancel();
}
}
@Inject(
method = "updateTexture()V",
at = @At(
value = "HEAD",
target = "net/minecraft/client/render/MapRenderer$MapTexture.updateTexture()V"
),
cancellable = true)
private void updateAetherTexture(CallbackInfo ci) {
if (this.state.dimension == AetherDimension.AETHER_WORLD_KEY){
for (int i = 0; i < 128; ++i) {
for (int j = 0; j < 128; ++j) {
int k = j + i * 128;
int l = this.state.colors[k] & 255;
if (l >> 2 == 0) { // MapColor.CLEAR
// Who knows what this does? Nothing, it seems. But just in case I'll let it stick around.
// Comment your code please!
this.texture.getImage().setColor(j, i, (k + k / 128 & 1) * 8 + 16 << 24);
} else {
this.texture.getImage().setColor(j, i, AetherMapColorUtil.getColor(MapColor.COLORS[l >> 2], l & 3));
}
}
}
this.texture.upload();
ci.cancel();
}
}