Equip item failed

#1

I’ve tries equipping the item wooden_pickaxe with ('equip', 3), but i found that the type in current states still are stick. Has anyone encountered this problem? Thanks.

n [48]: b                                                                                                       
Out[48]: 
OrderedDict([('forward', 0),
             ('back', 0),
             ('left', 0),
             ('right', 0),
             ('jump', 0),
             ('sneak', 0),
             ('sprint', 0),
             ('attack', 0),
             ('camera', array([0., 0.], dtype=float32)),
             ('place', 0),
             ('equip', 3),
             ('craft', 0),
             ('nearbyCraft', 0),
             ('nearbySmelt', 0)])

  
In [49]: s,r,done,info=env.step(b)                                                                     

In [50]: s                                                                                                       
Out[50]: 
{'equipped_items': {'mainhand': {'damage': 0,
   'maxDamage': -1,
      'type': 'stick'}},
       'inventory': {'coal': 0,
       'cobblestone': 0,
       'crafting_table': 0,
       'dirt': 0,
       'furnace': 0,
       'iron_axe': 0,
       'iron_ingot': 0,
       'iron_ore': 0,
       'iron_pickaxe': 0,
       'log': 0,
       'planks': 9,
       'stick': 14,
       'stone': 0,
       'stone_axe': 0,
       'stone_pickaxe': 0,
       'torch': 0,
       'wooden_axe': 0,
       'wooden_pickaxe': 1},
#2

I find there is 1 frame lag. You may check the next frame (after performing a noop action).

#3

Thanks @kaixin, we have check the next 2 step, but doesn’t works.

And, the other question is that the maxDamage.type if not a Enum, it’s a string:

{'mainhand': {'damage': 0,
   'maxDamage': -1,
      'type': 'stick'}
#4

We are facing a similar issue.

Unable to equip a wooden-pickaxe even if it is present in the inventory. Also, not able to unequip an item if it is already equipped.

Were you able to resolve this issue @weel2019? Please help if you have some more information.

#5

sorry, i haven’t solved it yet. @GrizzlyRL2019

#6

I also met the same bug after upgrading to 0.2.4. I think it is a bug in the new version. Hope @BrandonHoughton can help.

#7

+1 on the equip command not working (can not unequip items nor equip anything). In fact it did not work in version 0.2.3 for us either.

#8

I think this may be a failure in terms of documentation. Enum types are supposed to take a string, e.g. act(equip='iron_pickaxe')

If you take a look at the MineRL repository, /tests/local/handler_test.py has a sample that attempts to cover most of the actions for the MineRLObtainDiamond-v0 task.

#9

Sorry for double-posting, but just for clarity:

Tested on Ubuntu 18.04 (Python 3.6) and Windows 10 (Python 3.7) with MineRL 0.2.4:

  • Create ObtainDiamond-v0 environment, control by manually creating actions
  • Open chat (press “T”) and give some items /give @a wooden_pickaxe 1 and /give @a stone_pickaxe 1.
  • Wooden pickaxe is equiped (auto-equip the first slot).
  • Using equip="stone_pickaxe" or equip="air" does not work, nor do the integer versions (3 and 1, respectively)
1 Like
#10

Also got similar results as @Miffyli. Unable to equip wooden pickaxe, even after using string as input.

1 Like
#11

This was an issue with the obtainDiamond.xml - we have resolved it in the most recent release being deployed today or tomorrow!

1 Like