E - The entity typepublic final class EntityEntryBuilder<E extends Entity>
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
class  | 
EntityEntryBuilder.BuiltEntityEntry  | 
class  | 
EntityEntryBuilder.Spawn  | 
| Modifier and Type | Method and Description | 
|---|---|
EntityEntry | 
build()
Create an entity entry based on the data in this builder. 
 | 
static <E extends Entity> | 
create()
Creates a new entity entry builder. 
 | 
EntityEntryBuilder<E> | 
egg(int primaryColor,
   int secondaryColor)
Sets the egg of the entity. 
 | 
EntityEntryBuilder<E> | 
entity(java.lang.Class<? extends E> entity)
Sets the class of the entity. 
 | 
EntityEntryBuilder<E> | 
factory(java.util.function.Function<World,E> factory)
Sets the factory of the entity. 
 | 
EntityEntryBuilder<E> | 
id(ResourceLocation id,
  int network)
Sets the id of the entity. 
 | 
EntityEntryBuilder<E> | 
id(java.lang.String id,
  int network)
Sets the id of the entity. 
 | 
EntityEntryBuilder<E> | 
name(java.lang.String name)
Sets the name of the entity. 
 | 
EntityEntryBuilder<E> | 
spawn(EnumCreatureType type,
     int weight,
     int min,
     int max,
     Biome... biomes)
Adds a spawn entry. 
 | 
EntityEntryBuilder<E> | 
spawn(EnumCreatureType type,
     int weight,
     int min,
     int max,
     java.lang.Iterable<Biome> biomes)
Adds a spawn entry. 
 | 
EntityEntryBuilder<E> | 
tracker(int range,
       int updateFrequency,
       boolean sendVelocityUpdates)
Sets entity tracking information. 
 | 
public static <E extends Entity> EntityEntryBuilder<E> create()
E - The entity typepublic final EntityEntryBuilder<E> entity(java.lang.Class<? extends E> entity)
Entities will be constructed using a constructor accepting World. If you wish
 to use your own factory, use factory(Function).
entity - The entity classjava.lang.NullPointerException - If entity is nullpublic final EntityEntryBuilder<E> factory(java.util.function.Function<World,E> factory)
factory - The entity factoryjava.lang.NullPointerException - If entity is nullpublic final EntityEntryBuilder<E> id(ResourceLocation id, int network)
id - The entity idnetwork - The network idjava.lang.NullPointerException - If id is nullpublic final EntityEntryBuilder<E> id(java.lang.String id, int network)
id - The entity idnetwork - The network idjava.lang.NullPointerException - If id is nullpublic final EntityEntryBuilder<E> name(java.lang.String name)
name - The entity namejava.lang.NullPointerException - If name is nullpublic final EntityEntryBuilder<E> tracker(int range, int updateFrequency, boolean sendVelocityUpdates)
range - The tracking rangeupdateFrequency - The tracking update frequencysendVelocityUpdates - If the entity should send velocity updatespublic final EntityEntryBuilder<E> spawn(EnumCreatureType type, int weight, int min, int max, Biome... biomes)
type - The creature typeweight - The spawn entry weightmin - The minimum spawn countmax - The maximum spawn countbiomes - The biomes to add an entry injava.lang.IllegalArgumentException - If the entity is not a EntityLivingjava.lang.NullPointerException - If type is nulljava.lang.NullPointerException - If biomes is nullpublic final EntityEntryBuilder<E> spawn(EnumCreatureType type, int weight, int min, int max, java.lang.Iterable<Biome> biomes)
type - The creature typeweight - The spawn entry weightmin - The minimum spawn countmax - The maximum spawn countbiomes - The biomes to add an entry injava.lang.IllegalArgumentException - If the entity is not a EntityLivingjava.lang.NullPointerException - If type is nulljava.lang.NullPointerException - If biomes is nullpublic final EntityEntryBuilder<E> egg(int primaryColor, int secondaryColor)
primaryColor - the primary egg colorsecondaryColor - the secondary egg colorpublic EntityEntry build()
java.lang.IllegalStateException - If the entity class has not been providedjava.lang.IllegalStateException - If the entity id has not been providedjava.lang.IllegalStateException - If the entity name has not been providedjava.lang.IllegalStateException - If spawns have been provided for a non EntityLivingReflectionHelper.UnknownConstructorException - If a factory has not been provided
     and entity does not have a constructor accepting World