Advertisement
jayhillx

ModEntities

Dec 22nd, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. public class ModEntities {
  2.  
  3. public static final EntityType<StrawberryCowEntity> STRAWBERRY_COW = EntityType.Builder.create(StrawberryCowEntity::new, EntityClassification.CREATURE).setTrackingRange(80).setUpdateInterval(3).setShouldReceiveVelocityUpdates(true).size(0.9F, 1.4F).build(prefix("strawberry_cow"));
  4.  
  5. public static void registerEntity(IForgeRegistry<EntityType<?>> event) {
  6. event.register(STRAWBERRY_COW.setRegistryName("strawberry_cow"));
  7.  
  8. GlobalEntityTypeAttributes.put(STRAWBERRY_COW, StrawberryCowEntity.createMutableAttribute().create());
  9.  
  10. EntitySpawnPlacementRegistry.register(STRAWBERRY_COW, EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, StrawberryCowEntity::spawnHandler);
  11. }
  12.  
  13. private static String prefix(String path) {
  14. return MysticsBiomes.MOD_ID + "." + path;
  15. }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement