aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java
index 3cdbae5..07853d3 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java
@@ -2,6 +2,7 @@ package com.thatgravyboat.skyblockhud.mixins;
import com.thatgravyboat.skyblockhud.SpecialColour;
import com.thatgravyboat.skyblockhud.handlers.sbentities.EntityTypeHelper;
+import java.awt.*;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderEnderman;
import net.minecraft.entity.monster.EntityEnderman;
@@ -10,16 +11,32 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import java.awt.*;
-
@Mixin(RenderEnderman.class)
public class MixinEndermanRenderer {
- @Inject(method = "doRender(Lnet/minecraft/entity/monster/EntityEnderman;DDDFF)V", at = @At("HEAD"))
- public void onRender(EntityEnderman entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci){
- if (EntityTypeHelper.isZealot(entity)){
- Color color = new Color(SpecialColour.specialToChromaRGB("255:255:0:48:255"));
- GlStateManager.color(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, 255f);
- }
+ @Inject(
+ method = "doRender(Lnet/minecraft/entity/monster/EntityEnderman;DDDFF)V",
+ at = @At("HEAD")
+ )
+ public void onRender(
+ EntityEnderman entity,
+ double x,
+ double y,
+ double z,
+ float entityYaw,
+ float partialTicks,
+ CallbackInfo ci
+ ) {
+ if (EntityTypeHelper.isZealot(entity)) {
+ Color color = new Color(
+ SpecialColour.specialToChromaRGB("255:255:0:48:255")
+ );
+ GlStateManager.color(
+ color.getRed() / 255f,
+ color.getGreen() / 255f,
+ color.getBlue() / 255f,
+ 255f
+ );
}
+ }
}