Expansion for MCEntityType

Link to expansion-for-mcentitytype

Additional methods for easier modification of entity-related loot tables.

Name: addDrop

Deprecated
Scheduled for removal in 1.17: use this#addLootModifier(MCEntityType, String, ILootModifier) instead.

Adds an IItemStack to the drops of this entity.

Return Type: void

ZenScript
Copy
MCEntityType.addDrop(uniqueId as string, stack as IItemStack) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
stack
Тип
IItemStack
Описание
The stack to add to the drops.

Name: addDrops

Deprecated
Scheduled for removal in 1.17: use this#addLootModifier(MCEntityType, String, ILootModifier) instead.

Adds a list of IItemStacks to the drops of this entity.

Return Type: void

ZenScript
Copy
MCEntityType.addDrops(uniqueId as string, stacks as IItemStack[]) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
stacks
Тип
IItemStack[]
Описание
The stacks to add to the drops.

Name: addLootModifier

Adds an ILootModifier to the current entity.

Return Type: void

ZenScript
Copy
MCEntityType.addLootModifier(name as string, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.

Link to addPlayerOnlyDrop

Name: addPlayerOnlyDrop

Deprecated
Scheduled for removal in 1.17: use this#addPlayerOnlyLootModifier(MCEntityType, String, ILootModifier) instead.

Adds an IItemStack to the drops of this entity, but only if the entity was killed by a player.

Return Type: void

ZenScript
Copy
MCEntityType.addPlayerOnlyDrop(uniqueId as string, stack as IItemStack) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
stack
Тип
IItemStack
Описание
The stack to add to the drops.

Link to addPlayerOnlyDrops

Name: addPlayerOnlyDrops

Deprecated
Scheduled for removal in 1.17: use this#addPlayerOnlyLootModifier(MCEntityType, String, ILootModifier) instead.

Adds a list of IItemStacks to the drops of this entity, but only if the entity was killed by a player.

Return Type: void

ZenScript
Copy
MCEntityType.addPlayerOnlyDrops(uniqueId as string, stacks as IItemStack[]) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
stacks
Тип
IItemStack[]
Описание
The stacks to add to the drops.

Link to addPlayerOnlyLootModifier

Name: addPlayerOnlyLootModifier

Adds an ILootModifier to the current entity that fires only if the entity was killed by a player.

Return Type: void

ZenScript
Copy
MCEntityType.addPlayerOnlyLootModifier(name as string, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.

Link to addWeaponAndPlayerOnlyDrop

Name: addWeaponAndPlayerOnlyDrop

Deprecated
Scheduled for removal in 1.17: use this#addWeaponAndPlayerOnlyLootModifier(MCEntityType, String, IItemStack, ILootModifier) instead.

Adds an IItemStack to the drops of this entity, but only if the entity was killed by a player with the given weapon.

Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponAndPlayerOnlyDrop(uniqueId as string, weapon as IItemStack, stack as IItemStack) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
stack
Тип
IItemStack
Описание
The stack to add to the drops.

Link to addWeaponAndPlayerOnlyDrops

Name: addWeaponAndPlayerOnlyDrops

Deprecated
Scheduled for removal in 1.17: use this#addWeaponAndPlayerOnlyLootModifier(MCEntityType, String, IItemStack, ILootModifier) instead.

Adds a list of IItemStacks to the drops of this entity, but only if the entity was killed by a player with the given weapon.

Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponAndPlayerOnlyDrops(uniqueId as string, weapon as IItemStack, stacks as IItemStack[]) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
stacks
Тип
IItemStack[]
Описание
The stacks to add to the drops.

Link to addWeaponAndPlayerOnlyLootModifier

Name: addWeaponAndPlayerOnlyLootModifier

Adds an ILootModifier to the current entity that fires only if the entity was killed by a player with the given weapon.

Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponAndPlayerOnlyLootModifier(name as string, weapon as IItemStack, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.

Link to addWeaponAndPlayerOnlyLootModifier

Name: addWeaponAndPlayerOnlyLootModifier

Adds an ILootModifier to the current entity that fires only if the entity was killed by a player with the given weapon, optionally considering its damage.

Additional parameters that further specify the weapon, such as NBT, or count, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponAndPlayerOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
matchDamage
Тип
boolean
Описание
Whether to consider damage or not when identifying the weapon.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.

Link to addWeaponAndPlayerOnlyLootModifier

Name: addWeaponAndPlayerOnlyLootModifier

Adds an ILootModifier to the current entity that fires only if the entity was killed by a player with the given weapon, optionally considering its damage and NBT data.

Additional parameters that further specify the weapon, such as count, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponAndPlayerOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, matchNbt as boolean, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
matchDamage
Тип
boolean
Описание
Whether to consider damage or not when identifying the weapon.
Параметр
matchNbt
Тип
boolean
Описание
Whether to consider NBT data or not when identifying the weapon.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.

Link to addWeaponOnlyDrop

Name: addWeaponOnlyDrop

Deprecated
Scheduled for removal in 1.17: use this#addWeaponOnlyLootModifier(MCEntityType, String, IItemStack, ILootModifier) instead.

Adds an IItemStack to the drops of this entity, but only if the entity was killed with the given weapon.

Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponOnlyDrop(uniqueId as string, weapon as IItemStack, stack as IItemStack) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
stack
Тип
IItemStack
Описание
The stack to add to the drops.

Link to addWeaponOnlyDrops

Name: addWeaponOnlyDrops

Deprecated
Scheduled for removal in 1.17: use this#addWeaponOnlyLootModifier(MCEntityType, String, IItemStack, ILootModifier) instead.

Adds a list of IItemStacks to the drops of this entity, but only if the entity was killed with the given weapon.

Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponOnlyDrops(uniqueId as string, weapon as IItemStack, stacks as IItemStack[]) as void
ПараметрТипОписание
Параметр
uniqueId
Тип
string
Описание
A unique id for the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
stacks
Тип
IItemStack[]
Описание
The stacks to add to the drops.

Link to addWeaponOnlyLootModifier

Name: addWeaponOnlyLootModifier

Adds an ILootModifier to the current entity that fires only if the entity was killed with the given weapon.

Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponOnlyLootModifier(name as string, weapon as IItemStack, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.

Link to addWeaponOnlyLootModifier

Name: addWeaponOnlyLootModifier

Adds an ILootModifier to the current entity that fires only if the entity was killed with the given weapon, optionally considering its damage.

Additional parameters that further specify the weapon, such as NBT, or count, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
matchDamage
Тип
boolean
Описание
Whether to consider damage or not when identifying the weapon.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.

Link to addWeaponOnlyLootModifier

Name: addWeaponOnlyLootModifier

Adds an ILootModifier to the current entity that fires only if the entity was killed with the given weapon, optionally considering its damage and NBT data.

Additional parameters that further specify the weapon, such as count, are ignored.

Return Type: void

ZenScript
Copy
MCEntityType.addWeaponOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, matchNbt as boolean, modifier as ILootModifier) as void
ПараметрТипОписание
Параметр
name
Тип
string
Описание
The name of the loot modifier.
Параметр
weapon
Тип
IItemStack
Описание
The weapon that needs to be used to kill the entity.
Параметр
matchDamage
Тип
boolean
Описание
Whether to consider damage or not when identifying the weapon.
Параметр
matchNbt
Тип
boolean
Описание
Whether to consider NBT data or not when identifying the weapon.
Параметр
modifier
Тип
ILootModifier
Описание
The loot modifier to add to the entity.