Expansion for EntityType
Link to expansion-for-entitytype
Additional methods for easier modification of entity-related loot tables.
使用方式
Link to 使用方式
Name: addLootModifier
Adds an ILootModifier to the current entity.
ZenScript CopyEntityType.addLootModifier(name as string, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The name of the loot modifier. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add to the entity. |
Name: addPlayerOnlyLootModifier
Adds an ILootModifier to the current entity that fires only if the entity was killed by a player.
ZenScript CopyEntityType.addPlayerOnlyLootModifier(name as string, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The name of the loot modifier. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add to the entity. |
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.
ZenScript CopyEntityType.addWeaponAndPlayerOnlyLootModifier(name as string, weapon as IItemStack, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 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. |
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.
ZenScript CopyEntityType.addWeaponAndPlayerOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The name of the loot modifier. |
参数 weapon | 类型 IItemstack | 描述 The weapon that needs to be used to kill the entity. |
参数 matchDamage | 类型 布尔值 | 描述 Whether to consider damage or not when identifying the weapon. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add to the entity. |
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.
ZenScript CopyEntityType.addWeaponAndPlayerOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, matchNbt as boolean, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The name of the loot modifier. |
参数 weapon | 类型 IItemstack | 描述 The weapon that needs to be used to kill the entity. |
参数 matchDamage | 类型 布尔值 | 描述 Whether to consider damage or not when identifying the weapon. |
参数 matchNbt | 类型 布尔值 | 描述 Whether to consider NBT data or not when identifying the weapon. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add to the entity. |
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.
ZenScript CopyEntityType.addWeaponOnlyLootModifier(name as string, weapon as IItemStack, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 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. |
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.
ZenScript CopyEntityType.addWeaponOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The name of the loot modifier. |
参数 weapon | 类型 IItemstack | 描述 The weapon that needs to be used to kill the entity. |
参数 matchDamage | 类型 布尔值 | 描述 Whether to consider damage or not when identifying the weapon. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add to the entity. |
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.
ZenScript CopyEntityType.addWeaponOnlyLootModifier(name as string, weapon as IItemStack, matchDamage as boolean, matchNbt as boolean, modifier as ILootModifier)
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The name of the loot modifier. |
参数 weapon | 类型 IItemstack | 描述 The weapon that needs to be used to kill the entity. |
参数 matchDamage | 类型 布尔值 | 描述 Whether to consider damage or not when identifying the weapon. |
参数 matchNbt | 类型 布尔值 | 描述 Whether to consider NBT data or not when identifying the weapon. |
参数 modifier | 类型 ILootModifier | 描述 The loot modifier to add to the entity. |