Topic category: User side tutorials
Welcome to a tutorial on how to make a storage block! Finally its there :D
Just follow the steps to make a simple storage block, it isn't really that hard.
Create a new variable called something like: NumberOf and then the item name you want to store. You have to do this for every item you want to be able to store in your storage block.
Create a new block. This will be your storage block. In the event list, do the following:
On block rightclicked -> Add event -> Variable set. In the drop down menu where it says "In all cases", choose "ItemInPlayersHand == item" and choose your item. Then choose which variable to set (the one from Step 1 of course :D). Set this to VAR: then the variable from Step 1 followed by " + 1". You can select this from the drop down menu.
Add another event for "On block rightclicked". Choose "Consume item in inventory". The item to consume must be the item from Step 1.
Add a new event under "When start to destroy" and select "Add item to inventory". Change "In all cases" to "NUMBER>NUMBER". First number must be the variable from Step 1. The second number should be 0. The item to add must be the item from Step 1.
Add another event under "When start to destroy" and select "Variable set". Change "In all cases" to "NUMBER>NUMBER". First number must be the variable from Step 1. The second number should be 0. The variable that should be changed, must be the variable from Step 1. Change the variable to VAR: then the variable from Step 1 followed by " - 1".
And you're done! There are only 2 bugs that I have to fix and those are:
- It shares content with other storageblocks.
- It cannot store more than 60 the same items in it. I put in 2 stacks porkchop, but I only recieved 60 back by punching it.
It does not work in multiplayer yet and it isn't the best, but it was the best I could do. Have fun!!!