• 0

    posted a message on Boat Passenger Detection

    Hello,


    Thank you for the response. This does not work, though if it did, it would likely target the furnace minecart in the boat and detect itself causing a false positive result.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Boat Passenger Detection

    Hello, I'm working on a data pack for Minecraft and oddly enough, I need to detect if the passenger in your boat is a furnace minecart.


    This is what I have:



    execute as @a[nbt={RootVehicle:{Entity:{id:"minecraft:boat",tag:{Passengers:[{id:"minecraft:furnace_minecart"}]}}}}] run say hi


    This is not working, likely because I am basing this command off of target argument selectors for killing items on the ground. Any ideas?
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Commands not working on server

    Change the "! XP10" to "!XP10". You cannot have spaces in, before, or after tags.


    You may have also built the original command in the spawn chunks of your world, where it is always loaded. If you moved it out, the chunks may have been unloaded and will stop any function. Go to the chunk(s), (F3+G to see them), and use the command inside the chunk(s).


    /forceload add ~ ~

    This will stop the chunk(s) from unloading.


    I also recommend that instead of a comparator, you use a conditional chain command block on top as the second command. If you don't know how to use it, the internet is a great help. If that does not work, try setting up a datapack.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to Leash a player to a mob using commands? (1.18.1)

    I think if you use



    execute at @e[type=endermite] run tp @e[type=player] ~ ~ ~


    It should work. When you teleport someone to an entity, it uses both their position and rotation. When you specify just the position, the rotation of the player should not change. You may want to add some tags to the player so you aren't stuck in the leash forever.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help for a game pt 2
    The above command works, but also, the original command has

    execute at @p as @s

    Basically you are saying is, you want the command to execute at the nearest player, as the person who runs the command. I'm assuming you are using command blocks.

    This works:

    execute at @s as @p


    But this is much neater:

    execute as @p at @s
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Microsoft Visual Studio Giving Errors for Correct Things

    Hello, I've been having a problem with MS VS, It's my first time creating a datapack. But some things are coming up as errors even though they aren't wrong.


    I'm sure it just thinks I'm in another version, but the world it is in is in 1.16.5, and created in 1.16.5. I cannot provide images as for some reason the site isn't giving me the option to.



    replaceitem entity @a[tag=radarpod] container.8 compass{LodestoneDimension:"the_nether",display:{Name:'[{"text":"Activate Radar","color":"green"}]'}}

    "/replaceitem was removed in 20w46a (the second snapshot of 1.17) in favour of /item.datapack(1)"




    {
    "pack": {
    "pack_format": 6,
    "description": "Datapack"
    }
    }



    "Expected a number between 9 and 9.datapack"
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Quick Question about redstone

    You cannot separate redstone wire from a redstone torch. Unless they are more than one block away, not going diagonally.

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Custom mob spawner spawns pigs help!

    Try creating the mob in a spawn egg, and right clicking the spawner with it. I do not know if the nbt data carries over, so this may or may not work.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Random Entity CustomName from a List?

    Just off the top of my head, you could probably make a system to spawn armor stands with names, kill all but one. Do the same with another. And then get two selectors in order from first to last name. Though this would only work with tellraw, and title. As I don’t think you can use selectors with display names.

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Can anyone help me with a command?
    Quote from expertcoder14»

    You could try this:

    execute as <armour stand> at @p positioned 123 ~ ~ run tp @s ~ ~ ~



    This is off the top of my head, so substitute in a selector for the armour stand and an appropriate x-coord, and try it for yourself and see if it works.


    That’d probably work, but you can simplify with

    /execute as <armor stand> at <player> run tp @s <x> ~ ~

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Quick Question about redstone

    Please elaborate

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on How can I make a player get a gold bar when they get a kill?

    Just set up a scoreboard for kills, then give 1 gold bar to people with more than zero score. In a conditional command block after that. Decrease everyone’s score with more than zero score by 1. You could just reset it, but I would decrease as if a player got more than one kill, they would get more than one bar.

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Microsoft VS Giving Error Messages for Correct Things

    Hello, I've been getting 2 error messages that are annoying me to death. I'm creating a datapack for my friend's server to add different air combat weapons. The version is on 1.16.5 due to compatibility issues. The version of the testing world is on 1.16.5, I'm assuming MSVS thinks I'm in a different version. It also bugs me about commands that don't exist in the version it thinks I'm supposed to be in. Anyone know how to remove the error messages?


    I've tried moving the datapack to a new world, it still does not work. The world was created in 1.16.5.

    Posted in: Redstone, Commands and Mechanisms
  • 1

    posted a message on View only chests. [SOLVED]

    You can create a chest that has its slots constantly filled with items, but make sure the items have special tags. Then you can have a repeating command block that clears the entire player's inventory from those items with that tag.


    For example:


    /item replace block <x> <y> <z> container.<#> <item>


    /clear @a[distance=..20] <item>

    ^^

    (distance from the chest)


    Make sure that in the /clear command the item specified is completely matching the one in the chest or it won't work.


    You cant make someone able to "edit" without creating something like in the attached image (if you want I can upload a schematic of it, though it doesn't have a "view only" option) but you can make it able to be taken out by someone with a certain tag:


    /Execute as @a[distance=..20] unless entity @s[tag=<tag>] run clear @s <item>

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Problem with detecting players out of range

    I am creating a Laser tag map with my friends, so I created an armor stand with particles that constantly moves in the direction the player was originally facing. I need the armor stand to disappear after it has gone too far, but I am having trouble.


    This is the command I came up with in a repeating and always active command block:


    execute as @e[tag=shootLSR] at @s if entity @p[distance=35..] run kill @s

    For some reason it dies when it reaches outside 35 blocks of the command block, I tested this on a single-player world and it worked. But now that it's in a multiplayer world it's not working. Any idea why?

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