aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-23 09:29:44 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-23 09:29:44 +0200
commit904304a741f3033de3cdec7f7c45f47da7697f36 (patch)
tree035afeee74ce1233b9f2ce9758c7068fa7d893f7 /src/main/java
parentdc8134f6f10c80df1f11fa05ee58dc3f1b2d379b (diff)
downloadskyhanni-904304a741f3033de3cdec7f7c45f47da7697f36.tar.gz
skyhanni-904304a741f3033de3cdec7f7c45f47da7697f36.tar.bz2
skyhanni-904304a741f3033de3cdec7f7c45f47da7697f36.zip
Added entityId and armor to copy entities
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyNearbyEntitiesCommand.kt13
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:")