public class EntityType<T extends Entity> extends ForgeRegistryEntry<EntityType<?>>
Modifier and Type | Class and Description |
---|---|
static class |
EntityType.Builder<T extends Entity> |
static interface |
EntityType.IFactory<T extends Entity> |
delegate
Constructor and Description |
---|
EntityType(EntityType.IFactory<T> factoryIn,
EntityClassification classificationIn,
boolean serializableIn,
boolean summonableIn,
boolean immuneToFireIn,
boolean p_i51559_6_,
EntitySize sizeIn) |
EntityType(EntityType.IFactory<T> factoryIn,
EntityClassification classificationIn,
boolean serializableIn,
boolean summonableIn,
boolean immuneToFireIn,
boolean p_i51559_6_,
EntitySize sizeIn,
java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier,
java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier,
java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier,
java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T> customClientFactory) |
Modifier and Type | Method and Description |
---|---|
static void |
applyItemNBT(World worldIn,
PlayerEntity player,
Entity spawnedEntity,
CompoundNBT itemNBT) |
static java.util.Optional<EntityType<?>> |
byKey(java.lang.String key) |
static Entity |
create(int id,
World worldIn) |
T |
create(World worldIn) |
T |
create(World worldIn,
CompoundNBT compound,
ITextComponent customName,
PlayerEntity playerIn,
BlockPos pos,
SpawnReason reason,
boolean p_220349_7_,
boolean p_220349_8_) |
private static Entity |
create(World worldIn,
EntityType<?> type) |
T |
customClientSpawn(FMLPlayMessages.SpawnEntity packet,
World world) |
private int |
defaultTrackingRangeSupplier() |
private int |
defaultUpdateIntervalSupplier() |
private boolean |
defaultVelocitySupplier() |
protected static double |
func_208051_a(IWorldReader worldReader,
BlockPos pos,
boolean p_208051_2_,
AxisAlignedBB p_208051_3_) |
AxisAlignedBB |
func_220328_a(double p_220328_1_,
double p_220328_3_,
double p_220328_5_) |
static Entity |
func_220335_a(CompoundNBT compound,
World worldIn,
java.util.function.Function<Entity,Entity> p_220335_2_) |
boolean |
func_225437_d() |
EntityClassification |
getClassification() |
float |
getHeight() |
static ResourceLocation |
getKey(EntityType<?> entityTypeIn) |
ResourceLocation |
getLootTable() |
ITextComponent |
getName() |
EntitySize |
getSize() |
java.util.Set<ResourceLocation> |
getTags()
Retrieves a list of tags names this is known to be associated with.
|
int |
getTrackingRange() |
java.lang.String |
getTranslationKey() |
int |
getUpdateFrequency() |
float |
getWidth() |
boolean |
isContained(Tag<EntityType<?>> tagIn) |
boolean |
isImmuneToFire() |
boolean |
isSerializable() |
boolean |
isSummonable() |
private static java.util.Optional<Entity> |
loadEntity(CompoundNBT compound,
World worldIn) |
static java.util.Optional<Entity> |
loadEntityUnchecked(CompoundNBT compound,
World worldIn) |
static java.util.Optional<EntityType<?>> |
readEntityType(CompoundNBT compound) |
private static <T extends Entity> |
register(java.lang.String key,
EntityType.Builder<T> builder) |
boolean |
shouldSendVelocityUpdates() |
T |
spawn(World worldIn,
CompoundNBT compound,
ITextComponent customName,
PlayerEntity playerIn,
BlockPos pos,
SpawnReason reason,
boolean p_220342_7_,
boolean p_220342_8_) |
Entity |
spawn(World worldIn,
ItemStack stack,
PlayerEntity playerIn,
BlockPos pos,
SpawnReason reason,
boolean p_220331_6_,
boolean p_220331_7_) |
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
private static final org.apache.logging.log4j.Logger LOGGER
public static final EntityType<AreaEffectCloudEntity> AREA_EFFECT_CLOUD
public static final EntityType<ArmorStandEntity> ARMOR_STAND
public static final EntityType<ArrowEntity> ARROW
public static final EntityType<BatEntity> BAT
public static final EntityType<BeeEntity> BEE
public static final EntityType<BlazeEntity> BLAZE
public static final EntityType<BoatEntity> BOAT
public static final EntityType<CatEntity> CAT
public static final EntityType<CaveSpiderEntity> CAVE_SPIDER
public static final EntityType<ChickenEntity> CHICKEN
public static final EntityType<CodEntity> COD
public static final EntityType<CowEntity> COW
public static final EntityType<CreeperEntity> CREEPER
public static final EntityType<DonkeyEntity> DONKEY
public static final EntityType<DolphinEntity> DOLPHIN
public static final EntityType<DragonFireballEntity> DRAGON_FIREBALL
public static final EntityType<DrownedEntity> DROWNED
public static final EntityType<ElderGuardianEntity> ELDER_GUARDIAN
public static final EntityType<EnderCrystalEntity> END_CRYSTAL
public static final EntityType<EnderDragonEntity> ENDER_DRAGON
public static final EntityType<EndermanEntity> ENDERMAN
public static final EntityType<EndermiteEntity> ENDERMITE
public static final EntityType<EvokerFangsEntity> EVOKER_FANGS
public static final EntityType<EvokerEntity> EVOKER
public static final EntityType<ExperienceOrbEntity> EXPERIENCE_ORB
public static final EntityType<EyeOfEnderEntity> EYE_OF_ENDER
public static final EntityType<FallingBlockEntity> FALLING_BLOCK
public static final EntityType<FireworkRocketEntity> FIREWORK_ROCKET
public static final EntityType<FoxEntity> FOX
public static final EntityType<GhastEntity> GHAST
public static final EntityType<GiantEntity> GIANT
public static final EntityType<GuardianEntity> GUARDIAN
public static final EntityType<HorseEntity> HORSE
public static final EntityType<HuskEntity> HUSK
public static final EntityType<IllusionerEntity> ILLUSIONER
public static final EntityType<ItemEntity> ITEM
public static final EntityType<ItemFrameEntity> ITEM_FRAME
public static final EntityType<FireballEntity> FIREBALL
public static final EntityType<LeashKnotEntity> LEASH_KNOT
public static final EntityType<LlamaEntity> LLAMA
public static final EntityType<LlamaSpitEntity> LLAMA_SPIT
public static final EntityType<MagmaCubeEntity> MAGMA_CUBE
public static final EntityType<MinecartEntity> MINECART
public static final EntityType<ChestMinecartEntity> CHEST_MINECART
public static final EntityType<MinecartCommandBlockEntity> COMMAND_BLOCK_MINECART
public static final EntityType<FurnaceMinecartEntity> FURNACE_MINECART
public static final EntityType<HopperMinecartEntity> HOPPER_MINECART
public static final EntityType<SpawnerMinecartEntity> SPAWNER_MINECART
public static final EntityType<TNTMinecartEntity> TNT_MINECART
public static final EntityType<MuleEntity> MULE
public static final EntityType<MooshroomEntity> MOOSHROOM
public static final EntityType<OcelotEntity> OCELOT
public static final EntityType<PaintingEntity> PAINTING
public static final EntityType<PandaEntity> PANDA
public static final EntityType<ParrotEntity> PARROT
public static final EntityType<PigEntity> PIG
public static final EntityType<PufferfishEntity> PUFFERFISH
public static final EntityType<ZombiePigmanEntity> ZOMBIE_PIGMAN
public static final EntityType<PolarBearEntity> POLAR_BEAR
public static final EntityType<TNTEntity> TNT
public static final EntityType<RabbitEntity> RABBIT
public static final EntityType<SalmonEntity> SALMON
public static final EntityType<SheepEntity> SHEEP
public static final EntityType<ShulkerEntity> SHULKER
public static final EntityType<ShulkerBulletEntity> SHULKER_BULLET
public static final EntityType<SilverfishEntity> SILVERFISH
public static final EntityType<SkeletonEntity> SKELETON
public static final EntityType<SkeletonHorseEntity> SKELETON_HORSE
public static final EntityType<SlimeEntity> SLIME
public static final EntityType<SmallFireballEntity> SMALL_FIREBALL
public static final EntityType<SnowGolemEntity> SNOW_GOLEM
public static final EntityType<SnowballEntity> SNOWBALL
public static final EntityType<SpectralArrowEntity> SPECTRAL_ARROW
public static final EntityType<SpiderEntity> SPIDER
public static final EntityType<SquidEntity> SQUID
public static final EntityType<StrayEntity> STRAY
public static final EntityType<TraderLlamaEntity> TRADER_LLAMA
public static final EntityType<TropicalFishEntity> TROPICAL_FISH
public static final EntityType<TurtleEntity> TURTLE
public static final EntityType<EggEntity> EGG
public static final EntityType<EnderPearlEntity> ENDER_PEARL
public static final EntityType<ExperienceBottleEntity> EXPERIENCE_BOTTLE
public static final EntityType<PotionEntity> POTION
public static final EntityType<TridentEntity> TRIDENT
public static final EntityType<VexEntity> VEX
public static final EntityType<VillagerEntity> VILLAGER
public static final EntityType<IronGolemEntity> IRON_GOLEM
public static final EntityType<VindicatorEntity> VINDICATOR
public static final EntityType<PillagerEntity> PILLAGER
public static final EntityType<WanderingTraderEntity> WANDERING_TRADER
public static final EntityType<WitchEntity> WITCH
public static final EntityType<WitherEntity> WITHER
public static final EntityType<WitherSkeletonEntity> WITHER_SKELETON
public static final EntityType<WitherSkullEntity> WITHER_SKULL
public static final EntityType<WolfEntity> WOLF
public static final EntityType<ZombieEntity> ZOMBIE
public static final EntityType<ZombieHorseEntity> ZOMBIE_HORSE
public static final EntityType<ZombieVillagerEntity> ZOMBIE_VILLAGER
public static final EntityType<PhantomEntity> PHANTOM
public static final EntityType<RavagerEntity> RAVAGER
public static final EntityType<LightningBoltEntity> LIGHTNING_BOLT
public static final EntityType<PlayerEntity> PLAYER
public static final EntityType<FishingBobberEntity> FISHING_BOBBER
private final EntityType.IFactory<T extends Entity> factory
private final EntityClassification classification
private final boolean serializable
private final boolean summonable
private final boolean immuneToFire
private final boolean field_225438_be
@Nullable private java.lang.String translationKey
@Nullable private ITextComponent name
@Nullable private ResourceLocation lootTable
private final EntitySize size
private final java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier
private final java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier
private final java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier
private final java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T extends Entity> customClientFactory
private final ReverseTagWrapper<EntityType<?>> reverseTags
public EntityType(EntityType.IFactory<T> factoryIn, EntityClassification classificationIn, boolean serializableIn, boolean summonableIn, boolean immuneToFireIn, boolean p_i51559_6_, EntitySize sizeIn)
public EntityType(EntityType.IFactory<T> factoryIn, EntityClassification classificationIn, boolean serializableIn, boolean summonableIn, boolean immuneToFireIn, boolean p_i51559_6_, EntitySize sizeIn, java.util.function.Predicate<EntityType<?>> velocityUpdateSupplier, java.util.function.ToIntFunction<EntityType<?>> trackingRangeSupplier, java.util.function.ToIntFunction<EntityType<?>> updateIntervalSupplier, java.util.function.BiFunction<FMLPlayMessages.SpawnEntity,World,T> customClientFactory)
private static <T extends Entity> EntityType<T> register(java.lang.String key, EntityType.Builder<T> builder)
public static ResourceLocation getKey(EntityType<?> entityTypeIn)
public static java.util.Optional<EntityType<?>> byKey(java.lang.String key)
@Nullable public Entity spawn(World worldIn, @Nullable ItemStack stack, @Nullable PlayerEntity playerIn, BlockPos pos, SpawnReason reason, boolean p_220331_6_, boolean p_220331_7_)
@Nullable public T spawn(World worldIn, @Nullable CompoundNBT compound, @Nullable ITextComponent customName, @Nullable PlayerEntity playerIn, BlockPos pos, SpawnReason reason, boolean p_220342_7_, boolean p_220342_8_)
@Nullable public T create(World worldIn, @Nullable CompoundNBT compound, @Nullable ITextComponent customName, @Nullable PlayerEntity playerIn, BlockPos pos, SpawnReason reason, boolean p_220349_7_, boolean p_220349_8_)
protected static double func_208051_a(IWorldReader worldReader, BlockPos pos, boolean p_208051_2_, AxisAlignedBB p_208051_3_)
public static void applyItemNBT(World worldIn, @Nullable PlayerEntity player, @Nullable Entity spawnedEntity, @Nullable CompoundNBT itemNBT)
public boolean isSerializable()
public boolean isSummonable()
public boolean isImmuneToFire()
public boolean func_225437_d()
public EntityClassification getClassification()
public java.lang.String getTranslationKey()
public ITextComponent getName()
public ResourceLocation getLootTable()
public float getWidth()
public float getHeight()
public static java.util.Optional<Entity> loadEntityUnchecked(CompoundNBT compound, World worldIn)
@Nullable private static Entity create(World worldIn, @Nullable EntityType<?> type)
public AxisAlignedBB func_220328_a(double p_220328_1_, double p_220328_3_, double p_220328_5_)
public EntitySize getSize()
public static java.util.Optional<EntityType<?>> readEntityType(CompoundNBT compound)
@Nullable public static Entity func_220335_a(CompoundNBT compound, World worldIn, java.util.function.Function<Entity,Entity> p_220335_2_)
private static java.util.Optional<Entity> loadEntity(CompoundNBT compound, World worldIn)
public int getTrackingRange()
private int defaultTrackingRangeSupplier()
public int getUpdateFrequency()
private int defaultUpdateIntervalSupplier()
public boolean shouldSendVelocityUpdates()
private boolean defaultVelocitySupplier()
public boolean isContained(Tag<EntityType<?>> tagIn)
public T customClientSpawn(FMLPlayMessages.SpawnEntity packet, World world)
public java.util.Set<ResourceLocation> getTags()