use of net.minecraft.entity.SpawnReason in project VariousOddities by Lyinginbedmon.
the class VOEntities method register.
private static <T extends Entity> EntityType<T> register(String name, EntityType.IFactory<T> factory, EntityClassification type, float width, float height, int trackingRange) {
ResourceLocation location = new ResourceLocation(Reference.ModInfo.MOD_ID, name);
EntityType<T> entity = EntityType.Builder.create(factory, type).size(width, height).setTrackingRange(trackingRange).setUpdateInterval(1).build(location.toString());
entity.setRegistryName(location);
MISC_PROPERTIES_MAP.put(entity, new EntityRegistry(PlacementType.NO_RESTRICTIONS, Heightmap.Type.MOTION_BLOCKING, new IPlacementPredicate<T>() {
public boolean test(EntityType<T> p_test_1_, IServerWorld p_test_2_, SpawnReason p_test_3_, BlockPos p_test_4_, Random p_test_5_) {
return true;
}
}));
return entity;
}
Aggregations