Class ExpandEntityType

java.lang.Object
com.blamejared.crafttweaker.natives.entity.ExpandEntityType

@ZenRegister public class ExpandEntityType extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    asEntityIngredient(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Casts the entity type to an entity ingredient.
    asList(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, CTEntityIngredient other)
    Combines two entity ingredients.
    static boolean
    canSpawnFarFromPlayer(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Checks if the entity can spawn far from the player.
    static boolean
    canSummon(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Checks if the entity can be summoned.
    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.
    static boolean
    fireImmune(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Checks if the entity is fire immune.
    static net.minecraft.world.entity.MobCategory
    getCategory(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the category of the entity.
    static String
    getCommandString(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the command string of the entity.
    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.
    static net.minecraft.network.chat.Component
    getDescription(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the description of the entity.
    static String
    getDescriptionId(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the description ID of the entity.
    static net.minecraft.world.entity.EntityDimensions
    getDimensions(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the dimensions of the entity.
    static float
    getHeight(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the height of the entity.
    static net.minecraft.resources.ResourceLocation
    getRegistryName(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the registry name of the entity.
    static float
    getWidth(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the width of the entity.
    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.
    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.
    static String
    rawGetCommandString(net.minecraft.world.entity.EntityType<?> internal)
    Gets the raw command string of the entity.
    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.
    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.
    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.
    static String
    toShortString(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal)
    Gets the short string representation of the entity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static String rawGetCommandString(net.minecraft.world.entity.EntityType<?> internal)
      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.