Search in sources :

Example 1 with IFFTypeManager

use of net.sistr.littlemaidrebirth.entity.iff.IFFTypeManager in project LittleMaidReBirth-Fabric by SistrScarlet.

the class ModSetup method onInitialize.

@Override
public void onInitialize() {
    Networking.INSTANCE.serverInit();
    FabricDefaultAttributeRegistry.register(Registration.LITTLE_MAID_MOB, LittleMaidEntity.createLittleMaidAttributes());
    SpawnRestrictionAccessor.callRegister(Registration.LITTLE_MAID_MOB, SpawnRestriction.Location.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, (type, world, spawnReason, pos, random) -> LittleMaidEntity.isValidNaturalSpawn(world, pos));
    IFFTypeManager iffTypeManager = IFFTypeManager.getINSTANCE();
    Registry.ENTITY_TYPE.stream().filter(EntityType::isSummonable).forEach(entityType -> iffTypeManager.register(EntityType.getId(entityType), new IFFType(IFFTag.UNKNOWN, entityType)));
}
Also used : IFFTypeManager(net.sistr.littlemaidrebirth.entity.iff.IFFTypeManager) IFFType(net.sistr.littlemaidrebirth.entity.iff.IFFType)

Aggregations

IFFType (net.sistr.littlemaidrebirth.entity.iff.IFFType)1 IFFTypeManager (net.sistr.littlemaidrebirth.entity.iff.IFFTypeManager)1