Jump to content

zsfxdytjdj

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by zsfxdytjdj

  1. 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 }
×
×
  • Create New...

Important Information

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