Loot tables
This commit is contained in:
@@ -374,8 +374,11 @@ export abstract class LivingEntity extends Entity {
|
||||
this.level.on_death(this, source);
|
||||
}
|
||||
|
||||
// what it drops when it dies, each kind decides. spawn_at_location drops something where it is
|
||||
drop_loot(_source: DamageSource) {}
|
||||
// what it drops when it dies: its type's loot table, see EntityJson.loot_table. spawn_at_location drops
|
||||
// something where it is
|
||||
drop_loot(source: DamageSource) {
|
||||
for (const stack of this.level.entity_loot(this, source)) this.spawn_at_location(stack);
|
||||
}
|
||||
|
||||
// mobs drop their equipment, see Mob
|
||||
drop_equipment(_source: DamageSource) {}
|
||||
|
||||
Reference in New Issue
Block a user