Only spawn specters in dark areas

This commit is contained in:
Sollace 2024-05-19 20:23:38 +01:00
parent b4126b839b
commit a42aaeefc0
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -86,13 +86,13 @@ public interface UEntities {
.trackRangeChunks(8)
.dimensions(EntityDimensions.fixed(3, 2)));
EntityType<SpecterEntity> SPECTER = register("specter", FabricEntityTypeBuilder.createMob().spawnGroup(SpawnGroup.MONSTER).entityFactory(SpecterEntity::new)
.spawnRestriction(Location.ON_GROUND, Type.MOTION_BLOCKING_NO_LEAVES, HostileEntity::canSpawnIgnoreLightLevel)
.spawnRestriction(Location.ON_GROUND, Type.MOTION_BLOCKING_NO_LEAVES, HostileEntity::canSpawnInDark)
.fireImmune()
.spawnableFarFromPlayer()
.dimensions(EntityDimensions.fixed(1, 2)));
EntityType<MimicEntity> MIMIC = register("mimic", FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, MimicEntity::new)
.fireImmune()
//.disableSummon()
.disableSummon()
.dimensions(EntityDimensions.changing(0.875F, 0.875F)));
static <T extends Entity> EntityType<T> register(String name, FabricEntityTypeBuilder<T> builder) {