How would i go about setting a variable on a specific entity and retrieve it later?
FE:
@SubscribeEvent
public void entitySpawned(EntityJoinWorldEvent event)
{
Entity entity = event.getEntity();
entity.setVariable("variableName",value); //set the variable
}
@SubscribeEvent
public void onHurt(LivingHurtEvent event)
{
Entity entity = event.getEntity();
if (!entity.getVariable("variableName")) return; //check the variable
}