mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-23 18:45:39 +01:00
Fixed issues with wolves.
This commit is contained in:
parent
2a628fe95e
commit
8e80c97747
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateStacker"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.9.1"
|
||||
version: "1.9.2"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user