I am currently trying to build a simple redstone-powered, automated fishing machine. I've gotten most everything to work, except for the fish appearing in the block's inventory.
I'm currently testing all of the functionality, so I'm using a simple random number generation to decide if a fish is caught. When I hit an update-tick, the procedure generates a random number between 1 and 10. If that number is < 1, the procedure randomly chooses between the 4 vanilla fish available and attempts to place 1 into an available slot in the GUI (it loops through the slots and adds to the stack if that fish has a stack < 64 and if not, adds 1 to the next available empty slot).
My issue is that the metadata of the fish I choose in the procedure interface isn't being translated over to code. So the fish just overwrite each other in the first slot.
I can't find anything in the procedure interface to check metadata, so I'm hoping there is a fix, or workaround available for this.
If I can't get around the metadata issue, I'm gonna stop moving forward on this block (adding weights for fish types and other non-fish items).
I have included the updateTick procedure and the code to this issue.
Thanks in advance!
Issue comments
Ok, this is understandable.
Having said that, do you see any reason why the itemstack metadata shouldn't be working? I see the metadata values in the correct places in the code. I'm just wondering why they aren't being compared during the event? Can you think of a way to get around this?
It's not working properly at all. The fish are being overwritten after a comparison, unless there's something in the procedure I'm doing wrong... but I can't see anything wrong with it.
And this only affects fish. It doesn't overwrite items/blocks that aren't fish.
Here's the entire project for download if you want to look at it:
https://www.dropbox.com/s/smati3u1klzmxhk/ReloadedPack.zip?dl=1
Metadata was dropped in 1.13 so we will not be adding such functionality as it is obsolete now as the flattening happened.
https://minecraft.gamepedia.com/Java_Edition_1.13/Flattening
I suggest you make the mod for 1.14.4 where this will not be a problem as each fish is own type.