• 0

    posted a message on Need help testing for RootVehicle

    Thanks Crazy Dave!


    I tried uploading a screenshot, but keep getting an error message when I try to upload.


    It looks to me like the path matches perfectly, but I'm a relative noob, I've only been using command blocks for a couple weeks.


    Is there something I'm missing? I'm actually having trouble getting anything involving NBT to work at all.


    Is there a better resource for syntax than digminecraft or fandom? Possibly specific to version? (1.16.5) I'm comfortable with programming languages, but cannot find detail in syntax and parameters without coming to forums. I'd rather do my homework than need to ask over the internet and wait and hope someone has the answers I'm looking for.


    I appreciate your helpfulness very much, but with resources, I would not need so much help. Anywhere you can direct me?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Need help testing for RootVehicle

    Hi Crazy Dave,


    I used to use @p all the time until I discovered I could restrict even more to @s. So, since your first reply I have been trying different formats, and put @p in the command block out of sheer muscle memory, and it worked! So, now I combine boat/minecart detection with @p, with distance detection @s. a quite reasonable workaround.


    Thank you for providing the means to detect a RootVehicle, even if it's not super precise; This is so close to what I want I consider it to be solved (like someone will be riding a minecart in the water, or a boat on my tracks!!!).



    However, I have one last curiosity for you:


    I cannot seem to get the detection working properly with the nbt tag: [nbt={ etc, etc}]


    I have tried the boat and the minecart with and without quotation marks; and I even checked the nesting under data entity @s/@p and it is exactly as you listed in your respose: [nbt={RootVehicle:{Entity:{id:minecraft:minecart}}}]



    Thank you so much for all the help you share with everyone !!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Need help testing for RootVehicle

    Okay, strange experience to add:


    I thought I'd just add the requirement of being in a RootVehicle and not be picky about which.


    When entered in a command block, a failed result comes back when I'm sitting in the boat, and when I enter the command live in chat, it come back test passed count = 1 ?!?!?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Testing for player nearby

    /execute positioned x y z if entity @p[distance=..D]


    x y z are the location coordinates to test from


    D is the distance in blocks/meters from the detection location. (You need the two dots)


    @p restricts to players excluding other entities



    Just in case you haven't come across this: you can get coordinates by pressing F3.

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Need help testing for RootVehicle

    Okay, I got into a minecart and ran the command you gave me: Test passed, count = 1


    Ran it in a boat, same thing Test passed, count = 1


    On the ground: Test Failed



    Does this mean I can access RootVehicle somehow?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on I dont understand /execute for an elevator

    To just teleport up 8 blocks, you only need:


    /tp @p ^ ^8 ^


    the ^ makes the coordinates relative to the player position


    However, the detection of when to teleport the player is the tricky part, and there are more options than I care to list. The most common though, are detecting player coordinates, and detecting when a player is on a certain block. The way to do this depends completely on which version of Minecraft you are playing.


    If you would let us know what version you are playing, someone will be able to help you out. If you happen to be playing 1.16.5, then I can help you.


    Hope this helps,


    Thom

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on How to turn off an activator rail with a redstone line

    There are two options I can think of right away:


    1: use a torch to power instead of a lever; running the redstone line to the block the torch is anchored to will unpower the torch whenever the redstone line is powered.


    2: leave enough space between the power source (lever) and the circuit (powered rails) so you can insert a comparator between: When the power coming into the side of the comparator is greater than the power flowing through the comparator, the comparator will shut off the signal going through**. You can guarantee this power is higher by inserting a repeater (boosting signal to 15) as the last thing to come into the side of the comparator.


    **There are two setting for the comparator: default setting is as described above. IF, however, you click on the comparator it has a second setting where it REDUCES the signal by the amount coming in through the side. Be careful not to accidentally click this or it won't work.


    I hope this helps.


    Thom

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Need help testing for RootVehicle

    I am trying to use command blocks to execute certain commands when I am in a boat; and a different set of commands if I am in a minecart.


    I am using java 1.16.5, and all suggestions I can find are for older versions, and they all show as failed tests when I check the command block.


    I am trying to be complicated (using in may areas so chunk loading presents issues), so the use of tags promises to be WAY TOO TEDIOUS.



    The most promising attempt (with variations) was this one:


    /execute if entity @s[nbt={RootVehicle:{Entity:{id:"minecraft:minecart"}}}] run . . . . .

    /execute if entity @s[nbt={RootVehicle:{Entity:{id:"minecraft:boat"}}}] run . . . . .

    /execute if entity @s[nbt={RootVehicle:{Entity:{id:boat}}}] run . . . . .


    but it also returns a failed attempt result.


    I am hoping there is a way to directly test if @s in in a cart or boat (separately).


    Thanks Much for any help given (or clarification if this cannot be done)


    Thom

    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please .