From d9a586741e5828f05ce6930cf67c66ec6fc6d5fb Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 28 Oct 2022 09:21:44 +0200 Subject: [PATCH] [Change] Removed Canvas Support --- .../client/models/CustomModelBakery.java | 40 ----- .../client/render/EmissiveTextureInfo.java | 33 ---- .../bclib/mixin/client/ModelBakeryMixin.java | 36 ---- .../client/MultiPackResourceManagerMixin.java | 58 ------- .../bclib/mixin/client/TextureAtlasMixin.java | 157 ------------------ .../shaders/material/alpha_emission.frag | 14 -- .../shaders/core/rendertype_cutout.fsh | 53 ------ .../shaders/core/rendertype_entity_cutout.fsh | 56 ------- ...endertype_item_entity_translucent_cull.fsh | 53 ------ .../shaders/core/rendertype_solid.fsh | 50 ------ src/main/resources/bclib.mixins.client.json | 2 - 11 files changed, 552 deletions(-) delete mode 100644 src/main/java/org/betterx/bclib/client/render/EmissiveTextureInfo.java delete mode 100644 src/main/java/org/betterx/bclib/mixin/client/ModelBakeryMixin.java delete mode 100644 src/main/java/org/betterx/bclib/mixin/client/MultiPackResourceManagerMixin.java delete mode 100644 src/main/java/org/betterx/bclib/mixin/client/TextureAtlasMixin.java delete mode 100644 src/main/resources/assets/bclib/shaders/material/alpha_emission.frag delete mode 100644 src/main/resources/assets/minecraft/shaders/core/rendertype_cutout.fsh delete mode 100644 src/main/resources/assets/minecraft/shaders/core/rendertype_entity_cutout.fsh delete mode 100644 src/main/resources/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.fsh delete mode 100644 src/main/resources/assets/minecraft/shaders/core/rendertype_solid.fsh diff --git a/src/main/java/org/betterx/bclib/client/models/CustomModelBakery.java b/src/main/java/org/betterx/bclib/client/models/CustomModelBakery.java index f86b2fef..8eb6a2bb 100644 --- a/src/main/java/org/betterx/bclib/client/models/CustomModelBakery.java +++ b/src/main/java/org/betterx/bclib/client/models/CustomModelBakery.java @@ -106,44 +106,4 @@ public class CustomModelBakery { BlockModel model = provider.getItemModel(modelLocation); models.put(modelLocation, model); } - - //TODO: 1.19.3 Handled differently now -// public static void loadEmissiveModels(Map unbakedCache) { -// if (!ModIntegrationAPI.hasCanvas()) { -// return; -// } -// -// Map cacheCopy = new HashMap<>(unbakedCache); -// Set> strings = Sets.newConcurrentHashSet(); -// Registry.BLOCK.keySet().forEach(blockID -> { -// Block block = Registry.BLOCK.get(blockID); -// ImmutableList states = block.getStateDefinition().getPossibleStates(); -// boolean addBlock = false; -// -// for (BlockState state : states) { -// ResourceLocation stateID = BlockModelShaper.stateToModelLocation(blockID, state); -// UnbakedModel model = cacheCopy.get(stateID); -// if (model == null) { -// continue; -// } -// Collection materials = model.getMaterials(cacheCopy::get, strings); -// if (materials == null) { -// continue; -// } -// for (Material material : materials) { -// if (EmissiveTextureInfo.isEmissiveTexture(material.texture())) { -// addBlock = true; -// break; -// } -// } -// if (addBlock) { -// break; -// } -// } -// -// if (addBlock) { -// EmissiveTextureInfo.addBlock(blockID); -// } -// }); -// } } diff --git a/src/main/java/org/betterx/bclib/client/render/EmissiveTextureInfo.java b/src/main/java/org/betterx/bclib/client/render/EmissiveTextureInfo.java deleted file mode 100644 index e2acddae..00000000 --- a/src/main/java/org/betterx/bclib/client/render/EmissiveTextureInfo.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.betterx.bclib.client.render; - -import net.minecraft.resources.ResourceLocation; - -import com.google.common.collect.Sets; - -import java.util.Set; - -public class EmissiveTextureInfo { - private static final Set EMISSIVE_TEXTURES = Sets.newHashSet(); - private static final Set EMISSIVE_BLOCKS = Sets.newHashSet(); - - public static void clear() { - EMISSIVE_TEXTURES.clear(); - EMISSIVE_BLOCKS.clear(); - } - - public static void addTexture(ResourceLocation texture) { - EMISSIVE_TEXTURES.add(texture); - } - - public static void addBlock(ResourceLocation blockID) { - EMISSIVE_BLOCKS.add(blockID); - } - - public static boolean isEmissiveTexture(ResourceLocation texture) { - return EMISSIVE_TEXTURES.contains(texture); - } - - public static boolean isEmissiveBlock(ResourceLocation blockID) { - return EMISSIVE_BLOCKS.contains(blockID); - } -} diff --git a/src/main/java/org/betterx/bclib/mixin/client/ModelBakeryMixin.java b/src/main/java/org/betterx/bclib/mixin/client/ModelBakeryMixin.java deleted file mode 100644 index 74481f42..00000000 --- a/src/main/java/org/betterx/bclib/mixin/client/ModelBakeryMixin.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.betterx.bclib.mixin.client; - -import org.betterx.bclib.api.v2.ModIntegrationAPI; - -import net.minecraft.client.color.block.BlockColors; -import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.client.resources.model.UnbakedModel; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.profiling.ProfilerFiller; - -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import java.util.Map; - -@Mixin(ModelBakery.class) -public abstract class ModelBakeryMixin { - @Final - @Shadow - private Map unbakedCache; - - @Inject(method = "*", at = @At("TAIL")) - private void bclib_findEmissiveModels( - BlockColors blockColors, ProfilerFiller profilerFiller, Map map, Map map2, CallbackInfo ci - ) { - //CustomModelBakery.setModelsLoaded(false); - if (ModIntegrationAPI.hasCanvas()) { - //TODO:1.19.3 this needs to change - //CustomModelBakery.loadEmissiveModels(unbakedCache); - } - } -} diff --git a/src/main/java/org/betterx/bclib/mixin/client/MultiPackResourceManagerMixin.java b/src/main/java/org/betterx/bclib/mixin/client/MultiPackResourceManagerMixin.java deleted file mode 100644 index 728a02e7..00000000 --- a/src/main/java/org/betterx/bclib/mixin/client/MultiPackResourceManagerMixin.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.betterx.bclib.mixin.client; - -import org.betterx.bclib.BCLib; -import org.betterx.bclib.api.v2.ModIntegrationAPI; -import org.betterx.bclib.client.render.EmissiveTextureInfo; - -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.FallbackResourceManager; -import net.minecraft.server.packs.resources.MultiPackResourceManager; -import net.minecraft.server.packs.resources.Resource; -import net.minecraft.server.packs.resources.ResourceManager; - -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.io.IOException; -import java.util.Map; - -@Mixin(MultiPackResourceManager.class) -public class MultiPackResourceManagerMixin { - @Final - @Shadow - private Map namespacedManagers; - - private final ResourceLocation bclib_alphaEmissionMaterial = BCLib.makeID("materialmaps/block/alpha_emission.json"); - - @Inject(method = "getResource", at = @At("HEAD"), cancellable = true) - private void bclib_getResource( - ResourceLocation resourceLocation, - CallbackInfoReturnable info - ) throws IOException { - if (!ModIntegrationAPI.hasCanvas()) { - return; - } - if (!resourceLocation.getPath().startsWith("materialmaps")) { - return; - } - if (!resourceLocation.getPath().contains("/block/")) { - return; - } - - String name = resourceLocation.getPath().replace("materialmaps/block/", "").replace(".json", ""); - ResourceLocation blockID = new ResourceLocation(resourceLocation.getNamespace(), name); - - if (!EmissiveTextureInfo.isEmissiveBlock(blockID)) { - return; - } - - ResourceManager resourceManager = this.namespacedManagers.get(resourceLocation.getNamespace()); - if (resourceManager != null && resourceManager.getResource(resourceLocation).isEmpty()) { - info.setReturnValue(resourceManager.getResource(bclib_alphaEmissionMaterial).get()); - } - } -} diff --git a/src/main/java/org/betterx/bclib/mixin/client/TextureAtlasMixin.java b/src/main/java/org/betterx/bclib/mixin/client/TextureAtlasMixin.java deleted file mode 100644 index e0e09c61..00000000 --- a/src/main/java/org/betterx/bclib/mixin/client/TextureAtlasMixin.java +++ /dev/null @@ -1,157 +0,0 @@ -package org.betterx.bclib.mixin.client; - -import org.betterx.bclib.BCLib; -import org.betterx.bclib.client.render.EmissiveTextureInfo; - -import com.mojang.blaze3d.platform.NativeImage; -import net.minecraft.client.renderer.texture.SpriteContents; -import net.minecraft.client.renderer.texture.SpriteLoader; -import net.minecraft.client.resources.metadata.animation.AnimationMetadataSection; -import net.minecraft.client.resources.metadata.animation.FrameSize; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.Resource; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.util.Mth; - -import net.fabricmc.loader.api.FabricLoader; - -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.io.IOException; -import java.util.Optional; -import java.util.function.BiConsumer; - -@Mixin(SpriteLoader.class) -public class TextureAtlasMixin { - @Shadow - @Final - private ResourceLocation location; - private static final int EMISSIVE_ALPHA = 254 << 24; - private boolean bclib_modifyAtlas; - private static ResourceManager bclib_resourceManager; - - @Inject(method = "*", at = @At("TAIL")) - private void bclib_onAtlasInit( - ResourceLocation textureAtlasLocation, - int maxSupportedTextureSize, - CallbackInfo ci - ) { - - boolean hasOptifine = FabricLoader.getInstance().isModLoaded("optifabric"); - bclib_modifyAtlas = !hasOptifine && textureAtlasLocation.toString() - .equals("minecraft:textures/atlas/blocks.png"); - if (bclib_modifyAtlas) { - EmissiveTextureInfo.clear(); - } - } - - @Inject(method = "listSprites(Lnet/minecraft/server/packs/resources/ResourceManager;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/BiConsumer;)V", at = @At("HEAD"), cancellable = true) - private static void bclib_listSprites( - ResourceManager resourceManager, - String string, - String string2, - BiConsumer biConsumer, - CallbackInfo ci - ) { - bclib_resourceManager = resourceManager; - } - - @Inject(method = "loadSprite", at = @At("HEAD"), cancellable = true) - private void bclib_loadSprite( - ResourceLocation location, Resource resource, CallbackInfoReturnable cir - ) { - if (!bclib_modifyAtlas || bclib_resourceManager == null) { - return; - } - - if (!location.getPath().startsWith("block")) { - return; - } - - AnimationMetadataSection animationMetadataSection; - try { - animationMetadataSection = resource.metadata() - .getSection(AnimationMetadataSection.SERIALIZER) - .orElse(AnimationMetadataSection.EMPTY); - } catch (Exception exception) { - BCLib.LOGGER.error("Unable to parse metadata from {} : {}", (Object) this.location, (Object) exception); - cir.setReturnValue(null); - cir.cancel(); - return; - } - - ResourceLocation emissiveLocation = new ResourceLocation( - location.getNamespace(), - "textures/" + location.getPath() + "_e.png" - ); - Optional emissiveRes = bclib_resourceManager.getResource(emissiveLocation); - if (emissiveRes.isPresent()) { - NativeImage sprite = null; - NativeImage emission = null; - try { -// ResourceLocation spriteLocation = new ResourceLocation( -// location.getNamespace(), -// "textures/" + location.getPath() + ".png" -// ); - //Resource resource = resourceManager.getResource(spriteLocation).orElse(null); - sprite = NativeImage.read(resource.open()); - - resource = emissiveRes.get(); - emission = NativeImage.read(resource.open()); - } catch (IOException e) { - BCLib.LOGGER.warning(e.getMessage()); - } - if (sprite != null && emission != null) { - int width = Math.min(sprite.getWidth(), emission.getWidth()); - int height = Math.min(sprite.getHeight(), emission.getHeight()); - for (int x = 0; x < width; x++) { - for (int y = 0; y < height; y++) { - int argb = emission.getPixelRGBA(x, y); - int alpha = (argb >> 24) & 255; - if (alpha > 127) { - int r = (argb >> 16) & 255; - int g = (argb >> 8) & 255; - int b = argb & 255; - if (r > 0 || g > 0 || b > 0) { - argb = (argb & 0x00FFFFFF) | EMISSIVE_ALPHA; - sprite.setPixelRGBA(x, y, argb); - } - } - } - } - - FrameSize frameSize = animationMetadataSection.calculateFrameSize( - sprite.getWidth(), - sprite.getHeight() - ); - if (!Mth.isDivisionInteger( - sprite.getWidth(), - frameSize.width() - ) || !Mth.isDivisionInteger(sprite.getHeight(), frameSize.height())) { - BCLib.LOGGER.error( - "Image {} size {},{} is not multiple of frame size {},{}", - this.location, - sprite.getWidth(), - sprite.getHeight(), - frameSize.width(), - frameSize.height() - ); - sprite.close(); - cir.setReturnValue(null); - cir.cancel(); - } - - SpriteContents result = new SpriteContents(location, frameSize, sprite, animationMetadataSection); - - EmissiveTextureInfo.addTexture(location); - cir.setReturnValue(result); - } - } - } -} diff --git a/src/main/resources/assets/bclib/shaders/material/alpha_emission.frag b/src/main/resources/assets/bclib/shaders/material/alpha_emission.frag deleted file mode 100644 index 23835661..00000000 --- a/src/main/resources/assets/bclib/shaders/material/alpha_emission.frag +++ /dev/null @@ -1,14 +0,0 @@ -#include frex:shaders/api/fragment.glsl -#include frex:shaders/lib/math.glsl - -// Value near 254 -bool isEmissive(float alpha) { - return 0.9960 < alpha && alpha < 0.9962; -} - -void frx_startFragment(inout frx_FragmentData fragData) { - if (isEmissive(fragData.spriteColor.a)) { - fragData.emissivity = 1.0; - fragData.spriteColor.a = 1.0; - } -} diff --git a/src/main/resources/assets/minecraft/shaders/core/rendertype_cutout.fsh b/src/main/resources/assets/minecraft/shaders/core/rendertype_cutout.fsh deleted file mode 100644 index b8e57609..00000000 --- a/src/main/resources/assets/minecraft/shaders/core/rendertype_cutout.fsh +++ /dev/null @@ -1,53 +0,0 @@ -#version 150 -#moj_import - -uniform sampler2D Sampler0; - -uniform vec4 ColorModulator; -uniform float FogStart; -uniform float FogEnd; -uniform vec4 FogColor; - -in float vertexDistance; -in vec4 vertexColor; -in vec2 texCoord0; -in vec4 normal; - -out vec4 fragColor; - -vec3 rgbToHSV(vec3 color) { - vec4 k = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); - vec4 p = mix(vec4(color.bg, k.wz), vec4(color.gb, k.xy), step(color.b, color.g)); - vec4 q = mix(vec4(p.xyw, color.r), vec4(color.r, p.yzx), step(p.x, color.r)); - float d = q.x - min(q.w, q.y); - float e = 1.0e-10; - return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); -} - -vec3 hsvToRGB(vec3 color) { - vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); - vec3 p = abs(fract(color.xxx + k.xyz) * 6.0 - k.www); - return color.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), color.y); -} - -// Value near 254 -bool isEmissive(float alpha) { - return 0.9960 < alpha && alpha < 0.9962; -} - -void main() { - vec4 tex = texture(Sampler0, texCoord0); - if (tex.a < 0.1) { - discard; - } - vec4 color = tex * ColorModulator; - vec4 vertex = vertexColor; - if (isEmissive(tex.a)) { - vec3 hsv = rgbToHSV(vertex.rgb); - hsv.z = 1.0; - vertex.rgb = hsvToRGB(hsv); - color.a = 1.0; - } - color = linear_fog(color * vertex, vertexDistance, FogStart, FogEnd, FogColor); - fragColor = color; -} diff --git a/src/main/resources/assets/minecraft/shaders/core/rendertype_entity_cutout.fsh b/src/main/resources/assets/minecraft/shaders/core/rendertype_entity_cutout.fsh deleted file mode 100644 index 253b1244..00000000 --- a/src/main/resources/assets/minecraft/shaders/core/rendertype_entity_cutout.fsh +++ /dev/null @@ -1,56 +0,0 @@ -#version 150 -#moj_import - -uniform sampler2D Sampler0; - -uniform vec4 ColorModulator; -uniform float FogStart; -uniform float FogEnd; -uniform vec4 FogColor; - -in float vertexDistance; -in vec4 vertexColor; -in vec4 lightMapColor; -in vec4 overlayColor; -in vec2 texCoord0; -in vec4 normal; - -out vec4 fragColor; - -vec3 rgbToHSV(vec3 color) { - vec4 k = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); - vec4 p = mix(vec4(color.bg, k.wz), vec4(color.gb, k.xy), step(color.b, color.g)); - vec4 q = mix(vec4(p.xyw, color.r), vec4(color.r, p.yzx), step(p.x, color.r)); - float d = q.x - min(q.w, q.y); - float e = 1.0e-10; - return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); -} - -vec3 hsvToRGB(vec3 color) { - vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); - vec3 p = abs(fract(color.xxx + k.xyz) * 6.0 - k.www); - return color.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), color.y); -} - -// Value near 254 -bool isEmissive(float alpha) { - return 0.9960 < alpha && alpha < 0.9962; -} - -void main() { - vec4 tex = texture(Sampler0, texCoord0); - if (tex.a < 0.1) { - discard; - } - vec4 color = tex * ColorModulator; - color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); - vec4 vertex = vertexColor * lightMapColor; - if (isEmissive(tex.a)) { - vec3 hsv = rgbToHSV(vertex.rgb); - hsv.z = 1.0; - vertex.rgb = hsvToRGB(hsv); - color.a = 1.0; - } - color = linear_fog(color * vertex, vertexDistance, FogStart, FogEnd, FogColor); - fragColor = color; -} \ No newline at end of file diff --git a/src/main/resources/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.fsh b/src/main/resources/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.fsh deleted file mode 100644 index c2cefa02..00000000 --- a/src/main/resources/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.fsh +++ /dev/null @@ -1,53 +0,0 @@ -#version 150 -#moj_import - -uniform sampler2D Sampler0; - -uniform vec4 ColorModulator; -uniform float FogStart; -uniform float FogEnd; -uniform vec4 FogColor; - -in float vertexDistance; -in vec4 vertexColor; -in vec2 texCoord0; -in vec2 texCoord1; -in vec4 normal; - -out vec4 fragColor; - -vec3 rgbToHSV(vec3 color) { - vec4 k = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); - vec4 p = mix(vec4(color.bg, k.wz), vec4(color.gb, k.xy), step(color.b, color.g)); - vec4 q = mix(vec4(p.xyw, color.r), vec4(color.r, p.yzx), step(p.x, color.r)); - float d = q.x - min(q.w, q.y); - float e = 1.0e-10; - return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); -} - -vec3 hsvToRGB(vec3 color) { - vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); - vec3 p = abs(fract(color.xxx + k.xyz) * 6.0 - k.www); - return color.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), color.y); -} - -// Value near 254 -bool isEmissive(float alpha) { - return 0.9960 < alpha && alpha < 0.9962; -} - -void main() { - vec4 tex = texture(Sampler0, texCoord0); - if (tex.a < 0.1) { - discard; - } - vec4 color = tex * ColorModulator; - vec4 vertex = vertexColor; - if (isEmissive(tex.a)) { - vec3 hsv = rgbToHSV(vertex.rgb); - hsv.z = 1.0; - vertex.rgb = hsvToRGB(hsv); - } - color = linear_fog(color * vertex, vertexDistance, FogStart, FogEnd, FogColor); - fragColor = color; -} \ No newline at end of file diff --git a/src/main/resources/assets/minecraft/shaders/core/rendertype_solid.fsh b/src/main/resources/assets/minecraft/shaders/core/rendertype_solid.fsh deleted file mode 100644 index d75ee23d..00000000 --- a/src/main/resources/assets/minecraft/shaders/core/rendertype_solid.fsh +++ /dev/null @@ -1,50 +0,0 @@ -#version 150 -#moj_import - -uniform sampler2D Sampler0; - -uniform vec4 ColorModulator; -uniform float FogStart; -uniform float FogEnd; -uniform vec4 FogColor; - -in float vertexDistance; -in vec4 vertexColor; -in vec2 texCoord0; -in vec4 normal; - -out vec4 fragColor; - -vec3 rgbToHSV(vec3 color) { - vec4 k = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); - vec4 p = mix(vec4(color.bg, k.wz), vec4(color.gb, k.xy), step(color.b, color.g)); - vec4 q = mix(vec4(p.xyw, color.r), vec4(color.r, p.yzx), step(p.x, color.r)); - float d = q.x - min(q.w, q.y); - float e = 1.0e-10; - return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); -} - -vec3 hsvToRGB(vec3 color) { - vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); - vec3 p = abs(fract(color.xxx + k.xyz) * 6.0 - k.www); - return color.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), color.y); -} - -// Value near 254 -bool isEmissive(float alpha) { - return 0.9960 < alpha && alpha < 0.9962; -} - -void main() { - vec4 tex = texture(Sampler0, texCoord0); - vec4 color = tex * ColorModulator; - vec4 vertex = vertexColor; - if (isEmissive(tex.a)) { - vec3 hsv = rgbToHSV(vertex.rgb); - hsv.z = 1.0; - vertex.rgb = hsvToRGB(hsv); - color.a = 1.0; - } - color = linear_fog(color * vertex, vertexDistance, FogStart, FogEnd, FogColor); - fragColor = color; -} diff --git a/src/main/resources/bclib.mixins.client.json b/src/main/resources/bclib.mixins.client.json index b73a4141..6ea98781 100644 --- a/src/main/resources/bclib.mixins.client.json +++ b/src/main/resources/bclib.mixins.client.json @@ -10,11 +10,9 @@ "FogRendererMixin", "GameMixin", "MinecraftMixin", - "ModelBakeryMixin", "ModelManagerMixin", "PresetEditorMixin", "SignEditScreenMixin", - "TextureAtlasMixin", "boat.BoatRendererMixin" ], "injectors": {