Started by
Ghoulander
on
Topic category: Help with Minecraft modding (Java Edition)
So I have a GUI setup as sort of a "Quest Box"
The GUI has 5 input boxes. The first 4 are the required items and the 5th is the rewarded item.
My procedure checks if the player has the all four of the items in the inventory. Removes the four items and awards the 5th input box item.
My problem is, is that it is removing four of the first item in my inventory and not 1 of each item.
Here is a pic of the procedure.
try using the print block to print out the items in slot 0 - 3 and see if its correct
Even with just Print Block and Get Item From Slot 0 If Block Has Inventory nothing prints.
If I take items from the slots 2 and 3 and leave just 0 and 1, it does the same thing but takes two of the same items
instead of the 1 of each of the two items I have in there.
*Shrug*
I should probably mention I am using 2020.2 as well.
Yes. I know. I should upgrade. But my mod needs to work with another mod *cough* customnpcs *cough* and it is still way behind on updates unfortunately. ;(
you know the print code block prints to the console right?
you're gonna need to start learning these debug principles to find your bugs, because thats the only way bugs are found.
Well Ahznb. I am ashamed to admit I did not know that but am eternally grateful for you pointing a noob in the right direction! Thanks!
That being said, I found my problem.
In the input blocks, I was using 4 different saplings, just for testing sakes.
So I swapped that out with tnt, an acacia door, a redstone block and dirt and it worked flawlessly.
So the input blocks will have to be checked for damage going forward to detect variants of saplings?
yes. for mc 1.12.2 different saplings are the same "Sapling" block with different properties, and the properties is contained in the "damage" field.