Allow your chest to have inventory than create new custom GUI and on the first screen bind this GUI to your block than open editor and on bottom right corner you should see inventory name inheridated "or something similar" if not than cancel editor and open it again, than just add slots and made procedure that will open your inventory than it should keep your items
Allow your chest to have inventory than create new custom GUI and on the first screen bind this GUI to your block than open editor and on bottom right corner you should see inventory name inheridated "or something similar" if not than cancel editor and open it again, than just add slots and made procedure that will open your inventory than it should keep your items