Add dispense method to dispensers
djmattyg007 opened this issue ยท 8 comments
Useful information to include:
It would be nice to be able to programmatically eject an item from a disepenser. Right now I would probably have to set up a redstone contraption to make it work. Instead, it would be interesting to be able to just do this:
dispenser = peripheral.wrap("minecraft:dispenser_0")
dispenser.dispense()
This would allow for more compact setups, and also generally be more intuitive to new users.
Normally I'd say to "just use redstone",
However, I do this would be cool, and maybe adding a method to droppers like dropper.drop()
However, drop
or dispense
functions need arguments, count=64
, and slot=1
, to choose what to dispense, ontop of being a normal inventory peripheral (I think they already are, but if not it's probably a good idea to add them as this.)
I know that for the dispenser at least, it is already an inventory peripheral.
I'm all for having customisable functionality, but for clarity my original intention was simply to replicate what you can do already with redstone (the dispenser dispenses a random item from its inventory on a redstone pulse), but with a much more compact redstone-less setup.
Normally I'd say to "just use redstone", However, I do this would be cool, and maybe adding a method to droppers like
dropper.drop()
You can already .drop()
from any inventory, can't you? Putting extra .drop
method on dropper seems redundant.
But yes, being able to dispense stuff like that would be a neat baked-in feature.
You can already
.drop()
from any inventory
Are you not confusing CC:T with plethora? Generic inventory does not have .drop()
. OR did you mean like "you can use turtle if you want to drop items" ?
You can already
.drop()
from any inventoryAre you not confusing CC:T with plethora? Generic inventory does not have
.drop()
. OR did you mean like "you can use turtle if you want to drop items" ?
Ooh, yeah I did not realize generic peripherals did not have the .drop()
feature. Figured that'd be a thing that got carried over.
@SquidDev I'm interested in turning this idea into reality now that I have some modding experience under my belt. Would you be able to give me some pointers to get started?
If you want to make it a peripheral mod then there's an example pinned in the discord I believe. For a PR, I think that the example addon mod will still be useful.