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

Turtles placing pistons - CC 1.481

Started by Pharap, 21 January 2013 - 01:29 PM
Pharap #1
Posted 21 January 2013 - 02:29 PM
I was trying to get my turtles to assemble something using pistons when I made a discovery.

If I make a turtle place a piston below itself, it will place it with the head face down.
If I make a turtle place a piston in front of itself, it will place it with the head facing towards the turtle.

I would have thought that logically getting a turtle to place the piston upwards would make the piston's head face upwards, but it instead defaults to the rules used when placing a piston in front of the turtle.

I'm not sure if this is an unintentional bug or something the modders didn't think of, but the inability to place pistons facing upwards is somewhat inhibiting and should be considered a bug given the circumstances.
Cranium #2
Posted 21 January 2013 - 07:44 PM
I think sometimes if it finds nothing to place on, it will place the piston on itself. Thus, it will face the wrong way. Unfortunately, I don;t think there would be any way around this, as I think I heard of this before, and nothing got changed. Cloudy, correct me if I'm wrong.
Sebra #3
Posted 22 January 2013 - 05:08 AM
Cloudy said Dan200 fixed some bugs in that code. We have not seen Turtle behavior since then.
Pharap #4
Posted 01 February 2013 - 07:48 AM
I think sometimes if it finds nothing to place on, it will place the piston on itself. Thus, it will face the wrong way. Unfortunately, I don;t think there would be any way around this, as I think I heard of this before, and nothing got changed. Cloudy, correct me if I'm wrong.

That doesn't explain why placing down works as expected, but placing up doesn't.
Also, it works like this even if there is a block above the space where the piston is supposed to be placed, so unless theres a bug in the turtle's detection of blocks above it, I doubt it's that either.


Cloudy said Dan200 fixed some bugs in that code. We have not seen Turtle behavior since then.

Well, this is version 1.481 and I'd classify this as a bug, so they must have missed this one.
Orwell #5
Posted 01 February 2013 - 09:22 AM
If turtles could place pistons upwards, you could create an automatic elevator/zeppelin thingy. :P/> Would probably not be faster than frames though. I noticed this 'quirk' earlier and I've seen it reported earlier as well.
Skullblade #6
Posted 01 February 2013 - 12:48 PM
can you place the piston on its sides(left, right,front etc) just not up?

If only placing down works maybe the default position for pistons are up…
Orwell #7
Posted 01 February 2013 - 02:20 PM
can you place the piston on its sides(left, right,front etc) just not up?

If only placing down works maybe the default position for pistons are up…
From what I remember, all positions work except for face up.
Sebra #8
Posted 02 February 2013 - 07:33 AM
If turtles could place pistons upwards, you could create an automatic elevator/zeppelin thingy. :P/> Would probably not be faster than frames though. I noticed this 'quirk' earlier and I've seen it reported earlier as well.
And you suppose it is not possible now… 8)
Auto-elevator is not a hard thing.
Orwell #9
Posted 02 February 2013 - 08:35 AM
If turtles could place pistons upwards, you could create an automatic elevator/zeppelin thingy. :P/> Would probably not be faster than frames though. I noticed this 'quirk' earlier and I've seen it reported earlier as well.
And you suppose it is not possible now… 8)
Auto-elevator is not a hard thing.
A mobile auto-elevator? :/ I wouldn't know how. I know about those static ones, that's not what I mean. :P/>
Sebra #10
Posted 02 February 2013 - 07:50 PM
What construction are you afraid of? What are you mean?
Shnupbups #11
Posted 02 February 2013 - 09:27 PM
Yes, piston-placing is a bit strange.
Orwell #12
Posted 02 February 2013 - 11:03 PM
What construction are you afraid of? What are you mean?
If a turtle could place pistons upwards, it could use one piston and one block to move you up. Without contact with the ground. Is there an equivalent of that without turtles? (except for frames like structures of course)
KaoS #13
Posted 03 February 2013 - 02:45 AM
are you sure there wasn't a block 2 below your turtle when you placed down? if so the turtle would place on that block and get the correct facing, I think if it has nothing to place on then it places on itself so it would then place facing up
Sebra #14
Posted 03 February 2013 - 04:01 AM
What construction are you afraid of? What are you mean?
If a turtle could place pistons upwards, it could use one piston and one block to move you up. Without contact with the ground. Is there an equivalent of that without turtles? (except for frames like structures of course)
Probably not, but why to afraid it?
Orwell #15
Posted 03 February 2013 - 06:46 AM
What construction are you afraid of? What are you mean?
If a turtle could place pistons upwards, it could use one piston and one block to move you up. Without contact with the ground. Is there an equivalent of that without turtles? (except for frames like structures of course)
Probably not, but why to afraid it?
I never insinuated that I'm affraid of anything. :P/>
Pharap #16
Posted 03 February 2013 - 01:10 PM
If turtles could place pistons upwards, you could create an automatic elevator/zeppelin thingy. :P/> Would probably not be faster than frames though. I noticed this 'quirk' earlier and I've seen it reported earlier as well.
Why do you think I want it fixed? lol

From what I remember, all positions work except for face up.
Yep, that's what I'm getting at here.

A mobile auto-elevator? :/ I wouldn't know how. I know about those static ones, that's not what I mean. :P/>
If this bug is fixed, I'll consider posting code and instructions for how to do that myself. Obviously no great glass elevators, but great [insert minecraft block here] elevators I have the code pretty much worked out for, given time and enough coffee.

are you sure there wasn't a block 2 below your turtle when you placed down? if so the turtle would place on that block and get the correct facing, I think if it has nothing to place on then it places on itself so it would then place facing up
Nope, I've tried pretty much every configuration, turtles can place straight down into mid air and can't place up even when there's a block 2 up to place onto.


However you look at the issue, getting it fixed would greatly benefit the community.
Particularly the elevator thing: fixing the turtles is step 1 towards to making the great turtle elevators, step 2 is all that lovely programming required to get them working, which I'll be happy to work on when I'm not making 3D animations or tower defence.
Orwell #17
Posted 03 February 2013 - 01:15 PM
A mobile auto-elevator? :/ I wouldn't know how. I know about those static ones, that's not what I mean. :P/>
If this bug is fixed, I'll consider posting code and instructions for how to do that myself. Obviously no great glass elevators, but great [insert minecraft block here] elevators I have the code pretty much worked out for, given time and enough coffee.
I know how you would do it with a turtle. :P/> It's kinda obvious. And I've been trying this myself a couple of months back. I meant that I didn't know how you could do it without turtles and pistons (it was a reply to Sebra).
Pharap #18
Posted 03 February 2013 - 01:29 PM
A mobile auto-elevator? :/ I wouldn't know how. I know about those static ones, that's not what I mean. :P/>
If this bug is fixed, I'll consider posting code and instructions for how to do that myself. Obviously no great glass elevators, but great [insert minecraft block here] elevators I have the code pretty much worked out for, given time and enough coffee.
I know how you would do it with a turtle. :P/> It's kinda obvious. And I've been trying this myself a couple of months back. I meant that I didn't know how you could do it without turtles and pistons (it was a reply to Sebra).
Ah right. In that case, you can't annoyingly. I wish turtles could push players up so they are 'rideable', but that's probably classed as overpowered, despite the amount of coal required to move you up 128 blocks probably being harder to get than the amount of gravel it would take to get you from bedrock to the world limit (either that or I'm a terrible coal miner, or a really good gravel miner). I'd try making a peripheral for it if I knew Java as well as the languages I do know, but then again I never really use external peripherals anyway.
KaoS #19
Posted 03 February 2013 - 03:04 PM
I am not sure that this is CC's fault… not even RP deployers get vertical piston placement right :(/>
Sebra #20
Posted 03 February 2013 - 09:20 PM
It seems this is not only CC fault, but RP2 too.
Let's wait and see new .place() behavior corrected by Dan200.
Pharap #21
Posted 04 February 2013 - 10:36 AM
I'm running without RedPower, so it's definitely a fault in vanilla CC, regardless of how the fault got in.
Orwell #22
Posted 04 February 2013 - 10:59 AM
I'm running without RedPower, so it's definitely a fault in vanilla CC, regardless of how the fault got in.
If both CC and RP have this bug, then it's more likely to be a fault in forge.
Pharap #23
Posted 04 February 2013 - 12:09 PM
I'm running without RedPower, so it's definitely a fault in vanilla CC, regardless of how the fault got in.
If both CC and RP have this bug, then it's more likely to be a fault in forge.
Depends how they are implemented.
If both are using forge code, then yes it probably is a fault with forge, in which case CC either has to override the forge code or there needs to be a discussion with the creators of forge.
Either way something should be done about if possible.
digipenguin #24
Posted 04 February 2013 - 01:47 PM
why are the elevators advantageous? why not just call turtle.up()? that allows the turtle to rise without having to expend a piston…
immibis #25
Posted 04 February 2013 - 02:12 PM
why are the elevators advantageous? why not just call turtle.up()? that allows the turtle to rise without having to expend a piston…
turtle.up() can't push players.
Sebra #26
Posted 05 February 2013 - 04:39 AM
If both CC and RP have this bug, then it's more likely to be a fault in forge.
Deployers and Turtles behaves differently (if I remember correctly):
If pointed horizontally, Deployer places Piston "piston to itself" while Turtle - "base to itself".
If pointed down, Deployer places Piston "piston to north" while Turtle - "base to itself" again.
If pointed up, Deployer places Piston "piston to north" again while Turtle - "piston to backside".
So both mods have a problems but different. Doubt it's Forge error.
Imho "base to itself" is better, but even better would be the way to control placing direction.
Pharap #27
Posted 06 February 2013 - 03:05 PM
Deployers and Turtles behaves differently (if I remember correctly):
If pointed horizontally, Deployer places Piston "piston to itself" while Turtle - "base to itself".
If pointed down, Deployer places Piston "piston to north" while Turtle - "base to itself" again.
If pointed up, Deployer places Piston "piston to north" again while Turtle - "piston to backside".
So both mods have a problems but different. Doubt it's Forge error.
Imho "base to itself" is better, but even better would be the way to control placing direction.
I'd be happy if the bug were just fixed, but choosing placement shouldn't be too hard to implement, similar to how sign text was added.
dan200 #28
Posted 21 February 2013 - 04:09 AM
This is fixed for 1.51