feat: pick up item

This commit is contained in:
xtex 2023-07-03 10:00:00 +08:00
parent f451a4b868
commit b1f44ff2db
Signed by: xtex
GPG Key ID: B918086ED8045B91

View File

@ -64,6 +64,10 @@ class ProjectedPersonEntity(entityType: EntityType<out PathfinderMob>, level: Le
} }
init {
setCanPickUpLoot(true)
}
override fun finalizeSpawn( override fun finalizeSpawn(
serverLevelAccessor: ServerLevelAccessor, serverLevelAccessor: ServerLevelAccessor,
difficultyInstance: DifficultyInstance, difficultyInstance: DifficultyInstance,
@ -139,6 +143,7 @@ class ProjectedPersonEntity(entityType: EntityType<out PathfinderMob>, level: Le
super.readAdditionalSaveData(tag) super.readAdditionalSaveData(tag)
shapeTag = tag.getCompound(KEY_ENTITY_SHAPE) shapeTag = tag.getCompound(KEY_ENTITY_SHAPE)
readInventoryFromTag(tag) readInventoryFromTag(tag)
setCanPickUpLoot(true)
} }
override fun shouldShowName() = true override fun shouldShowName() = true