Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-172717

EntityEquipmentInventoryComponent doesn't work on entities (script 1.5.0-beta).

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.20.23 Preview, 1.20.20.22 Preview, 1.20.20.21 Preview, 1.20.20.20 Preview
    • None
    • Confirmed
    • Windows
    • 1077959




      An odd issue is that "damagingEntity" and "hitEntity" are both "Entity," yet they only work when it's a player.

      Other components don't have this issue.

       

      How to reproduce the issue:
      – Try using entity.getComponent("minecraft:equipment_inventory") on any entity.

      Expected behavior:
      – It should work the same way it does on players (returning EntityEquipmentInventoryComponent).

      Methods used for testing:
      world.afterEvents.entityHitEntity.subscribe( ({damagingEntity, hitEntity}) =>

      {    console.warn(damagingEntity.getComponent("minecraft:equipment_inventory"))    console.warn(hitEntity.getComponent("minecraft:equipment_inventory")) }

      )
      Entities return undefined.
      Players return EntityEquipmentInventoryComponent.

      script 1.5.0-beta.mcaddon

            GabriielCraft Gabriel William
            Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: