aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java
diff options
context:
space:
mode:
authorTymanWasTaken <tyman@tyman.tech>2021-07-06 17:13:01 -0400
committerTymanWasTaken <tyman@tyman.tech>2021-07-06 17:13:01 -0400
commitbb75fd7b83b238f1f922ffc64b2a0a535c5524b7 (patch)
tree617c91cced71f672662bddea6c540939cb9a3953 /src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinEndermanRenderer.java
parent91464c8f433e8bf323932ac956678971207b607e (diff)
downloadSkyblockHud-Death-Defied-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.tar.gz
SkyblockHud-Death-Defied-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.tar.bz2
SkyblockHud-Death-Defied-bb75fd7b83b238f1f922ffc64b2a0a535c5524b7.zip
Format
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
+ );
}
+ }
}