If you don't find what you need on that class, just use GameMode:: class and just try to incorporate isSurvivalMode() function there. I think there is one.
Did you hook all the SurvivalMode functions or just a specific one?
No. I only hook what is needed. I think maybe in your case try to use GameMode::useItemOn then use isSurvivalMode() alongside. I don't exactly know how cause I can't see your code.
Hmm... I'm not so sure if that's the problem anymore. I discovered a bug where when you leave a creative world with the item in your inventory and return, the item won't be there.
Hmm... I'm not so sure if that's the problem anymore. I discovered a bug where when you leave a creative world with the item in your inventory and return, the item won't be there.
Finally! I managed to fix it by taking a look at Blocklauncher's code. Thanks for your help!
EDIT: I managed to do it by subtracting the item ID by 0x100
Finally! I managed to fix it by taking a look at Blocklauncher's code. Thanks for your help!
EDIT: I managed to do it by subtracting the item ID by 0x100
What do yo mean by 0x100? I am too having this error.
Rollback Post to RevisionRollBack
Please give me an Internet. Please. Pretty Please with sprinkles on top
I have a twitter!! Follow me for regular updates on my mods! https://twitter.com/DamienMiller11
To post a comment, please login or register a new account.
If you don't find what you need on that class, just use GameMode:: class and just try to incorporate isSurvivalMode() function there. I think there is one.
No. I only hook what is needed. I think maybe in your case try to use GameMode::useItemOn then use isSurvivalMode() alongside. I don't exactly know how cause I can't see your code.
The contents of mcpe.h are just all the classes(no functions), Item::items and Item::initItems()
Wait? What does it do? Where is the useItemOn hook?
Then I guess the next step is to hook useItemOn hooks. and that's it. So the game knows what you want to happen if your item is used.
---------------------------------
|
|
---------------------------------
Where did you instantiate your item?
EDIT: I managed to do it by subtracting the item ID by 0x100
What do yo mean by 0x100? I am too having this error.
I have a twitter!! Follow me for regular updates on my mods!
https://twitter.com/DamienMiller11