From 904304a741f3033de3cdec7f7c45f47da7697f36 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 23 Sep 2022 09:29:44 +0200 Subject: Added entityId and armor to copy entities --- .../skyhanni/test/command/CopyNearbyEntitiesCommand.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') 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:") -- cgit