mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-14 06:07:09 +01:00
Fix no AI setting when stacking mobs was disabled part 2
This commit is contained in:
parent
331bfea2b8
commit
3649a087c8
@ -3,6 +3,7 @@ package com.songoda.ultimatestacker.stackable.entity;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.lootables.loot.Drop;
|
||||
import com.songoda.core.lootables.loot.DropUtils;
|
||||
import com.songoda.core.utils.EntityUtils;
|
||||
import com.songoda.ultimatestacker.UltimateStacker;
|
||||
import com.songoda.ultimatestacker.events.EntityStackKillEvent;
|
||||
import com.songoda.ultimatestacker.settings.Settings;
|
||||
@ -132,6 +133,9 @@ public class EntityStack extends StackedEntity {
|
||||
public synchronized LivingEntity takeOneAndSpawnEntity(Location location) {
|
||||
if (amount <= 0) return null;
|
||||
LivingEntity entity = Objects.requireNonNull(location.getWorld()).spawn(location, hostEntity.getClass());
|
||||
if (Settings.NO_AI.getBoolean()) {
|
||||
EntityUtils.setUnaware(entity);
|
||||
}
|
||||
this.hostEntity = entity;
|
||||
setAmount(amount--);
|
||||
updateNameTag();
|
||||
|
Loading…
Reference in New Issue
Block a user