Skip to content

Commit

Permalink
2.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Seosean committed Apr 19, 2024
1 parent 3232fd4 commit ef5c1b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,26 @@ public void handleEntityMetadata(S1CPacketEntityMetadata packetIn, CallbackInfo
if (packetIn == null) {
return;
}

List<DataWatcher.WatchableObject> list = packetIn.func_149376_c();
if (list == null) {
return;
}

if (list.isEmpty()) {
return;
}

Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(packetIn.getEntityId());
if (entity instanceof EntityArmorStand) {
for (DataWatcher.WatchableObject watchableObject : new ArrayList<>(packetIn.func_149376_c())) {
if (watchableObject != null) {
if (watchableObject.getObjectType() == 4 && watchableObject.getDataValueId() == 2) {
if (watchableObject.getObject() instanceof String) {
String armorstandName = StringUtils.trim((String) watchableObject.getObject());
ShowSpawnTime.getPowerupDetect().detectArmorstand(armorstandName, packetIn.getEntityId());

if (Minecraft.getMinecraft() != null) {
if (Minecraft.getMinecraft().theWorld != null) {
Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(packetIn.getEntityId());
if (entity instanceof EntityArmorStand) {
for (DataWatcher.WatchableObject watchableObject : new ArrayList<>(packetIn.func_149376_c())) {
if (watchableObject != null) {
if (watchableObject.getObjectType() == 4 && watchableObject.getDataValueId() == 2) {
if (watchableObject.getObject() instanceof String) {
String armorstandName = StringUtils.trim((String) watchableObject.getObject());
ShowSpawnTime.getPowerupDetect().detectArmorstand(armorstandName, packetIn.getEntityId());
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ private void onRedirecting(RendererLivingEntity<?> instance, Entity entityIn, do
GlStateManager.enableTexture2D();

fontrenderer.drawString(nameTagStr, (float) (-fontrenderer.getStringWidth(str) / 2.0), (float) i, MainConfiguration.powerupNameTagRenderColor, MainConfiguration.PowerupNameTagShadow);
fontrenderer.drawString(countdownStr.replace("§f", ""), (float) (-fontrenderer.getStringWidth(str) / 2.0 + fontrenderer.getStringWidth(nameTagStr)), (float) i, MainConfiguration.powerupCountDownRenderColor, true);
fontrenderer.drawString(countdownStr.replace("§f", ""), (float) (-fontrenderer.getStringWidth(str) / 2.0 + fontrenderer.getStringWidth("A" + nameTagStr)), (float) i, MainConfiguration.powerupCountDownRenderColor, true);

GlStateManager.enableDepth();
GlStateManager.depthMask(true);

fontrenderer.drawString(nameTagStr, (float) (-fontrenderer.getStringWidth(str) / 2.0), (float) i, -1, MainConfiguration.PowerupNameTagShadow);
fontrenderer.drawString(countdownStr.replace("§f", ""), (float) (-fontrenderer.getStringWidth(str) / 2.0 + fontrenderer.getStringWidth(nameTagStr)), (float) i, 0x99CCFF, true);
fontrenderer.drawString(countdownStr.replace("§f", ""), (float) (-fontrenderer.getStringWidth(str) / 2.0 + fontrenderer.getStringWidth("A" + nameTagStr)), (float) i, 0x99CCFF, true);

GlStateManager.enableLighting();
GlStateManager.disableBlend();
Expand Down

0 comments on commit ef5c1b1

Please sign in to comment.