You can get the reference of the block as follows:
MovingObjectPosition pos = mc.renderViewEntity.rayTrace(200, 1.0F);
if(pos != null) {
Block block = Minecraft.getMinecraft().thePlayer.worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ);
...
}
Hi,
I'd like to get the icon of the looked elements (blocks, animals, mobs, etc.).
I can get it for the blocks:
IIcon icon = block.getIcon(0, 0);
but how to do this for the living entities? EntityLivingBase hasn't "getIcon" or any similar methods.
EntityLivingBase entity = GetEntityLookAt(....);
Any help would be appreciated.
Thanks,
Istvan
2 replies
Important Information
By using this site, you agree to our Terms of Use.