public class WeightedEntity extends WeightedObject<EntityType> implements DataSerializable
Modifier and Type | Field and Description |
---|---|
static DataQuery |
WEIGHTED_ENTITY_DATA |
static DataQuery |
WEIGHTED_ENTITY_TYPE |
static DataQuery |
WEIGHTED_ENTITY_WEIGHT |
object, weight
Constructor and Description |
---|
WeightedEntity(EntityType object,
int weight)
Creates a new
WeightedEntity with no additional properties. |
WeightedEntity(EntityType object,
int weight,
DataManipulator<?,?>... extraProperties)
Creates a new
WeightedEntity with the given additional
properties. |
WeightedEntity(EntityType object,
int weight,
Iterable<DataManipulator<?,?>> extraProperties)
Creates a new
WeightedEntity with the given additional
properties. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<ImmutableDataManipulator<?,?>> |
getAdditionalProperties()
Gets the additional properties to apply to the entity.
|
DataContainer |
toContainer()
Serializes this object into a comprehensible
DataContainer . |
String |
toString() |
get, getWeight, hashCode
public static final DataQuery WEIGHTED_ENTITY_TYPE
public static final DataQuery WEIGHTED_ENTITY_DATA
public static final DataQuery WEIGHTED_ENTITY_WEIGHT
public WeightedEntity(EntityType object, int weight)
WeightedEntity
with no additional properties.object
- The entity typeweight
- The weightpublic WeightedEntity(EntityType object, int weight, DataManipulator<?,?>... extraProperties)
WeightedEntity
with the given additional
properties.object
- The entity typeweight
- The weightextraProperties
- The additional properties to apply to the entitypublic WeightedEntity(EntityType object, int weight, Iterable<DataManipulator<?,?>> extraProperties)
WeightedEntity
with the given additional
properties.object
- The entity typeweight
- The weightextraProperties
- The additional properties to apply to the entitypublic List<ImmutableDataManipulator<?,?>> getAdditionalProperties()
public String toString()
toString
in class WeightedObject<EntityType>
public boolean equals(Object obj)
equals
in class WeightedObject<EntityType>
public DataContainer toContainer()
DataSerializable
DataContainer
.toContainer
in interface DataSerializable