If you use MinecraftForge you can check if a player is hurt by lava/fire, then add the potion effect to the player if they are wearing your armor. Try out MinecraftForge and its event system. The event you would use is LivingHurtEvent.
If you can get the EntityPlayer or EntityPlayerMP (not sure about EntityPlayerSP), you can do player.username. (Assuming the variable player is equal to the instance of EntityPlayer or EntityPlayerMP.
In MinecraftForge there is an event system. In this system you can edit certain events that happen in minecraft. One event is called LivingDropsEvent. In this event you can check which entity is killed, and then edit its drops by adding, or removing drops. I hope this helps
I used your code, and the GUI opens. However, when trying to move stacks of blocks, they just snap back into place. I don't know where that problem could come from, does anyone know?
Thank you, by the way.
It is most likely a problem with your container. You are (probably) not correctly registering the slots. Also, you can try adding:
0
0
0
0
0
0
0
Yes, my mistake, I was debating between the two and I got confused.
Actually I think it's called LivingDropsEvent btw.
0
0
It is most likely a problem with your container. You are (probably) not correctly registering the slots. Also, you can try adding:
to the TileEntityCoalgen.updateEntity()