Topic category: Help with Minecraft modding (Java Edition)
So currently in my mod, I have various effects when a certain Tool is used, one for example:
Right-Click —— Emerald Pickaxes, when right-clicked on a block, turns any block into Emerald Ore. If used too much, the Tool will break.
When block broken —— Emerald Pickaxes, when mining, give the player a small regeneration effect, and also have a 10% chance to add 5 durability points when in use.
This functionality works perfectly in MCreator 1.8.2, and worked equally so for 1.8.1. Down below is the procedure for the right-click action.
However, in 1.8.3, both procedures noted at the top only works once
, unless there's something else I'm not seeing that's needing changed. I haven't had this issue with any other version other than 1.8.3. Any help would be greatly appreciated. :^)
Firstly, you’ve done a great job, and have included a ton more than I would have thought to include. Secondly my guess as to why it’s not working; I think it could be that there’s a bug going on with the durability. First, were you using it in creative mode? That can lead to interesting things. Otherwise, try slightly altering the durability of the pickaxe, then bring it back to normal. If that fails, then try refreshing the items in the item input slots. I’m not sure what to do if all else fails.
Sorry for taking so long to reply to you. Firstly I want to say thanks for your kind words.
After weeks and weeks of trying to work on this one small issue, I have finally found out what was wrong. And I cannot believe I missed this for so long.
The problem lied in the very first block.
The problem lied in the == in the block. The reason why it didn't work was because a normal = block ignores metadata. In case of strict metadata, that's where the == block works. So in Layman's terms, a tool or item needs to use the normal item comparator block, especially if item damage is involved. If a tool or item, that uses item damage, uses the strict comparator block, it will work once, however since the metadata is not the same, it will not work. Tested this theory out on three different Pickaxes and they all now work perfectly.