fix fabric

This commit is contained in:
techno-sam
2026-05-14 20:47:28 +02:00
parent 4aec74c6aa
commit a63212ae28
3 changed files with 6 additions and 3 deletions
@@ -16,10 +16,11 @@ import java.util.Map;
@Mixin(BlockModel.Deserializer.class)
public class BlockModelDeserializerMixin {
@SuppressWarnings("LocalMayUseName")
@WrapOperation(method = "getTextureMap", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/block/model/BlockModel$Deserializer;parseTextureLocationOrReference(Lnet/minecraft/resources/ResourceLocation;Ljava/lang/String;)Lcom/mojang/datafixers/util/Either;"))
private Either<Material, String> modifyAtlas(ResourceLocation location, String name,
Operation<Either<Material, String>> original, JsonObject json,
@Local(name = "entry") Map.Entry<String, JsonElement> entry) {
@Local Map.Entry<String, JsonElement> entry) {
if (!entry.getKey().equals("particle") && json.has("crystalline_sky:atlas")) {
location = ResourceLocation.parse(json.get("crystalline_sky:atlas").getAsString());
}
@@ -13,10 +13,11 @@ import org.spongepowered.asm.mixin.injection.At;
@Mixin(ModelBlockRenderer.class)
public class ModelBlockRendererMixin {
// lucky us: fabric calls it bakedQuad, neoforge bakedquad
// lucky us: fabric calls it bakedQuad, neoforge bakedquad. But naming doesn't work in prod fabric anyway :(
@SuppressWarnings("LocalMayUseName")
@WrapOperation(method = "renderModelFaceFlat", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/BlockAndTintGetter;getShade(Lnet/minecraft/core/Direction;Z)F"))
private float fullBrightSkybox(BlockAndTintGetter instance, Direction direction, boolean shade,
Operation<Float> original, @Local(name = {"bakedQuad", "bakedquad"}) BakedQuad bakedQuad) {
Operation<Float> original, @Local/*(name = {"bakedQuad", "bakedquad"})*/ BakedQuad bakedQuad) {
if (bakedQuad.getSprite().atlasLocation().equals(CrystallineAtlases.SKYBOXES.texture))
return 1.0f;
return original.call(instance, direction, shade);