Class ExpandEntityType
java.lang.Object
com.blamejared.crafttweaker.natives.entity.ExpandEntityType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CTEntityIngredientasEntityIngredient(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Casts the entity type to an entity ingredient.static CTEntityIngredientasList(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, CTEntityIngredient other) Combines two entity ingredients.static booleancanSpawnFarFromPlayer(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Checks if the entity can spawn far from the player.static booleancanSummon(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Checks if the entity can be summoned.static net.minecraft.world.entity.Entitycreate(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.world.level.Level level) Creates an entity.static booleanfireImmune(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Checks if the entity is fire immune.static net.minecraft.world.entity.MobCategorygetCategory(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the category of the entity.static StringgetCommandString(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the command string of the entity.static net.minecraft.resources.ResourceLocationgetDefaultLootTable(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the default loot table of the entity.static net.minecraft.network.chat.ComponentgetDescription(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the description of the entity.static StringgetDescriptionId(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the description ID of the entity.static net.minecraft.world.entity.EntityDimensionsgetDimensions(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the dimensions of the entity.static floatgetHeight(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the height of the entity.static net.minecraft.resources.ResourceLocationgetRegistryName(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the registry name of the entity.static floatgetWidth(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the width of the entity.static booleanisBlockDangerous(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.world.level.block.state.BlockState state) Checks if the entity is dangerous to blocks.static booleanisIn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, KnownTag<net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity>> tag) Checks if the entity is in a tag.static StringrawGetCommandString(net.minecraft.world.entity.EntityType<?> internal) Gets the raw command string of the entity.static net.minecraft.world.entity.Entityspawn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.server.level.ServerLevel level, IItemStack spawnStack, net.minecraft.world.entity.player.Player spawningPlayer, net.minecraft.core.BlockPos position, net.minecraft.world.entity.MobSpawnType spawnType, boolean alignPosition, boolean invertY) Spawns an entity.static net.minecraft.world.entity.Entityspawn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.server.level.ServerLevel level, Consumer<net.minecraft.world.entity.Entity> onSpawn, net.minecraft.core.BlockPos position, net.minecraft.world.entity.MobSpawnType spawnType, boolean alignPosition, boolean invertY) Spawns an entity.static net.minecraft.world.entity.Entityspawn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos position, net.minecraft.world.entity.MobSpawnType spawnType) Spawns an entity.static StringtoShortString(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the short string representation of the entity.
-
Constructor Details
-
ExpandEntityType
public ExpandEntityType()
-
-
Method Details
-
spawn
public static net.minecraft.world.entity.Entity spawn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.server.level.ServerLevel level, IItemStack spawnStack, net.minecraft.world.entity.player.Player spawningPlayer, net.minecraft.core.BlockPos position, net.minecraft.world.entity.MobSpawnType spawnType, boolean alignPosition, boolean invertY) Spawns an entity.- Parameters:
level- The level to spawn the entity in.spawnStack- The stack to spawn the entity with.spawningPlayer- The player that is spawning the entity.position- The position to spawn the entity at.spawnType- The type of spawn to use.alignPosition- Whether to align the position of the entity.invertY- Whether to offset the y position of the entity.- Returns:
- The spawned entity.
-
spawn
public static net.minecraft.world.entity.Entity spawn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos position, net.minecraft.world.entity.MobSpawnType spawnType) Spawns an entity.- Parameters:
level- The level to spawn the entity in.position- The position to spawn the entity at.spawnType- The type of spawn to use.- Returns:
- The spawned entity.
-
spawn
public static net.minecraft.world.entity.Entity spawn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.server.level.ServerLevel level, Consumer<net.minecraft.world.entity.Entity> onSpawn, net.minecraft.core.BlockPos position, net.minecraft.world.entity.MobSpawnType spawnType, boolean alignPosition, boolean invertY) Spawns an entity.- Parameters:
level- The level to spawn the entity in.onSpawn- The consumer to call when the entity is spawned.position- The position to spawn the entity at.spawnType- The type of spawn to use.alignPosition- Whether to align the position of the entity.invertY- Whether to offset the y position of the entity.- Returns:
- The spawned entity.
-
canSummon
public static boolean canSummon(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Checks if the entity can be summoned.- Returns:
- True if the entity can be summoned.
-
fireImmune
public static boolean fireImmune(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Checks if the entity is fire immune.- Parameters:
internal- The entity type to check.- Returns:
- True if the entity is fire immune.
-
canSpawnFarFromPlayer
public static boolean canSpawnFarFromPlayer(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Checks if the entity can spawn far from the player.- Returns:
- True if the entity can spawn far from the player.
-
getCategory
public static net.minecraft.world.entity.MobCategory getCategory(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the category of the entity.- Returns:
- The category of the entity.
-
getDescriptionId
public static String getDescriptionId(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the description ID of the entity.- Returns:
- The description ID of the entity.
-
getDescription
public static net.minecraft.network.chat.Component getDescription(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the description of the entity.- Returns:
- The description of the entity.
-
toShortString
public static String toShortString(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the short string representation of the entity.- Returns:
- The short string representation of the entity.
-
getDefaultLootTable
public static net.minecraft.resources.ResourceLocation getDefaultLootTable(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the default loot table of the entity.- Returns:
- The default loot table of the entity.
-
getWidth
public static float getWidth(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the width of the entity.- Returns:
- The width of the entity.
-
getHeight
public static float getHeight(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the height of the entity.- Returns:
- The height of the entity.
-
create
public static net.minecraft.world.entity.Entity create(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.world.level.Level level) Creates an entity.- Parameters:
level- The level to create the entity in.- Returns:
- The created entity.
-
isBlockDangerous
public static boolean isBlockDangerous(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, net.minecraft.world.level.block.state.BlockState state) Checks if the entity is dangerous to blocks.- Parameters:
state- The state of the block to check.- Returns:
- True if the entity is dangerous to blocks.
-
getDimensions
public static net.minecraft.world.entity.EntityDimensions getDimensions(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the dimensions of the entity.- Returns:
- The dimensions of the entity.
-
isIn
public static boolean isIn(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, KnownTag<net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity>> tag) Checks if the entity is in a tag.- Parameters:
tag- The tag to check.- Returns:
- True if the entity is in the tag.
-
getRegistryName
public static net.minecraft.resources.ResourceLocation getRegistryName(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the registry name of the entity.- Returns:
- The registry name of the entity.
-
getCommandString
public static String getCommandString(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Gets the command string of the entity.- Returns:
- The command string of the entity.
-
rawGetCommandString
Gets the raw command string of the entity.- Parameters:
internal- The entity type to get the raw command string of.- Returns:
- The raw command string of the entity.
-
asEntityIngredient
public static CTEntityIngredient asEntityIngredient(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal) Casts the entity type to an entity ingredient.- Returns:
- The entity ingredient.
-
asList
public static CTEntityIngredient asList(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, CTEntityIngredient other) Combines two entity ingredients.- Parameters:
other- The second entity ingredient.- Returns:
- The combined entity ingredient.
-