Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command crophopper:
- permission: admin.ch
- trigger:
- give player hopper named "&9Crop Hopper" with lore "This hopper puts one entire slot of items into the container every 5 seconds!"
- on place of hopper:
- if player's tool is hopper named "&9Crop Hopper":
- set event-block to {_hdirection}
- set event-block to {_hdirection} named "&9Crop Hopper"
- add event-block to {crophop::*}
- every 5 seconds:
- loop {crophop::*}:
- set {hopper} to loop-value
- if slot 0 of loop-value is air:
- continue
- else:
- loop all blocks in radius 1 around loop-value:
- if loop-block is chest, hopper or hopper named "&9Crop Hopper":
- if {hopper} is facing of loop-block:
- add slot 0 of {hopper} to loop-block
- set slot 0 of {hopper} to air
- if slot 1 of loop-value is air:
- continue
- else:
- loop all blocks in radius 1 around loop-value:
- if loop-block is chest, hopper or hopper named "&9Crop Hopper":
- if {hopper} is facing of loop-block:
- add slot 1 of {hopper} to loop-block
- set slot 1 of {hopper} to air
- if slot 2 of loop-value is air:
- continue
- else:
- loop all blocks in radius 1 around loop-value:
- if loop-block is chest, hopper or hopper named "&9Crop Hopper":
- if {hopper} is facing of loop-block:
- add slot 2 of {hopper} to loop-block
- set slot 2 of {hopper} to air
- if slot 3 of loop-value is air:
- continue
- else:
- loop all blocks in radius 1 around loop-value:
- if loop-block is chest, hopper or hopper named "&9Crop Hopper":
- if {hopper} is facing of loop-block:
- add slot 3 of {hopper} to loop-block
- set slot 3 of {hopper} to air
- if slot 4 of loop-value is air:
- stop loop
- else:
- loop all blocks in radius 1 around loop-value:
- if loop-block is chest, hopper or hopper named "&9Crop Hopper":
- if {hopper} is facing of loop-block:
- add slot 4 of {hopper} to loop-block
- set slot 4 of {hopper} to air
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement