r/MinecraftCommands

▲ 5 r/MinecraftCommands+1 crossposts

Way to make lights flicker (legit or mods)

I made street lamps on a road in my creative world, but would like to have the lights flicker occasionally creating a spooky or more realistic effect. The street lamps use waxed oxidized copper lanterns I’m pretty sure. Any way to make them flicker

reddit.com
u/IglooKid22 — 6 hours ago

How to spawn an entity with your UUID as a tag?

So I have a datapack which adds a certain ability. This ability is that when you crouch, it spawns a certain entity at your position. Everything works, except if you hold crouch, it spawns multiple. I can't make it only work if that entity doesn't exist already bc I want multiple players to be able to use this at the same time. So, I need a very specific way to identify between the different entities. I immediately thought that I could have the player's UUID as a tag, but I can't figure out how to do this, and I have no other ideas. If anybody has another idea, or a way to set a UUID as a tag, please help

reddit.com
u/Still-Oven9420 — 9 hours ago

I made a pin pad for a project

At first, I wanted to make it using dialog menus, but thought without an external UI would be better. Kinda like how it turned out, even though it isn't fully done yet! :)

And not so complicated as I initially thought. The individual interactions have data components and can add their value using a macro into a data storage array (and the text display using multiple "extra" entries). Then the array is checked for the values "back" or "enter" to perform those actions by deleting entries or checking if the array state matches the key sequence.

(For testing, I currently have "1,2,3" and a temporary "1,2,3,4,5,6,7,8,9" code to open the door).

But I have a question: is there a better way to compare the array to the key? Because, when checking using: {pin_pad:[1,2,3]}, it also validates if the order is wrong or there are more entries besides those.

For checking the amount of entries, I test for a potential next (pin_pad[3]), but for the order, I still check all entries individually. Even with a predicate, this isn't ideal.

If anyone knows a simple way to compare the arrays without this, feel free to tell me. Thanks! :)

u/UnfinitePika — 14 hours ago

Commands kill box is too big and I don't understand why.

I am trying to make fire vents that kill you if you touch the fire. I am using this command

execute as @e[tag=Vent] at @s run kill @a[dx=4,dz=0.1]

If you even slightly touch the block that goes along the x axis in front of the vent you die immediately. I would like to make the area smaller but I don't know how. If you also have any ideas on how to make the command work omnidirectionally based on which way the entity with the "Vent" tag is looking that would be very nice.

reddit.com
u/Nalle-poijjaat — 12 hours ago

will the registry of a player quitting happen in the middle of a function

is it possible that a player quits the game while a function is still running, or will the quitting of a player only be registered before or after a tick has finished processing

because i use the /tag command a lot, and when a player quits in the middle of a running function i lose access to the removal of the tag in the subsequent part of the function (all the tags processing finishes within one single tick)

like what if a function is very tidious and takes seconds to finish, and a player hits the "disconnect" button in between, what would happen in the perspective of the function

reddit.com
u/MLE_qwq — 15 hours ago
▲ 1 r/MinecraftCommands+1 crossposts

How to open Minecraft java console?

I got banned off online Minecraft and I have a bypass mod, I tell me to type a command but I don’t know where. I know it’s probably in the games console how do I open it please help.

reddit.com
u/visibletuna16 — 17 hours ago

How to undo "/kill @e"

Accidentally used that command while looking for a different command (specifically one to kill all zombies in my world), and now all of the mobs in my world are dead. Anything I can do to undo this? (And what is the correct command for killing all zombies in my world, and is there also one that can stop them - but not other mobs - from spawning?) Help is appreciated!

reddit.com
u/IcySail441 — 1 day ago
▲ 36 r/MinecraftCommands+2 crossposts

I wanted to give Bedrock Mapmakers the ultimate tool: A custom AI engine for Skyrim-style NPC schedules.

Hey everyone! I don't build maps myself, but I know how much mapmakers struggle with static Bedrock NPCs and the mess of command blocks needed to make them do anything interesting. So, I decided to build a proper solution for you all using the Script API.

In this video, I’m showing off a custom AI engine I'm developing to give NPCs a "Skyrim-style" daily routine.
☀️ Daytime (Working): The NPC walks their custom path and works at the anvil. Since vanilla NPCs are completely stiff, I created a custom animation in Blockbench. My engine has a custom UI where you can just type in the animation name (animation.npc.job), and the script automatically triggers it when the NPC reaches its workstation (essentially automating the /playanimation logic through the API).
🌙 Nighttime (Sleeping): At dusk, the AI dynamically interrupts the route, sends the NPC back to Node 0 (Home), and triggers a custom sleeping animation.

The pathfinding is 100% custom math (no vanilla AI jank) and requires absolutely zero command blocks. My goal is to provide mapmakers with a powerful tool to create living RPG worlds where they can easily plug in their own paths and Blockbench animations.

To all the mapmakers and creators out there: what other features would you want in an AI engine like this?

I need help with detecting if someone has a item in their inventory

I’m trying to make it so if you have a fishing rod it clears you of the tag “dash” but I don’t know how to detect items whatsoever. PLEEEEEEAS HELP🥺🙏

u/Glergedegepshe — 1 day ago

Help with making PvP "match" system

I am making a PvP map with a system that does matches. I need a system that detects if all players [except the last one] on the map have died so that the match ends. I have considered using scoreboards.

reddit.com
u/Appropriate_Show255 — 22 hours ago

How to prevent breaking / placing blocks in a certain area

So I’m starting up a realm with custom bosses and weapons with only command blocks, I’m after building the spawn and I’m trying to make it so you can’t build or break anything unless you kinda “buy land” I was going to use the deny blocks but the spawn is like 300 X 300 blocks plus mountains in the back I don’t want anyone touching and like a 50 block radius around spawn before you can break or place anything

With the max playable fill command at like 3k blocks obviously it’s going to take ages, is there any command I can run where it won’t let people do anything within a certain area (that won’t activate on players with bought areas

reddit.com

Pls help me i am going insane

I am currently building hungergames in minecraft and for that i want custom crafting recipes and loottables and so i began build a datapack but i cant make it work for the sake of my life but there is nothing wrong with it i am playing in 26.2

this is my structure

Datapacks

HungerGames

data and pack.mcmeta with following code:{

"pack": {

"description": "This is the description of your data pack",

"min_format": 107.1,

"max_format": 107.1

}

}

then in data:

minecraft:

loot_table:

chest1.json with following code:

{
    "type": "minecraft:chest",
    "pools": [
      {
        "rolls": 5,
        "entries": [
          {
            "type": "minecraft:item",
            "name": "minecraft:iron_nugget",
            "weight": 15,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 6
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_leggings",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_helmet",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_chestplate",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather",
            "weight": 4,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 2
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_boots",
            "weight": 8
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:copper_axe",
            "weight": 5
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:copper_sword",
            "weight": 5
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:shield",
            "weight": 2
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:crossbow",
            "weight": 3
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:bow",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:stone_sword",
            "weight": 7
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:stick",
            "weight": 10
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cobblestone",
            "weight": 5,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 3
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:iron_ingot",
            "weight": 3
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cooked_beef",
            "weight": 20,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 4
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cooked_porkchop",
            "weight": 20,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 4
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cooked_mutton",
            "weight": 20,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 4
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_boots",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_chestplate",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_leggings",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_helmet",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:stone_axe",
            "weight": 7
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:arrow",
            "weight": 30,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 6
              }
            ]
          }
        ]
      }
    ]
  }{
    "type": "minecraft:chest",
    "pools": [
      {
        "rolls": 5,
        "entries": [
          {
            "type": "minecraft:item",
            "name": "minecraft:iron_nugget",
            "weight": 15,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 6
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_leggings",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_helmet",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_chestplate",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather",
            "weight": 4,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 2
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:leather_boots",
            "weight": 8
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:copper_axe",
            "weight": 5
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:copper_sword",
            "weight": 5
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:shield",
            "weight": 2
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:crossbow",
            "weight": 3
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:bow",
            "weight": 9
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:stone_sword",
            "weight": 7
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:stick",
            "weight": 10
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cobblestone",
            "weight": 5,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 3
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:iron_ingot",
            "weight": 3
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cooked_beef",
            "weight": 20,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 4
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cooked_porkchop",
            "weight": 20,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 4
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:cooked_mutton",
            "weight": 20,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 4
              }
            ]
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_boots",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_chestplate",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_leggings",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:chainmail_helmet",
            "weight": 4
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:stone_axe",
            "weight": 7
          },
          {
            "type": "minecraft:item",
            "name": "minecraft:arrow",
            "weight": 30,
            "functions": [
              {
                "function": "minecraft:set_count",
                "count": 6
              }
            ]
          }
        ]
      }
    ]
  } 

please just help me i am new at making datapacks and i am going literally insane the thing is minecraft even sees my datapack because with /datapack list i can see it but i just cant use the loottables it will always just be an empty chest please just help me

reddit.com
u/Mc-Grinder-69 — 1 day ago

Can I spell using fireworks?

Are there any ways I can use fireworks to spell words out?
I want to make a little show for my partner and have it show a short message at the end

I don’t think I can make one with particles that will spell something, unless I’m wrong. I was thinking also maybe making custom flight duration and have multiple exploding in a way it spells something out?

reddit.com
u/xXCensoriousXx — 1 day ago
▲ 9 r/MinecraftCommands+1 crossposts

I’m having trouble with the “ ! “

I’m trying to make it so if the block above the fishing hook is not air then fill the block below it with glass, but it’s not working😔

u/Glergedegepshe — 2 days ago

Randomizer

I want to create a tag randomizer that will give players a small chance to spawn as two different special races and a high chance of just being normal. Is it possible?

reddit.com
u/Mango6926 — 2 days ago

any 1 done bending with commands?

i don't need help with a specific command i just want to know if someone has done it propearly with commands (not datapacks) and see if i can get some advice in general. Earthbending has been the hardest since for every ability i have to recreate it for each rock. Im making it for a server.

reddit.com
u/Mean-Cheek-6282 — 2 days ago

Looking for help with a time of day command (and one to execute a command with specific items)

Hello all! I am semi-new to doing Minecraft commands and have only done simple ones like making a drawbridge open and close with a sound attached.

What I want to do is make a command that executes an action at a set time of day. For example, opening a door at dawn and stopping at day, and repeating that, but at dusk and night. I’m trying to make a puzzle for my friends and I thought it would be a cool way to show off that I can do this kind of stuff. Most of my work before has come from googling things and troubleshooting, but I think I want help from human beings on this one cause it seems more complicated than opening and closing a drawbridge.

Sing in the latest edition of bedrock without any experiments on, and in creative flat world. If all goes well with my friends, I will probably be adding the puzzle to a non-flat world. I might post again, depending on where I want to go after having this entrance open.

I did also want to know if anybody could help me figure out how to make a command block that only execute a command when certain items are placed in an item frame or chest

Since I’ve already done the drawbridge, I know how to open and close the doors I want to with placing and replacing blocks and air.

Any help would be much appreciated, thank you very much!!

reddit.com
u/GayPigeon2000 — 3 days ago

Is there any way to heal 1 HP to a player at a time?

I tried the trick where you '/effect give instant health 1 0 true' with a simultaneous damage command that does 3 damage to make it appear like you're gaining only 1 health at a time but this trick feels very jank as the damage sound goes off and it makes your camera shake.

Is there any work around to modify current player health without changing their max health attribute, or maybe even the ability to damage players without making sound/camera shake?

The reason why I'm not using the regeneration effect is because I'd like the function that I'm creating to simultaneously work with the vanilla regeneration effect (such as the one from beacons or potions) at the same time. I'd prefer if the healing-over-time from the function I'm trying to create could exist on a player at the same time as the effect Regeneration.

I'd also prefer not to mess with a players hunger level as this function I'm looking to create needs to be vanilla/survival adjacent and so if I'm manipulating their hunger to make a healing mechanic it could invalidate the game play loop of collecting food.

Thanks!

reddit.com
u/pyrociustfb — 3 days ago