From 986c4a5f857b7ecebb513e46afb3bcab61696c1d Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 9 Oct 2022 00:23:28 +0200 Subject: [PATCH] Fixed twittermites and magic beams appearing invisible with sodium --- .../ability/magic/spell/effect/HydrophobicSpell.java | 2 +- .../unicopia/client/render/RenderLayers.java | 8 +++++--- .../client/render/entity/FairyEntityRenderer.java | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/HydrophobicSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/HydrophobicSpell.java index 8746264a..1d7af0db 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/HydrophobicSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/HydrophobicSpell.java @@ -87,7 +87,7 @@ public class HydrophobicSpell extends AbstractSpell { } }); - if (source.getMaster().age % 200 == 0) { + if (source.getEntity().age % 200 == 0) { source.playSound(SoundEvents.BLOCK_BEACON_AMBIENT, 0.5F); } } diff --git a/src/main/java/com/minelittlepony/unicopia/client/render/RenderLayers.java b/src/main/java/com/minelittlepony/unicopia/client/render/RenderLayers.java index b2584611..b73c6191 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/render/RenderLayers.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/RenderLayers.java @@ -23,11 +23,13 @@ public final class RenderLayers extends RenderLayer { .build(false)); private static final Function MAGIC_COLORIN_FUNC = Util.memoize(color -> { - return of("magic_colored_" + color, VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, - VertexFormat.DrawMode.QUADS, 256, true, true, MultiPhaseParameters.builder() + return of("magic_colored_" + color, + VertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, + VertexFormat.DrawMode.QUADS, 256, true, true, + MultiPhaseParameters.builder() .shader(COLOR_SHADER) .transparency(TRANSLUCENT_TRANSPARENCY) - .target(TRANSLUCENT_TARGET) + // .target(TRANSLUCENT_TARGET) .texturing(solid(Color.r(color), Color.g(color), Color.b(color), 0.6F)) .build(false)); }); diff --git a/src/main/java/com/minelittlepony/unicopia/client/render/entity/FairyEntityRenderer.java b/src/main/java/com/minelittlepony/unicopia/client/render/entity/FairyEntityRenderer.java index e9ac0940..3a478dc3 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/render/entity/FairyEntityRenderer.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/entity/FairyEntityRenderer.java @@ -3,8 +3,7 @@ package com.minelittlepony.unicopia.client.render.entity; import com.minelittlepony.unicopia.client.particle.SphereModel; import com.minelittlepony.unicopia.client.render.RenderLayers; import com.minelittlepony.unicopia.entity.FairyEntity; - -import net.minecraft.client.render.VertexConsumer; +import net.minecraft.client.render.*; import net.minecraft.client.render.entity.EntityRendererFactory; import net.minecraft.client.render.entity.MobEntityRenderer; import net.minecraft.client.render.entity.model.EntityModel;