Block container deleting items

Published by Anonymous (not verified) on
Status
Works as designed
Issue description

I was unable to find this bug in the tracker but might be already reported

Make the block with container enabled disable the option to drop items from the block it just deletes the times you but in the gui, it does not save them, I don't know if the GUI is really passing the items to the block or if the block id deleting them but all items are just removed.

I just been tested how I created this and it seem you have forgotten to add some kind of tag maybe NBT data to the block, there for the GUI can't link to that block once it's been picked up and out down again so it's losing the data what used to be in that block, so the container's data is lost as there is no ID or NBT data linked anymore.

Issue comments

If I understand you correctly, the block destroys the items inside when the block is destroyed?

In block enable inventory and in your Custom Gui editor bind your GUI to that block then add slots to Inheridate inventory save it and test it, it should now save items when you close block gui if this was your poblem

Yes, this could be the problem too. GUI needs to be bound to the blocks and slots need to use inventory called "inherited".

Author Submitted by Anonymous (not verified) on Fri, 11/30/2018 - 21:45 Permalink

I know how to make a chest and it's linked to inherited I tested this and posted it after reading it loads of times on the forum, so yes it's not working with all them options, when you distroy the block it deletes all the times, but if you dont distroy the block it works fine open and close it will save the times, it also works with hoppers but soon as you brake the block and place it back down every time is deleted.

I don't use GUI's in mcreator for one it makes me feel we are taken away from the game this is why my mods don't have them, and when they was so bugged I learnt to work around them, but I know how to use them they don't like others are reporting, I just tested it and reported it here as I couldn't find a ticket for it.

Ohh so basically block stores all the items but instead of dropping them when its destroyed it takes this with him to the Limbo "Destroys all items inside instead of dropping them when destroyed" ?

Author Submitted by Anonymous (not verified) on Fri, 11/30/2018 - 21:57 Permalink

Limbo takes them all, ALL OF THEM I TELL YOU lol when you enable drop that works also so ya it's not keeping the items when the block is broken they just become deleted.

I not sure if there is a code to temp fix it or what but it's broken at the moment What ever it's doing tho take note as this would make a really good bin, the user fills it up and to delete it you just pick up the block :) but ya it does not drop is content as it's not set to but it also does not keep the items it just deletes them.

 

Well, this is how it was designed to work. If you disable dropping of items for the block, it won't drop them when the block is destroyed. When you destroy a block all the data of it is erased from the world, this is how it works in Minecraft.

If you would like that the items remain "stored" on the location where to block was prior to destruction, you would need to store that data in the world save itself in a new container that would contain such items. But this is beyond MCreator at the moment so I think you will have to resort to code to achieve this, unfortunately.

You already know the problem with MCreator and yes this is a MCreator bug as your option makes it seem that the user can keep the items in the block, you never made the UI clear about this, I tested this based on your forum users always requesting this so you know this is not a new problem, this was not reported for me or for my use, if a user that knows how to code that opts to use a tool for speed as sadly my learning problems makes a 1 day mod in to a 3 months mod, but this does not mean I can't research, I post this to help your users that are still to this day have no idea what your UI means, this is not my fault, this is not the other users fault and this is not a complaint this is a bug or mistake/over look on your behalf, and for the last few years people asked about it not once have I seen you clear this mess up.

My thoughts:
You could of based the updates for the container on a shulker rather then the basic default chest container what also writes data to the world folder so if your saying yours don't do this mean it will also forget the data on exiting the game? I never tested this that far since I never had any real use to keep adding containers all over the place, but saying this how minecraft works is false minecraft has had the option to save content to the world folder, server side and local for a long time, what you mean was at the time creating that option you didn't know how to or it wasn't a thing back then, but it as for a long time now so that functionality is out of date, don't blame the platform as there is at lest 10 good mods out there using base Forge API.

I know you might find things stressful but this is a problem when so many people believe the are able to use the option this way around this is a bug/over side no matter if you believe it a not, if you don't want to offer a real container update the UI in 1.8.2 to say Drop item's or distroy items two check box's what change if you selece the other one so the end user has to pick distroy or drop this change is a very small one and you can offer that, it will stop confused users.

Yes! This is the problem I am also looking to solve! I have been researching this problem, and there is unfortunately no way to keep the blocks items when the block is destroyed. However, I have found that you could try creating a procedure when the block is destroyed, to set all the items in the input slots that had items, to the slots that had items. I haven't figured out how to do this, but I can assure you this is the absolute best solution I have found. I hope this helps you!

- creepcomix