I cant take full credit for the mechanics, its all heavily inspired by a mechanic from a minecraft mod of all things, but im glad i got it functioning!