Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Mod Requirement:
- --EnderStorage
- --Create a Open Computer with an attached adapter. Place a ender chest on top of the adapter (or change the side in settings bellow)
- --Create a ender pouch (of course with the same colors as the ender chest). Always when you insert an item on slot 1 the adapter will
- --set the redstone output signal to your configurated strength
- local component = require("component")
- local side = require("sides")
- local invController = component.inventory_controller
- local rs = component.redstone
- --Settings:
- local rsOutputSide = side.right -- The redstone side the attached adapter has to output
- local rsOutputStrength = 15 -- The redstone strength 15 is max. 0 is min.
- local minimumDelay = 7 -- The minimum delay between redstone signals
- local enderChestSide = side.top -- The ender chest side the adapter is attached to
- --
- while true do
- if(invController.getStackInSlot(enderChestSide, 1) ~= nil)then
- rs.setOutput(rsOutputSide, rsOutputStrength)
- print("Redstone output is active")
- os.sleep(minimumDelay)
- end
- rs.setOutput(rsOutputSide, 0) -- the 0 means the redstone signal strength without an item if you have to change that
- os.sleep(0.25)
- end
Add Comment
Please, Sign In to add comment