ComputerCraft

ComputerCraft

21M Downloads

[Suggestion] Turtle.dig() with empty hand

DevelopedLogic opened this issue ยท 16 comments

commented

It seems that on the latest pre-release, turtles will refuse to break blocks without an equipped tool. This doesn't seem to make sense as players can break the block i'm trying to get the turtle to break without tools. The block I am trying to break is sugar cane. I am running on 1.11.2 and am using the Airwaves server by DannySMC, found on the CC forums.

commented

Turtles always needed tools to use dig(). I am sorry what you are trying to do is simply not part of the mod. To break blocks turtle has to have a tool equipped.

commented

This is the axe code:
https://github.com/dan200/ComputerCraft/blob/master/src/main/java/dan200/computercraft/shared/turtle/upgrades/TurtleAxe.java

Would it not be easy to just duplicate it and its dependencies with a stick, knocking the attack force all the way down?

commented

This is a pretty big departure from the behavior of turtles over the last few years. If the turtles could mine blocks without the tools then there would be no reason to equip any tools except for maybe the hoe.

I'm a -1 on this new feature.

commented

Maybe if there was a turtle claw that let them perform right clicks?

commented

Player characters have hands. Turtles do not.

commented

Would it take hens be possible to attach something like a stick or any other kind of nullified tool to the turtle to have the same effect @BombBloke

commented

What exactly are tying to achieve? Pickaxes can break sugar cane.

commented

I'd assume the goal is to keep costs down.

Personally I wouldn't be against the idea of allowing a stick to be used to break "single-click" blocks, such as cane, flowers, netherwart, or even regular wheat crops (not that my opinion much matters, mind you). I'm not sure if anyone would actually be interested in coding it in, though.

commented

The ability to perform right clicks would be nice.

commented

I like the idea of claw to perform right clicks as well, I actually implemented a (only slightly messy) version of a claw for right clicking in my addon for ComputerCraft. Giving it basic block breaking abilities from there would not be difficult. To maintain balance and prevent other turtle tools from being useless, I limited it to right clicking on non-air blocks, though restricting right click to only block interaction and no tool item abilities could further ensure tool peripherals still have a use.

I can throw together a PR from that if desired when I find some free time so it can be cleaned up from there.

commented

The reason I suggest the claw I perhaps to have it to also allow the OPs desired behaviour.

commented

My idea for this: An upgrade using a wooden sword would be able to break certain blocks, but have a damage multiplier of 0.

The limits on what blocks to break would be trivial to implement, as dan200.computercraft.shared.turtle.upgrades.TurtleSword already has those limitations.

I'm terrible with modeling so I won't make a PR for this particular issue.

commented

I'd like the ability to use all sorts of tools, enchanted ones included, and having player-like breaking times. That would allow using a wooden pickaxe at the expense of the time taken (and possibly durability but that would also be a pain). I mean should you really need a diamond pick to maintain a sugarcane farm (which I think is behind @DevelopedLogic's suggestion)?

commented

While I don't agree with allowing enchanted tools, (Fortune/Silk Touch Turtle is a bit too much) I agree with allowing any type of tool.

commented

Really, you only need one diamond -- to make a diamond shovel.

I don't agree on using multiple tools because it increases the complexity of turtles - which are designed to be fairly straightforward. There isn't much reason to allow different tools, except to lower the cost - and turtles are rather OP anyway (they can fly, they can break anything, the pickaxe doesn't break, they can survive in lava, they can mine obsidian instantly, etc.).

The cost for a sugarcane farming turtle is 1 diamond shovel + some basically useless and incredibly common materials.

Essentially infinite sugarcane for the cost of 1 diamond. Which you can find within an hour or two of starting your game.

I would be in favor of restricting access to turtles in a different way, except I think this is an excellent tutorial-ish sort of introduction to programming - you can get a turtle, do some basic things with it, then make it much more useful and a bit more complex by adding some valuable items.

commented

please keep this issues page for bugs, not feature requests