EntityType
Link to entitytype
Importare la Classe
Link to importare-la-classe
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.entity.EntityType;
Caster
Link to caster
Result Type | Implicito |
---|---|
Result Type EntityIngredient | Implicito sì |
Metodi
Link to metodi
Name: canSpawnFarFromPlayer
Return Type: boolean
ZenScript Copy// EntityType.canSpawnFarFromPlayer() as boolean
myEntityType.canSpawnFarFromPlayer();
Name: canSummon
Return Type: boolean
ZenScript Copy// EntityType.canSummon() as boolean
myEntityType.canSummon();
Name: create
Return Type: Entity?
ZenScript CopyEntityType.create(level as ServerLevel, data as MapData?, displayName as Component?, spawningPlayer as Player?, pos as BlockPos, spawnType as MobSpawnType, alignPosition as boolean, invertY as boolean) as Entity?
Parametro | Tipo |
---|---|
Parametro level | Tipo ServerLevel |
Parametro data | Tipo MapData? |
Parametro displayName | Tipo Component? |
Parametro spawningPlayer | Tipo Player? |
Parametro pos | Tipo BlockPos |
Parametro spawnType | Tipo MobSpawnType |
Parametro alignPosition | Tipo boolean |
Parametro invertY | Tipo boolean |
Name: fireImmune
Return Type: boolean
ZenScript Copy// EntityType.fireImmune() as boolean
myEntityType.fireImmune();
Name: getCategory
Return Type: MobCategory
ZenScript Copy// EntityType.getCategory() as MobCategory
myEntityType.getCategory();
Name: getDefaultLootTable
Return Type: ResourceLocation
ZenScript Copy// EntityType.getDefaultLootTable() as ResourceLocation
myEntityType.getDefaultLootTable();
Name: getDescription
Return Type: Component
ZenScript Copy// EntityType.getDescription() as Component
myEntityType.getDescription();
Name: getDescriptionId
Return Type: string
ZenScript Copy// EntityType.getDescriptionId() as string
myEntityType.getDescriptionId();
Name: getDimensions
Return Type: EntityDimensions
ZenScript Copy// EntityType.getDimensions() as EntityDimensions
myEntityType.getDimensions();
Name: getHeight
Return Type: float
ZenScript Copy// EntityType.getHeight() as float
myEntityType.getHeight();
Name: getRegistryName
Return Type: ResourceLocation
ZenScript Copy// EntityType.getRegistryName() as ResourceLocation
myEntityType.getRegistryName();
Name: getWidth
Return Type: float
ZenScript Copy// EntityType.getWidth() as float
myEntityType.getWidth();
Name: isBlockDangerous
Return Type: boolean
ZenScript CopyEntityType.isBlockDangerous(state as BlockState) as boolean
Parametro | Tipo |
---|---|
Parametro state | Tipo BlockState |
Name: isIn
Return Type: boolean
ZenScript CopyEntityType.isIn(tag as KnownTag<EntityType<Entity>>) as boolean
Parametro | Tipo |
---|---|
Parametro tag | Tipo KnownTag<EntityType<Entity>> |
Name: spawn
Return Type: Entity?
ZenScript CopyEntityType.spawn(level as ServerLevel, data as MapData?, displayName as Component?, spawningPlayer as Player?, pos as BlockPos, spawnType as MobSpawnType, alignPosition as boolean, invertY as boolean) as Entity?
Parametro | Tipo |
---|---|
Parametro level | Tipo ServerLevel |
Parametro data | Tipo MapData? |
Parametro displayName | Tipo Component? |
Parametro spawningPlayer | Tipo Player? |
Parametro pos | Tipo BlockPos |
Parametro spawnType | Tipo MobSpawnType |
Parametro alignPosition | Tipo boolean |
Parametro invertY | Tipo boolean |
Name: toShortString
Return Type: string
ZenScript Copy// EntityType.toShortString() as string
myEntityType.toShortString();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome canSpawnFarFromPlayer | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome canSummon | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome category | Tipo MobCategory | Ha Getter sì | Ha Setter no |
Nome commandString | Tipo string | Ha Getter sì | Ha Setter no |
Nome defaultLootTable | Tipo ResourceLocation | Ha Getter sì | Ha Setter no |
Nome description | Tipo Component | Ha Getter sì | Ha Setter no |
Nome descriptionId | Tipo string | Ha Getter sì | Ha Setter no |
Nome dimensions | Tipo EntityDimensions | Ha Getter sì | Ha Setter no |
Nome fireImmune | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome height | Tipo float | Ha Getter sì | Ha Setter no |
Nome registryName | Tipo ResourceLocation | Ha Getter sì | Ha Setter no |
Nome toShortString | Tipo string | Ha Getter sì | Ha Setter no |
Nome width | Tipo float | Ha Getter sì | Ha Setter no |