Tripwire changes value when an entity occupies the same block even if it's not connected to a hook
Steps to reproduce:
- Place command block with this command
/testforblock ~ ~1 ~ tripwire 0
- Place string on top of command block
- Notice value of string (tripwire) changes if you are standing on the block or not.
Created Issue:
/testforblock and /execute detect don't use the same data value
I wanted to use /execute detect with an exact damage value to detect if a player is standing in a tripwire (I don't use it as tripwire).
For that I run the command /testforblock ~ ~ ~ minecraft:tripwire 0 and got as output while standing in a tripwire with two connections "The block at ~,~,~ had the data value of 1 (expected: 0)." which is fine, as /execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 1 say That works outputs "That works".
But while standing in a tripwire with only one connection, /testforblock gives the exact same error but /execute detect fails. When I change the data value to 0 in /execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 0 say That works, it outputs "That works".
I wanted to use /execute detect with an exact damage value to detect if a player is standing in a tripwire (I don't use it as tripwire).
For that I run the command /testforblock ~ ~ ~ minecraft:tripwire 0 and got as output while standing in a tripwire with two connections " The block at ~,~,~ had the data value of 1 (expected: 0). " which is fine, as /execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 1 say That works outputs " That works ".
But while standing in a tripwire with only one connection, /testforblock gives the exact same error but /execute detect fails. When I change the data value to 0 in /execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 0 say That works , it outputs " That works ".
I wanted to use /execute detect with an exact damage value to detect if a player is standing in a tripwire (I don't use it as tripwire).
For that I run the command/testforblock ~ ~ ~ minecraft:tripwire 0and got as output while standing in a tripwire with two connections " The block at ~,~,~ had the data value of 1 (expected: 0). " which is fine, as/execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 1 say That worksoutputs " That works ".
But while standing in a tripwire with only one connection, /testforblock gives the exact same error but /execute detect fails. When I change the data value to 0 in /execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 0 say That works , it outputs " That works ".When typing in
/testforblock ~ ~ ~ minecraft:tripwire 0while standing at 9, 101, 130 it returned " The block at 9,101,130 had the data value of 1 (expected 0). ". (Image 1)
Now I go 1 block north, so I'm standing at 9, 101, 129 and entered/textforblock ~ ~ ~1 minecraft:tripwire 1and it returned " The block at 9,101,130 had the data value of 0 (expected 1). ". (Image 2)
But that disagrees with itself... What data value does the tripwire at 9, 101, 130 now have?
/testforblock and /execute detect don't use the same data valueData values are not the same at the same block but testing from different location
Data values are not the same at the same blockbuttesting from different locationData values are not the same at the same block while testing from different location
I wanted to use /execute detect with an exact damage value to detect if a player is standing in a tripwire (I don't use it as tripwire).
For that I run the command/testforblock ~ ~ ~ minecraft:tripwire 0and got as output while standing in a tripwire with two connections "The block at ~,~,~ had the data value of 1 (expected: 0)." which is fine, as/execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 1 say That worksoutputs "That works".
But while standing in a tripwire with only one connection, /testforblock gives the exact same error but /execute detect fails. When I change the data value to 0 in /execute @p ~ ~ ~ detect ~ ~ ~ minecraft:tripwire 0 say That works, it outputs "That works".When typing in
/testforblock ~ ~ ~ minecraft:tripwire 0while standing at 9, 101, 130 it returned "The block at 9,101,130 had the data value of 1 (expected 0).". (Image 1)
Now I go 1 block north, so I'm standing at 9, 101, 129 and entered/textforblock ~ ~ ~1 minecraft:tripwire 1and it returned "The block at 9,101,130 had the data value of 0 (expected 1).". (Image 2)
But that disagrees with itself... What data value does the tripwire at 9, 101, 130 now have?Steps to reproduce:
- Place command block with this command
/testforblock ~ ~1 ~ tripwire 0- Place string on top of command block
- Notice value of string (tripwire) changes if you are standing on the block or not.
Data values are not the same at the same block while testing from different locationString on ground changes value if player occupies same block
String on groundchanges value if player occupies same blockNot hooked up tripwire changes value if player occupies same block
Not hooked up tripwire changes valueif playeroccupies same blockTripwire changes value when an entity occupies the same block even if it's not connected to a hook



This description is very confusing. From what I can tell, I tested this and there seems to be no difference between using testforblock and execute detect.
The commands I used were
This gave a positive result while standing in the tripwire
This also gave a positive result
I think we will need screenshots and put your coding in code tags with curly brackets to clarify please
Ok, I'm sorry, I was wrong. I've missinterpreted it as I didn't looked at the coordinates I was using.
BUT what I actually discovered was that when typing in
while standing at 9, 101, 130 it returned "The block at 9,101,130 had the data value of 1 (expected 0).". (Image 1)
Now I go 1 block north, so I'm standing at 9, 101, 129 and entered
and it returned "The block at 9,101,130 had the data value of 0 (expected 1).". (Image 2)
I have updated the description and title to correct it.
Aha I see now. Possibly works as intended as tripwires when being stepped on change value, but in this case you don't have it hooked up to any tripwire hooks. Okay to simplify this bug report, I'd suggest you change the title "String on ground changes value if player occupies same block"
In your description put this:
Steps to reproduce:
Notice value of string (tripwire) changes if you are in the standing on the block or not.
Ah. You're right that the tripwire changes its data value when an entity occupies the same block, so it works as intended. Apparently I was tired when I came across this and it confused me.
qmagnet, thank you for your pacience and helpfulness.
Can a mod please mark this as works as intended or just close it, if only Mojang can mark it as works as intended?
Well... I don't understand why the block changes value when you stand in it. Is this actually works as intended?
I think for the hooks to track if an entity is in the tripwire.
I don't knwo if it really is works as intended, but I think so.
But this affects string that is not attached to hooks. I'd like to see if Mojang says this actually is WAI.
My guess is that it's computationally cheaper to decouple the entity check from the block/redstone updates in this way. The tripwire's powered state can toggle as rapidly as an entity enters or leaves its hitbox, without needing to check any other states or blocks, and the more expensive checks for other tripwire or hooks can happen at a slower pace, on the redstone update schedule.
Confirmed for 1.8.
The hooks give off the signal.
Cool for adventure maps? Invisible traps not requiring tripwire hooks as tripwire changes from value 0 to 1... :/