r/MinecraftCommands 14h ago

Help | Java 1.21.11 Spyglass 4.9.1 hot working properly

0 Upvotes

Does anyone know how to fix a bug with Spyglass where command autocomplete suggestions don't appear and commands are colored either monochromatically or incorrectly - even though VSCode recognizes the file as "mcfunction" and Minecraft executes the commands properly? The datapack was created using the "/datapack create" command, so there are no structural errors. Spyglass output indicated a failure to download the cache. I tried deleting the cache and reinstalling the extension. The only thing that worked was installing version 4.5.0, but that doesn't suit my needs because I'm building a map for version 1.21.11, and the Spyglass syntax in that version is outdated.


r/MinecraftCommands 19h ago

Help | Java 26.2 A bug in my datapack code has never confused me as much as this one is right now

Enable HLS to view with audio, or disable this notification

26 Upvotes

Using a datapack, I've added a diet system to the game. Consuming foods of different groups is intended to give a set number of points to each respective group. For example, the golden carrot is intended to give 6 points to the vegetables score (which it does.) The potato is intended to give 1 point to the score (which it also does.) But for some reason, the carrot behaves completely differently. It is intended to give 3 points, but gives more, and gives points when clicking a block, as shown in the video. The setup is identical for all three items, and I scoured the code for instances where perhaps something else was adding to the score, but I can't find anything.

Carrot consumption is detected with an advancement carrot.json:

{
  "criteria": {
    "consume": {
      "trigger": "minecraft:consume_item",
      "conditions": {
        "item": {
          "items": ["carrot"]
        }
      }
    }
  },
  "rewards": {
    "function": "mastermode:eat/carrot"
  }
}

This advancement is interchangeable with the golden carrot/potato advancement, barring you'd have to change instances of "carrot" with "golden_carrot" or "potato".

As a reward, this advancement runs the following function, carrot.mcfunction, that adds 3 points to the vegetables score and clears the advancement so another carrot may be eaten.

advancement revoke only mastermode:consumed/carrot
scoreboard players add @s vegetables 3
# For testing purposes:
say carrot.mcfunction ran

Again, I've used Ctrl+Shift+F in VS Code to look for instances of "scoreboard players add u/s vegetables 1", or "carrot", or "vegetables", and I've found nothing. I cannot for the life of me explain why the carrot specifically is working like this. I've tested like a dozen other food items and none of them have this problem. Any ideas/solutions would be appreciated.


r/MinecraftCommands 19h ago

Help | Java 26.1 Detecting play position using datapacks

Post image
12 Upvotes

Alright so I'm trying to make a datapack to where if you stand on a specific coordinate, it'll say hi. I put it in the tick function it doesn't work. But when I do the command ingame it works, is there a way to fix this?


r/MinecraftCommands 12h ago

Creation Working clock tower

Enable HLS to view with audio, or disable this notification

160 Upvotes

I made a working clock tower for my server only using commandblocks and a single plugin that lets me create variables but I think it could be easily replaced with a datapack


r/MinecraftCommands 1h ago

Help | Bedrock Preview Copy paste breve ¡con comandos! (Desglose incluído)

Thumbnail
gallery
Upvotes

Setup: El setup es compacto, el primer bloque (con una palanca) en repetir, incondicional, se necesita Redstone, y el segundo en cadena, incondicional, siempre activo arriba de este.

Traducción del primer comando: (paste)

_.Se Ejecuta como el "jugador más cercano" (@p) con la condicional de "tener el item de pala de piedra en la mano principal" ([hasitem={}]) en la "Posición u coordenadas relativas del jugador" (at @s) corre el comando "carga la estructura de nombre replace, a 1.6 bloques de altura desde el piso del jugador (^ ^1.6)y 1.5 bloques de distancia desde el jugador" (^1.5)

Traducción del Segundo Comando: (copy)

_.Se Ejecuta como el "jugador más cercano" (@p) con la condicional de "tener el item de papel en la mano principal" ([hasitem={}]) en la "Posición u coordenadas relativas del jugador" (at @s) el comando "carga la estructura de nombre replace, a 1.6 bloques de altura desde el piso del jugador (^ ^1.6)y 1.5 bloques de distancia desde el jugador" (^1.5) hasta las mismas a 1.6 bloques de altura desde el piso del jugador (^ ^1.6)y 1.5 bloques de distancia desde el jugador" (^1.5)

_.Uso: sosteniendo el papel en la mano, miras a el bloque que quieres copiar y te lo quitas rápidamente, seguidamente miras a el otro lado en que quieres pegarlo ahora sosteniendo nuestra pala de piedra no pegando nos completamente al bloque en frente nuestro, y mirando recto hacia en frente ¡y listo! Una herramienta hecha en dos pasos, que puedes añadir para agilizar e inclusive ampliar el matiz de decoraciones que normalmente no serían posibles sin esta cualidad de forzar el poner bloques donde normalmente no se puede.

(Está idea obviamente es hecha a las prisas y por una necesidad que tuve mientras construía) así que la comparto a la comunidad para que exploten la idea, tengan buena tarde, o día, o noche ^^


r/MinecraftCommands 11h ago

Help | Bedrock [bedrock] On PC, having trouble keeping an armor stand upside down without having to use "Dinnerbone".

Enable HLS to view with audio, or disable this notification

3 Upvotes

r/MinecraftCommands 4h ago

Help | Java 1.20.5/6 Snowballs explode help

2 Upvotes

I found:

execute at @e[type=minecraft:snowball] unless block ~ ~-1 ~ air run summon minecraft:tnt

from https://www.reddit.com/r/MinecraftCommands/s/ppEtyL1gwS

and it works just fine until i add ,tag=<my tag> I want one tag to summon TnT and another to summon a wind charge

also if anyone knows a way for wind charges to instantly trigger that would be helpful also, thanks


r/MinecraftCommands 4h ago

Creation I made a particle renderer website :D

Post image
13 Upvotes

You can view particles with their proper sprites, animations, physics, and interactions :))

It also supports having multiple particles active at once, and has support for almost every particle

(This is NOT bug free, So if you encounter any issues please let me know)

https://lukejw12.github.io
This is the website