aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-02-15 20:44:31 -0500
committerbowser0000 <bowser0000@gmail.com>2021-02-15 20:44:31 -0500
commit96233a6c7c9b76cfff49ae107a550ed63ef9728b (patch)
tree50a48e4120f4f4fe35e63aa9dc242fa3a7a42d24
parent7260dd02a2d39512b0c83488894579a0a8a0a960 (diff)
downloadSkyblockMod-96233a6c7c9b76cfff49ae107a550ed63ef9728b.tar.gz
SkyblockMod-96233a6c7c9b76cfff49ae107a550ed63ef9728b.tar.bz2
SkyblockMod-96233a6c7c9b76cfff49ae107a550ed63ef9728b.zip
Hide incorrect livid nametags
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index b45aa58..c1d3e7f 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -1,6 +1,5 @@
package me.Danker;
-import akka.event.Logging;
import com.google.gson.JsonObject;
import me.Danker.commands.*;
import me.Danker.gui.*;
@@ -46,7 +45,6 @@ import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.PlaySoundEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
-import net.minecraftforge.event.entity.player.AttackEntityEvent;
import net.minecraftforge.event.entity.player.*;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry;
@@ -69,7 +67,6 @@ import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import java.awt.*;
-import java.net.URLDecoder;
import java.text.NumberFormat;
import java.util.List;
import java.util.*;
@@ -2540,6 +2537,17 @@ public class DankersSkyblockMod {
new TextRenderer(mc, skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale);
}
}
+
+ @SubscribeEvent
+ public void onRenderEntity(RenderLivingEvent.Pre event) {
+ Entity entity = event.entity;
+ String name = entity.getName();
+ if (entity instanceof EntityArmorStand) {
+ if (ToggleCommand.lividSolverToggled && !entity.isEntityEqual(livid) && name.contains("Livid") && name.length() > 5 && name.charAt(1) == name.charAt(5)) {
+ event.setCanceled(true);
+ }
+ }
+ }
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onSound(final PlaySoundEvent event) {