Disabling end entities fix.

This commit is contained in:
Necrontyr 2022-11-02 01:40:09 +01:00
parent ac96841372
commit 2218be75a9
7 changed files with 27 additions and 27 deletions

View file

@ -82,13 +82,13 @@ public class SilkMothHiveBlock extends BaseBlock {
if (!world.getBlockState(spawn).isAir()) {
return;
}
int count = world.getEntities(EndEntities.SILK_MOTH, new AABB(pos).inflate(16), (entity) -> {
int count = world.getEntities(EndEntities.SILK_MOTH.type(), new AABB(pos).inflate(16), (entity) -> {
return true;
}).size();
if (count > 6) {
return;
}
SilkMothEntity moth = new SilkMothEntity(EndEntities.SILK_MOTH, world);
SilkMothEntity moth = new SilkMothEntity(EndEntities.SILK_MOTH.type(), world);
moth.moveTo(spawn.getX() + 0.5, spawn.getY() + 0.5, spawn.getZ() + 0.5, dir.toYRot(), 0);
moth.setDeltaMovement(new Vec3(dir.getStepX() * 0.4, 0, dir.getStepZ() * 0.4));
moth.setHive(world, pos);