-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Peripheral tools #1692
base: mc-1.20.x
Are you sure you want to change the base?
Peripheral tools #1692
Conversation
I believe this solution was already deemed to sadly break things in #964 (comment) have you considered how this might break existing code that expects tool side to be able to connect to standalone peripherals? |
Just to make sure I understand; The issue is that if a turtle has a tool in it's left hand, and a peripheral block, like a monitor, to it's left it's not clear which should be returned by |
Right, I think that's what I was trying to get at. So I think there's a few options.
This issue has been bugging me for a while, so I'd like to see a solution, but I'm not sure which of these (or another) solution makes the most sense, but any of them would be an improvement for me. If we can decide on an approach I'd be happy to take a crack at implementing it and opening another pr! |
Honestly, since tools/peripherals now have dedicated item slots, I'd much prefer if we could just I'll note this is just personal preference though, I'm not sure how this solution would compare to some other things. I just think having tools abstracted away into peripherals would make it much harder to get detailed information about the tool. Granted, it could make it better as well (if you exposed methods to give more information)... |
@fatboychummy I like that idea, but I think that could run into some of the same issues that the original thread was talking about. Namely, in #964 (comment) where @SquidDev says
I think we need some way in the interface to know the capabilities of the tool. I'm not exactly sure how that would work though. |
This is an update to a previously closed pr I had to
mc-1.19.x
.This fixes #964 by making pickaxes (and all tools) peripherals in addition to tools. You can use peripheral.getType(side) and get the type of tool.
I haven't added any test cases for the new functionality like peripheral.call("left", "dig"), but I can do that if this seems like a reasonable approach.
Any comments or improvements are welcome!