diff options
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt index a5e7a0b79..8fd9a45c8 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt @@ -16,6 +16,7 @@ import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.item.EntityItem import net.minecraft.entity.monster.EntityEnderman import net.minecraft.entity.monster.EntityMagmaCube +import net.minecraft.entity.player.EntityPlayer import net.minecraft.item.ItemStack object CopyNearbyEntitiesCommand { @@ -43,6 +44,7 @@ object CopyNearbyEntitiesCommand { val displayName = entity.displayName resultList.add("name: '" + entity.name + "'") resultList.add("displayName: '${displayName.formattedText}'") + resultList.add("entityId: ${entity.entityId}") resultList.add("location data:") resultList.add("- vec: $vec") resultList.add("- distance: $distance") @@ -65,6 +67,17 @@ object CopyNearbyEntitiesCommand { resultList.add("- health: $health") } + if (entity is EntityPlayer) { + val inventory = entity.inventory + if (inventory != null) { + resultList.add("armor:") + for ((i, itemStack) in inventory.armorInventory.withIndex()) { + val name = itemStack?.name ?: "null" + resultList.add("- at: $i: $name") + } + } + } + when (entity) { is EntityArmorStand -> { resultList.add("EntityArmorStand:") |