Jump to content

PigeonDamigion

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by PigeonDamigion

  1. Cause when I started this mod I was following a 1.10.2 modding tutorial, I'll move it to a newer version when the core stuff is done
  2. So I'm making a UI for my mod, that shows stats that are returned from the NBTTag data of the player, right? Well, the problem is it doesn't seem to work at all, cause all it returns is null. Also, I'm basically brand new to modding, so please tell me if some of my code is redundant/useless @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { Minecraft.getMinecraft().renderEngine.bindTexture(texture); int centerX = width/2 - guiWidth/2; int centerY = height/2 - guiHeight/2; GlStateManager.pushMatrix(); { GlStateManager.enableAlpha(); GlStateManager.enableBlend(); GlStateManager.color(1, 1, 1, 0.7F); drawTexturedModalRect(centerX, centerY, 0, 0, guiWidth, guiHeight); } GlStateManager.popMatrix(); drawString(fontRendererObj, "Stand:", centerX+5, centerY+10, 0xFFFFFF); drawString(fontRendererObj, "STR:", centerX+5, centerY+50, 0xFFFFFF); drawString(fontRendererObj, "END:", centerX+5, centerY+65, 0xFFFFFF); drawString(fontRendererObj, "SPE:", centerX+5, centerY+80, 0xFFFFFF); EntityPlayer player = Minecraft.getMinecraft().thePlayer; NBTTagCompound persistTag = player.getEntityData().getCompoundTag(player.PERSISTED_NBT_TAG); NBTTagCompound jojoTag = persistTag.getCompoundTag("Jojo"); switch (jojoTag.getInteger("Stand")) { case 1: String strength, endurance, special; String Stand = "Killer Queen"; strength=String.valueOf(jojoTag.getInteger("Stand_str")); endurance=String.valueOf(jojoTag.getInteger("Stand_end")); special=String.valueOf(jojoTag.getInteger("Stand_spe")); drawString(fontRendererObj, Stand, centerX+40, centerY+10, 0xFFFFFF); drawString(fontRendererObj, strength, centerX+30, centerY+50, 0xFFFFFF); drawString(fontRendererObj, endurance, centerX+30, centerY+65, 0xFFFFFF); drawString(fontRendererObj, special, centerX+30, centerY+80, 0xFFFFFF); break; case 2: break; case 3: break; default: System.out.println("ERROR: you fucked up with the Gui data"); System.out.println(Minecraft.getMinecraft().thePlayer.getEntityData().getInteger("Stand")); String none = "None"; drawString(fontRendererObj, none, centerX+40, centerY+10, 0xFFFFFF); drawString(fontRendererObj, "0", centerX+30, centerY+50, 0xFFFFFF); drawString(fontRendererObj, "0", centerX+30, centerY+65, 0xFFFFFF); drawString(fontRendererObj, "0", centerX+30, centerY+80, 0xFFFFFF); break; } super.drawScreen(mouseX, mouseY, partialTicks); }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.