TheAwesomeGem Posted July 16, 2015 Posted July 16, 2015 How do I increase the movement speed of zombies when they are on the water? I tried this but it did not work. @SubscribeEvent public void onLivingEntityUpdate(LivingEvent.LivingUpdateEvent e) { Entity entity = e.entity; if(e.entity instanceof EntityLiving) { if(e.entity instanceof EntityZombie) { EntityZombie zombie = (EntityZombie) entity; if(zombie.isInWater()) { if(zombie.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() != 2.0) { zombie.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(2.0); } } else { if(zombie.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() != 0.23) { zombie.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.23); } } } } } Quote New Channel: https://www.youtube.com/theawesomegemily'>https://www.youtube.com/theawesomegemily My Group: https://www.youtube.com/officialpixelgem Old Channel: https://www.youtube.com/theawesomegem
TheAwesomeGem Posted July 16, 2015 Author Posted July 16, 2015 Doesn't seem like their is a way to increase the zombie's speed in water since movement speed is based on the land. However, maybe altering velocity would work. But I don't know if it's a way to go. Quote New Channel: https://www.youtube.com/theawesomegemily'>https://www.youtube.com/theawesomegemily My Group: https://www.youtube.com/officialpixelgem Old Channel: https://www.youtube.com/theawesomegem
Recommended Posts
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.