-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to behaviour of Item #41
Comments
My preferred behaviour would be that Item In [2]: str(Item.AIR)
Out[2]: 'air'
In [4]: Item("air")
Out[4]: <Item.AIR: 'minecraft:air'>
In [4]: Item("minecraft:air")
Out[4]: <Item.AIR: 'minecraft:air'> (I believe all commands are OK with the short form?) |
Yep. Unintentionally my last change to this Enum caused an unintended change of the previous behavior. I made |
@conqp for some reason this is still breaking the mcwb modules tests. There is a change in behaviour which is affecting the vaildate function https://github.com/mcipc-tools/mcwb/blob/master/mcwb/functions.py#L88-L101. When casting an array of Item to a numpy array the numpy array now ends up containing str instead of Item and this breaks the validation. Its not clear to me why this is happening. Investigating further. |
downgrading mcipc and rcon does fix the issue. |
Well, |
OK the subclass of I have worked around this by supplying a dtype of Item to numpy constructors, so mcwb is working again. Now when we save an 'Items' object to a json file it now looks like a list of long form string (because it uses toList), but this works OK and is a bit more legible than the old format. loading of Items objects still supports the old and new json formats. In short, I think the new behaviour is now fine for mcwb and mciwb. The only problem is if there are any other users relying on the old behaviour. |
In the latest version of mcipc there have been some changes to behaviour of Item.
I could fix my code to work with the new behaviour but I'd like to understand if these are intentional.
The text was updated successfully, but these errors were encountered: