Posted August 27, 201411 yr isn't this supposed to run every tick for any living entities? event handler: @SubscribeEvent public void livingEvent(LivingEvent event) { if(event.entity instanceof EntityPlayer && EntityExtendedPlayer.get((EntityPlayer) event.entity) != null) { EntityExtendedPlayer props = EntityExtendedPlayer.get((EntityPlayer)event.entity); if(props.getDrunkness() > 0) { props.setDrunkness(props.getDrunkness()-1); } if(props.getMaxShields() > 0) { if(props.getShieldsTimer() > 0) { props.setShieldsTimer(props.getShieldsTimer()-1); } else { props.setCurrentShields(props.getCurrentShields()+0.2F); } } } } the other events work, so i know that i set up the event handler correctly. am i supposed to use a different event? according to tutorials i found this is supposed to work. http://www.planetminecraft.com/member/sigurd4 I'm making the bioshock mod!
August 27, 201411 yr Author oh wait nevermind i figured it out! it was the not null check that didnt work for some reason. quite strange. http://www.planetminecraft.com/member/sigurd4 I'm making the bioshock mod!
August 27, 201411 yr There is a PlayerTickEvent for ticking players, by the way. Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.