Fixed issues with wolves.

This commit is contained in:
Lilac 2019-08-18 19:00:53 +01:00
parent 2a628fe95e
commit 8e80c97747
3 changed files with 8 additions and 3 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "UltimateStacker"
path: "/builds/$CI_PROJECT_PATH"
version: "1.9.1"
version: "1.9.2"
build:
stage: build

View File

@ -37,8 +37,9 @@ public class TameListeners implements Listener {
LivingEntity newEntity = plugin.getEntityUtils().newEntity((LivingEntity) tameable);
plugin.getEntityStackManager().addStack(new EntityStack(newEntity, stack.getAmount() - 1));
EntityStack second = plugin.getEntityStackManager().addStack(new EntityStack(newEntity, stack.getAmount() - 1));
stack.setAmount(1);
second.setAmount(stack.getAmount() - 1);
plugin.getEntityStackManager().removeStack(entity);
entity.setVelocity(getRandomVector());
}

View File

@ -266,8 +266,12 @@ public class EntityUtils {
}
case IS_TAMED: {
if (!(initalEntity instanceof Tameable)) break;
if (((Tameable) initalEntity).isTamed()) {
entityList.removeIf(entity -> !((Tameable) entity).isTamed());
} else {
entityList.removeIf(entity -> ((Tameable) entity).isTamed());
}
}
case ANIMAL_OWNER: {
if (!(initalEntity instanceof Tameable)) break;