Started by
mikepaps
on
Topic category: Help with Minecraft modding (Java Edition)
This is the code so far that i have got but it just gives me bugs:
RayTraceResult rayTraceResult = Minecraft.getInstance().objectMouseOver; if (rayTraceResult.getType() == RayTraceResult.Type.ENTITY) { Entity entitytoshowhealth = ((EntityRayTraceResult) rayTraceResult).getEntity(); MymodModVariables.MapVariables.get(world).NumOfHealth = (entitytoshowhealth.getHealth() : -1); }
Any help please?
B.T.W
I am trying to make an overlay that will tell the player the health of the entity they are looking at E.G. when I look at a pig the overlay will display the current health of that pig.