Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
- public class ModEntities {
- public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, MysticsBiomes.MOD_ID);
- //Entities
- public static final RegistryObject<EntityType<StrawberryCowEntity>> STRAWBERRY_COW = ENTITIES.register("strawberry_cow",
- () -> EntityType.Builder.create(StrawberryCowEntity::new, EntityClassification.CREATURE).size(0.9F, 1.4F).build(new ResourceLocation(MysticsBiomes.MOD_ID, "strawberry_cow").toString()));
- public static void registerEntities() {
- GlobalEntityTypeAttributes.put(STRAWBERRY_COW.get(), StrawberryCowEntity.createMutableAttribute().create());
- }
- public static void registerEntitySpawns() {
- EntitySpawnPlacementRegistry.register(STRAWBERRY_COW.get(), EntitySpawnPlacementRegistry.PlacementType.NO_RESTRICTIONS, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, AnimalEntity::canAnimalSpawn);
- }
- @OnlyIn(Dist.CLIENT)
- public static void setupEntitiesClient() {
- RenderingRegistry.registerEntityRenderingHandler(STRAWBERRY_COW.get(), StrawberryCowRenderer::new);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement