Package net.minecraft.world.entity
Class EntityType<T extends Entity>
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<EntityType<?>>
net.minecraft.world.entity.EntityType<T>
- All Implemented Interfaces:
EntityTypeTest<Entity,T>
,IForgeRegistryEntry<EntityType<?>>
public class EntityType<T extends Entity>
extends ForgeRegistryEntry<EntityType<?>>
implements EntityTypeTest<Entity,T>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
EntityType.Builder<T extends Entity>
static interface
EntityType.EntityFactory<T extends Entity>
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic EntityType<AreaEffectCloud>
static EntityType<ArmorStand>
static EntityType<Arrow>
static EntityType<Axolotl>
static EntityType<Bat>
static EntityType<Bee>
static EntityType<Blaze>
static EntityType<Boat>
private boolean
static EntityType<Cat>
private MobCategory
static EntityType<CaveSpider>
static EntityType<MinecartChest>
static EntityType<Chicken>
private int
static EntityType<Cod>
static EntityType<MinecartCommandBlock>
static EntityType<Cow>
static EntityType<Creeper>
private BiFunction<FMLPlayMessages.SpawnEntity,Level,T>
private Component
private String
private EntityDimensions
static EntityType<Dolphin>
static EntityType<Donkey>
static EntityType<DragonFireball>
static EntityType<Drowned>
static EntityType<ThrownEgg>
static EntityType<ElderGuardian>
static EntityType<EndCrystal>
static EntityType<EnderDragon>
static EntityType<ThrownEnderpearl>
static EntityType<EnderMan>
static EntityType<Endermite>
static String
static EntityType<Evoker>
static EntityType<EvokerFangs>
static EntityType<ThrownExperienceBottle>
static EntityType<ExperienceOrb>
static EntityType<EyeOfEnder>
private EntityType.EntityFactory<T>
static EntityType<FallingBlockEntity>
static EntityType<LargeFireball>
private boolean
static EntityType<FireworkRocketEntity>
static EntityType<FishingHook>
static EntityType<Fox>
static EntityType<MinecartFurnace>
static EntityType<Ghast>
static EntityType<Giant>
static EntityType<GlowItemFrame>
static EntityType<GlowSquid>
static EntityType<Goat>
static EntityType<Guardian>
static EntityType<Hoglin>
static EntityType<MinecartHopper>
static EntityType<Horse>
static EntityType<Husk>
static EntityType<Illusioner>
private com.google.common.collect.ImmutableSet<Block>
static EntityType<IronGolem>
static EntityType<ItemEntity>
static EntityType<ItemFrame>
static EntityType<LeashFenceKnotEntity>
static EntityType<LightningBolt>
static EntityType<Llama>
static EntityType<LlamaSpit>
private static org.apache.logging.log4j.Logger
private ResourceLocation
private static float
static EntityType<MagmaCube>
static EntityType<Marker>
static EntityType<Minecart>
static EntityType<MushroomCow>
static EntityType<Mule>
static EntityType<Ocelot>
static EntityType<Painting>
static EntityType<Panda>
static EntityType<Parrot>
static EntityType<Phantom>
static EntityType<Pig>
static EntityType<Piglin>
static EntityType<PiglinBrute>
static EntityType<Pillager>
static EntityType<Player>
static EntityType<PolarBear>
static EntityType<ThrownPotion>
static EntityType<Pufferfish>
static EntityType<Rabbit>
static EntityType<Ravager>
private ReverseTagWrapper<EntityType<?>>
static EntityType<Salmon>
private boolean
static EntityType<Sheep>
static EntityType<Shulker>
static EntityType<ShulkerBullet>
static EntityType<Silverfish>
static EntityType<Skeleton>
static EntityType<SkeletonHorse>
static EntityType<Slime>
static EntityType<SmallFireball>
static EntityType<SnowGolem>
static EntityType<Snowball>
static EntityType<MinecartSpawner>
static EntityType<SpectralArrow>
static EntityType<Spider>
static EntityType<Squid>
static EntityType<Stray>
static EntityType<Strider>
private boolean
static EntityType<PrimedTnt>
static EntityType<MinecartTNT>
private ToIntFunction<EntityType<?>>
static EntityType<TraderLlama>
static EntityType<ThrownTrident>
static EntityType<TropicalFish>
static EntityType<Turtle>
private int
private ToIntFunction<EntityType<?>>
private Predicate<EntityType<?>>
static EntityType<Vex>
static EntityType<Villager>
static EntityType<Vindicator>
static EntityType<WanderingTrader>
static EntityType<Witch>
static EntityType<WitherBoss>
static EntityType<WitherSkeleton>
static EntityType<WitherSkull>
static EntityType<Wolf>
static EntityType<Zoglin>
static EntityType<Zombie>
static EntityType<ZombieHorse>
static EntityType<ZombieVillager>
static EntityType<ZombifiedPiglin>
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
ConstructorDescriptionEntityType(EntityType.EntityFactory<T> p_20574_, MobCategory p_20575_, boolean p_20576_, boolean p_20577_, boolean p_20578_, boolean p_20579_, com.google.common.collect.ImmutableSet<Block> p_20580_, EntityDimensions p_20581_, int p_20582_, int p_20583_)
EntityType(EntityType.EntityFactory<T> p_20574_, MobCategory p_20575_, boolean p_20576_, boolean p_20577_, boolean p_20578_, boolean p_20579_, com.google.common.collect.ImmutableSet<Block> p_20580_, EntityDimensions p_20581_, int p_20582_, int p_20583_, Predicate<EntityType<?>> velocityUpdateSupplier, ToIntFunction<EntityType<?>> trackingRangeSupplier, ToIntFunction<EntityType<?>> updateIntervalSupplier, BiFunction<FMLPlayMessages.SpawnEntity,Level,T> customClientFactory)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<EntityType<?>>
by(CompoundTag p_20638_)
static Optional<EntityType<?>>
boolean
boolean
boolean
int
static Entity
create(CompoundTag p_20643_, Level p_20644_)
create(ServerLevel p_20656_, CompoundTag p_20657_, Component p_20658_, Player p_20659_, BlockPos p_20660_, MobSpawnType p_20661_, boolean p_20662_, boolean p_20663_)
private static Entity
create(Level p_20618_, EntityType<?> p_20619_)
customClientSpawn(FMLPlayMessages.SpawnEntity packet, Level world)
private int
private int
private boolean
boolean
getAABB(double p_20586_, double p_20587_, double p_20588_)
float
static ResourceLocation
getKey(EntityType<?> p_20614_)
getTags()
Retrieves a list of tags names this is known to be associated with.float
getWidth()
protected static double
getYOffset(LevelReader p_20626_, BlockPos p_20627_, boolean p_20628_, AABB p_20629_)
boolean
is(Tag<EntityType<?>> p_20610_)
boolean
isBlockDangerous(BlockState p_20631_)
loadEntitiesRecursive(List<? extends Tag> p_147046_, Level p_147047_)
static Entity
loadEntityRecursive(CompoundTag p_20646_, Level p_20647_, Function<Entity,Entity> p_20648_)
loadStaticEntity(CompoundTag p_20670_, Level p_20671_)
private static <T extends Entity>
EntityType<T>register(String p_20635_, EntityType.Builder<T> p_20636_)
spawn(ServerLevel p_20601_, CompoundTag p_20602_, Component p_20603_, Player p_20604_, BlockPos p_20605_, MobSpawnType p_20606_, boolean p_20607_, boolean p_20608_)
spawn(ServerLevel p_20593_, ItemStack p_20594_, Player p_20595_, BlockPos p_20596_, MobSpawnType p_20597_, boolean p_20598_, boolean p_20599_)
toString()
boolean
static void
updateCustomEntityTag(Level p_20621_, Player p_20622_, Entity p_20623_, CompoundTag p_20624_)
int
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
ENTITY_TAG
- See Also:
- Constant Field Values
-
MAGIC_HORSE_WIDTH
private static final float MAGIC_HORSE_WIDTH- See Also:
- Constant Field Values
-
AREA_EFFECT_CLOUD
-
ARMOR_STAND
-
ARROW
-
AXOLOTL
-
BAT
-
BEE
-
BLAZE
-
BOAT
-
CAT
-
CAVE_SPIDER
-
CHICKEN
-
COD
-
COW
-
CREEPER
-
DOLPHIN
-
DONKEY
-
DRAGON_FIREBALL
-
DROWNED
-
ELDER_GUARDIAN
-
END_CRYSTAL
-
ENDER_DRAGON
-
ENDERMAN
-
ENDERMITE
-
EVOKER
-
EVOKER_FANGS
-
EXPERIENCE_ORB
-
EYE_OF_ENDER
-
FALLING_BLOCK
-
FIREWORK_ROCKET
-
FOX
-
GHAST
-
GIANT
-
GLOW_ITEM_FRAME
-
GLOW_SQUID
-
GOAT
-
GUARDIAN
-
HOGLIN
-
HORSE
-
HUSK
-
ILLUSIONER
-
IRON_GOLEM
-
ITEM
-
ITEM_FRAME
-
FIREBALL
-
LEASH_KNOT
-
LIGHTNING_BOLT
-
LLAMA
-
LLAMA_SPIT
-
MAGMA_CUBE
-
MARKER
-
MINECART
-
CHEST_MINECART
-
COMMAND_BLOCK_MINECART
-
FURNACE_MINECART
-
HOPPER_MINECART
-
SPAWNER_MINECART
-
TNT_MINECART
-
MULE
-
MOOSHROOM
-
OCELOT
-
PAINTING
-
PANDA
-
PARROT
-
PHANTOM
-
PIG
-
PIGLIN
-
PIGLIN_BRUTE
-
PILLAGER
-
POLAR_BEAR
-
TNT
-
PUFFERFISH
-
RABBIT
-
RAVAGER
-
SALMON
-
SHEEP
-
SHULKER
-
SHULKER_BULLET
-
SILVERFISH
-
SKELETON
-
SKELETON_HORSE
-
SLIME
-
SMALL_FIREBALL
-
SNOW_GOLEM
-
SNOWBALL
-
SPECTRAL_ARROW
-
SPIDER
-
SQUID
-
STRAY
-
STRIDER
-
EGG
-
ENDER_PEARL
-
EXPERIENCE_BOTTLE
-
POTION
-
TRIDENT
-
TRADER_LLAMA
-
TROPICAL_FISH
-
TURTLE
-
VEX
-
VILLAGER
-
VINDICATOR
-
WANDERING_TRADER
-
WITCH
-
WITHER
-
WITHER_SKELETON
-
WITHER_SKULL
-
WOLF
-
ZOGLIN
-
ZOMBIE
-
ZOMBIE_HORSE
-
ZOMBIE_VILLAGER
-
ZOMBIFIED_PIGLIN
-
PLAYER
-
FISHING_BOBBER
-
factory
-
category
-
immuneTo
-
serialize
private final boolean serialize -
summon
private final boolean summon -
fireImmune
private final boolean fireImmune -
canSpawnFarFromPlayer
private final boolean canSpawnFarFromPlayer -
clientTrackingRange
private final int clientTrackingRange -
updateInterval
private final int updateInterval -
descriptionId
-
description
-
lootTable
-
dimensions
-
velocityUpdateSupplier
-
trackingRangeSupplier
-
updateIntervalSupplier
-
customClientFactory
-
reverseTags
-
-
Constructor Details
-
EntityType
public EntityType(EntityType.EntityFactory<T> p_20574_, MobCategory p_20575_, boolean p_20576_, boolean p_20577_, boolean p_20578_, boolean p_20579_, com.google.common.collect.ImmutableSet<Block> p_20580_, EntityDimensions p_20581_, int p_20582_, int p_20583_) -
EntityType
public EntityType(EntityType.EntityFactory<T> p_20574_, MobCategory p_20575_, boolean p_20576_, boolean p_20577_, boolean p_20578_, boolean p_20579_, com.google.common.collect.ImmutableSet<Block> p_20580_, EntityDimensions p_20581_, int p_20582_, int p_20583_, Predicate<EntityType<?>> velocityUpdateSupplier, ToIntFunction<EntityType<?>> trackingRangeSupplier, ToIntFunction<EntityType<?>> updateIntervalSupplier, BiFunction<FMLPlayMessages.SpawnEntity,Level,T> customClientFactory)
-
-
Method Details
-
register
private static <T extends Entity> EntityType<T> register(String p_20635_, EntityType.Builder<T> p_20636_) -
getKey
-
byString
-
spawn
@Nullable public Entity spawn(ServerLevel p_20593_, @Nullable ItemStack p_20594_, @Nullable Player p_20595_, BlockPos p_20596_, MobSpawnType p_20597_, boolean p_20598_, boolean p_20599_) -
spawn
@Nullable public T spawn(ServerLevel p_20601_, @Nullable CompoundTag p_20602_, @Nullable Component p_20603_, @Nullable Player p_20604_, BlockPos p_20605_, MobSpawnType p_20606_, boolean p_20607_, boolean p_20608_) -
create
@Nullable public T create(ServerLevel p_20656_, @Nullable CompoundTag p_20657_, @Nullable Component p_20658_, @Nullable Player p_20659_, BlockPos p_20660_, MobSpawnType p_20661_, boolean p_20662_, boolean p_20663_) -
getYOffset
protected static double getYOffset(LevelReader p_20626_, BlockPos p_20627_, boolean p_20628_, AABB p_20629_) -
updateCustomEntityTag
public static void updateCustomEntityTag(Level p_20621_, @Nullable Player p_20622_, @Nullable Entity p_20623_, @Nullable CompoundTag p_20624_) -
canSerialize
public boolean canSerialize() -
canSummon
public boolean canSummon() -
fireImmune
public boolean fireImmune() -
canSpawnFarFromPlayer
public boolean canSpawnFarFromPlayer() -
getCategory
-
getDescriptionId
-
getDescription
-
toString
-
toShortString
-
getDefaultLootTable
-
getWidth
public float getWidth() -
getHeight
public float getHeight() -
create
-
create
-
create
-
create
-
getAABB
-
isBlockDangerous
-
getDimensions
-
by
-
loadEntityRecursive
-
loadEntitiesRecursive
-
loadStaticEntity
-
clientTrackingRange
public int clientTrackingRange() -
defaultTrackingRangeSupplier
private int defaultTrackingRangeSupplier() -
updateInterval
public int updateInterval() -
defaultUpdateIntervalSupplier
private int defaultUpdateIntervalSupplier() -
trackDeltas
public boolean trackDeltas() -
defaultVelocitySupplier
private boolean defaultVelocitySupplier() -
is
-
tryCast
- Specified by:
tryCast
in interfaceEntityTypeTest<Entity,T extends Entity>
-
getBaseClass
- Specified by:
getBaseClass
in interfaceEntityTypeTest<Entity,T extends Entity>
-
customClientSpawn
-
getTags
Retrieves a list of tags names this is known to be associated with. This should be used in favor of TagCollection.getOwningTags, as this caches the result and automatically updates when the TagCollection changes.
-