Started by
gr33ntimer15
on
Topic category: Help with Minecraft modding (Java Edition)
As items With Inventorys Seem to Be broken i have been trying to make an item open the inventory of a set block. And i Just Can't Seem To Get it To Work I tried storing the block i want's Location As NBT number Tags. And Simulating A right click on that block But It Dosn't Work Anyone have any ideas on how i could make this work?
First, I do think item inventories work. The problem is probably you used "Get copy of item", which doesn't actually change the item inventory at all. Use some local variables and it should work.
Otherwise, use the item to open up a new GUI and load in slots with a procedure from there. Once you close it, have it save the new slots in the block.
Best I can do without any other info such as picture of procedure.
I Was just having the item open an inv that was linked to it at one point and i wouldn't compile properly i never used "get copy of item" I have my items right click procdeure testing for an nbtLogic tag called "PlacedBlock" if it returens =false it places the block Sets The items NBTLogic Tag "PlacedBlock" to True then Sets NBT# thatLocX, LocY, and LocZ To the blocks cordanates of the block that just got placed and when right clicked and PlacedBlock "Returns" =True it simulates right click by using the NBT# tags to Input the Cords
my origanal idea was like a backpack but it dosnt compile
Hmm can I see procedure screenshot? There might be something else causing the error.
https://imgur.com/a/2KZmwIt Procedure im using
Oh right! I forgot images break in mcreator.
Try using imgur or something. I can't see it.
wait nvm it loaded
Placeing the block works its the second right click that does not its not opening the blocks inv
Ok see if this works:
Instead of simulating right click, have it open up the GUI using the "Open GUI" command.
Then load in the items into the slots manually from the block's storage.
Add a procedure that saves it when the GUI is closed.
Would be a lot of Blocks id have to add as the inventor has 36 Slots
Loops are your best friend for that sort of thing.
Create a local variable, give it any name like "index".
Loop for 36 times, increasing the local variable by 1 for each time.
Use the local variable to select the slot.
Or you could just do it manually, but it would take a while.
Aparently My Origanl idea was a bug with the last snapshot that is fixed now So im just going back to that