• 0

    posted a message on Datapack use objective value as attribute value
    Quote from 110110»

    How could i implement python?


    Literally run a for loop with the attribute and corresponding score as a variable.

    Print everything including the variable in the format of the command i wrote above, and then copy the output over to the mcfunction


    Or just copy and paste it many times

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Any way to not reset effect after die?

    Without another complicated method, I don't think there is any easy way to retain effects from disappearing after death

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on (Solved) I need help with commands (how to teleport all players in a certain area)
    tp @a[x=X,y=Y,z=Z,distance=..num] <Coords>

    This tps people in a spherical radius from xyz cords to the specified coords

    tp @a[x=X,y=Y,z=Z,dx=1,dy=1,dz=1] <Coords>

    This tps people in a cuboid radius of X+1, Y+1, Z+1 to the specified coords


    XYZ is the center of the radius in the 1st command. In the 2nd, it is the corner of the cuboid region

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Datapack use objective value as attribute value

    No you cannot fetch scores -> attributes

    However you can use another programming language (like python) to generate for you values that correspond to the score.

    execute as @a if score @s health_scoreboard matches 1 run attribute...


    It wont be laggy at all as it is just checking for scoreboard scores before continuing. Scores are one of the most efficient and optimised things in minecarft

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Minecraft Begone Stick!

    This is possible through the "entity_hurt_player" custom advancement


    • Detect when a player is hurt through the advancement json below
    • In the reward function tp the player that is hurt (which is self) to the specific location.

    This is only possible if the player kicked is in survival/adventure. Also using a plugin like skript would probably be better for stuff like this

    {
      "criteria": {
        "requirement": {
          "trigger": "minecraft:entity_hurt_player",
          "conditions": {
            "damage": {
              "source_entity": {
                "type": "minecraft:player",
                "equipment": {
                  "mainhand": {
                    "items": [
                      "minecraft:stick"
                    ],
                    "nbt": "{begone_stick:1b}"
                  }
                }
              }
            }
          }
        }
      },
      "rewards": {
        "function": "namespace:tp_player"
      }
    }

     
    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on I Need help with Custom Mob Spawning
    Quote from Sojumir»

    Heya, so I have a server and am currently making custom mobs that drop custom loot for custom crafting etc.
    I've looked at youtube tutorials and can't quite understand how to do it at all; would anybody here know if theres a datapack out there that I can download (for 1.18) or if anyone knows of a modular system that I can use to add my custom mobs to naturally spawn, because currently I'm relying on simply pasting the said mobs summon command into a command block with a button on top so players can obviously spawn the mobs to then kill, however this is of course very immersion breaking



    You could place spawners down with custom mobs inside them (or use a normal spawner within an area and replace the spawned mobs with the custom ones)

    Use this to generate the spawners: https://mcstacker.net/


    Although, searching for plugins is much more better as it gives you more power for less work and is designed for servers

    Quote from TwoBlocksMC»

    There is such a specialized mod: In Control

    It allows to control mob spawning, based on various conditions, and it supports mobs provided by custom mods.

    https://www.curseforge.com/minecraft/mc-mods/in-control

    This mod may be not easy to configure, but it is really versatile and powerful.



    Not feasible since this is a server and not everyone knows to/can play on forge/fabric.

    A better solution would be plugins as that is designed for servers

    Posted in: Redstone, Commands and Mechanisms
  • 0

    posted a message on Parent needs help: how to find a game destructive command block that was left b another player?
    Quote from spom»

    OK- so I did all that and searched through the world files but there weren't any blocks that listed "tp player1 player1" as their action. The other kid did say she deleted it, but I'm guessing if that is the case then the effect of the block is still attached to the player1 even though the command block is removed. Now when command blocks are disabled it plays fine (with the obvious downside of no command blocks) but when we re-enable them in the server config then the tp bug happens again.


    So: is there a way to clear the status of a player?


    The "bug" basically means the command block is still there and executing that command. /tp has an alias of /teleport, so I suggest you just manually look through all types of command blocks, by searching their block ids ("command_block, repeating_command_block, chain_command_block") for the command

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Day time set as scoreboard value to use to trigger events?
    Quote from Hybrid_Hydra»

    CRAZY question, but I'm currently trying to do the same thing in Bedrock Minecraft. Is there a similar result execution on Bedrock?


    No there isn't. It is probably possible through addons or the new scripting engine BE has

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Total Distance in Km (or M) scoreboard?
    Quote from Steven909»

    Hello, would there be a way to combine *every* movement type distance together into one m/km output number? Like exactly what you, Megacrafter107, already made up there with the command blocks, but add crouch/fly/boat/horse etc into the total all at the same time? I imagine there's gotta be at least some way to do it.


    Thank you for your time.


    You would have to modulise each type of distance and then add its output to the total distance travelled

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Spawn mob with rotated head.
    Quote from Chrisl88»

    Is there a way to rotate it's head left & right? Also is it possible to add that argument to a command like /data modify entity @e[name=C,limit=1] NoAI set value 1?


    data modify can only replace/set 1 nbt tag or list index at a time (like NoAI or Pos[0]).

    You'll have to split this functionality into 2 commands if you use that

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Hiding Scoreboard Commands

    I did do that, but the message still turns up



    Are you sure you disabled both commandfeedback and commandblockOutput, the success shouldn't turn up unless you're directly executing from chat

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Vanilla Datapack

    You can extract a <version>.jar file in your versions folder using something like winrar.

    Then you go to the data folder and all the vanilla loot tables, recipes, tags and advancements will be there

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Can't summon entity
    Quote from dogekeen»

    Hey, so this is happening to me as well but I'm on singleplayer.. I type in "/summon minecraft:iron_golem" (on 1.17.1) and it gives me the following error: "Unable to summon entity." tho when I put in "/summon minecraft:fox" it worked perfectly fine. I even left and rejoined and it still did not work. I'm sure it's a bug with Minecraft, not sure what exactly would cause it but eh. (On other singleplayer worlds its works, most of the time. It seems like it sometime bugs out and sometimes doesn't.)


    Have you tried writing iron and then pressing tab for the game to autocomplete the namespaced id?

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on [HELP] Armor set detection
    Quote from Frozen_Rain»

    Okay so far so good, but how do I clear the resistance if this command is active? I tried simply putting in a constant clear command but it doesn't work.


    You would need to implement stuff like additional tags to flag that you're actually receiving damage and then hook it to a /effect clear then

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on [HELP] Armor set detection
    /effect give @a[nbt={Inventory:[{id:"minecraft:netherite_helmet",Slot:103b,tag:{custom_tag:1b}},{id:"minecraft:netherite_boots",Slot:100b,tag:{custom_tag:1b}}]}] wither...


    would probably be the command

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