This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
civilwargeeky's profile picture

[1.58] turtle can place bonemeal into a block occasionally

Started by civilwargeeky, 30 December 2013 - 10:18 PM
civilwargeeky #1
Posted 30 December 2013 - 11:18 PM
Version Info: Minecraft 1.6.4, Forge 953, CC 1.58

Description:
Turtles placing bonemeal place it on the block one in front and below itself, instead of the block in front of it.
Steps to reproduce:
Get a turtle, place it. Put a block in front of it on top of grass. Put bonemeal in the turtle. Using "turtle.place()" will now return true, using the bonemeal on the block one in front of and below itself.

Description:
Using turtle.place with bonemeal on a block directly in front of the turtle will occasionally return true, planting grass around the area. I expect it to always return false all the time if it cannot use the bonemeal on a sapling.
What Happened: (I cannot reliably reproduce)
So I am making a turtle tree chopper. The turtle will place a sapling, then use bonemeal on it until turtle.place returns false, then cut down the tree.
While I was checking what would happen if it mis-identified wood as saplings, a strange thing happened. It placed the block of wood, and tried to use the bonemeal, but instead of returning false like I expected, it makes grass appear around the area and proceeds to use the entire stack of bonemeal as turtle.place returns true. This was unexpected, and had not happened before. I immediately go to the turtle, put in some bonemeal, go to the lua prompt, and type "turtle.place", which returns true. I then break the block, have it select wood, place, then select and use bonemeal, and it returns false as expected. Sadly I cannot reproduce this reliably, nor do I know why it is happening occasionally.


Different patterns I have tried in testing:
SpoilerPlace turtle, turn on, place wood, try bonemeal: True, but occasionally false
place wood, place turtle, turn on, try bonemeal: True, but occasionally false
Place sapling, place turtle, turn on, break sapling, place wood, try bonemeal: False the first time, true on all other attempts
Place sapling, manually use bonemeal, place turtle, turn on, try bonemeal: Always false
Same as above, use turtle to use bonemeal: Always false
Place a stack of wood blocks sort of like a tree, place turtle, turn on, try bonemeal: True
Edited on 31 December 2013 - 01:03 AM
Lyqyd #2
Posted 30 December 2013 - 11:26 PM
This doesn't really seem like a bug, since using bonemeal on a grass block is a vanilla mechanic.
civilwargeeky #3
Posted 30 December 2013 - 11:50 PM
This doesn't really seem like a bug, since using bonemeal on a grass block is a vanilla mechanic.
No, its not using the bonemeal on a grass block, its using it on a wood block directly in front of it.

I've been doing some more experiments, and have yet to find a pattern for when it does/does not use the bonemeal.

I posted a list of my experiments in the OP.
Edited on 30 December 2013 - 10:58 PM
Bomb Bloke #4
Posted 31 December 2013 - 01:20 AM
Does it have anything to do with whether the block under the log is grass, or dirt?
civilwargeeky #5
Posted 31 December 2013 - 02:03 AM
Does it have anything to do with whether the block under the log is grass, or dirt?
Huh. Wow, it seems it does.
I also just noticed that if you place the bonemeal on an air block, that it also uses the bonemeal and returns true. But why does the turtle place bonemeal on the block below it? If I try right clicking on the side of a block, it doesn't place bonemeal below it, so why does the turtle?

Also, that would explain why the only time the turtle returned false was when it found a grown sapling: when a sapling makes a tree, it turns the block below it into dirt. Thank you for giving me an explanation to this, but I think this behavior may be a computercraft-related bug.
Bomb Bloke #6
Posted 31 December 2013 - 08:59 AM
I'm guessing it's intended behaviour. If working as you're expecting, then when dealing with a standard flat grassy area the turtle would only be able to target a grassy block if it's directly above it - meaning that the block the turtle's in wouldn't get any grass/flowers planted on it (since the turtle's there).

I mean, sure, the turtle would still be able to dig down into the ground and delve into the hole before using the bonemeal, but then that hole would also take away from your potential "planting area". Given this, the current implementation starts to make a fair bit of sense - except that it should only really apply to turtle.placeDown(), instead of turtle.place().

Edit: I suppose though that the logic behind it likely extends to other non-block items that can be placed, such as torches. So I guess it makes sense regardless as to which direction you're placing in.
Edited on 31 December 2013 - 08:02 AM
civilwargeeky #7
Posted 31 December 2013 - 05:02 PM
I'm guessing it's intended behaviour. If working as you're expecting, then when dealing with a standard flat grassy area the turtle would only be able to target a grassy block if it's directly above it - meaning that the block the turtle's in wouldn't get any grass/flowers planted on it (since the turtle's there).

I mean, sure, the turtle would still be able to dig down into the ground and delve into the hole before using the bonemeal, but then that hole would also take away from your potential "planting area". Given this, the current implementation starts to make a fair bit of sense - except that it should only really apply to turtle.placeDown(), instead of turtle.place().

Edit: I suppose though that the logic behind it likely extends to other non-block items that can be placed, such as torches. So I guess it makes sense regardless as to which direction you're placing in.
Ahh. I see. That would make sense then.