#Creating my first ever thing with CMDs

1 messages · Page 1 of 1 (latest)

steady moon
#

im a beginner and most of this might be too much for me lets start with making a datapack that counts death how can i do that

shadow iceBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1747491555:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

bronze sparrow
#

You can simply add a scoreboard with the deaths objective and it does that automatically.

steady moon
#

in the datapack

bronze sparrow
#

In your load function

steady moon
#

so load.json?

bronze sparrow
#

if you want to display it as well, you need 2 commands.

#

the load.json is only the function tag that tells minecraft which functions are the load functions.

#

tags are basically a list of id's

steady moon
#

in this directory

sacred latchBOT
bronze sparrow
#

I suggest looking at this

#

it explains all of this and where to put the files.

steady moon
#

wait u can make discs using datapacks?

#

i wanted to make that but i thought it was modded only

#

i guess if this is correct from the tutorial

#

i put in it like this

/scoreboard objectives add death deathCount {"Text":"Death Count"}

#

wait is it a json or mcfunction the load one

#

wait

slate heart
#

check that out, it explains everything about beginner's guide

bronze sparrow
#

you need two files.

#

data/minecraft/tags/function/load.json

#

and

slate heart
#

uh

steady moon
#

fine i used the extention it help me generate the starting folders

bronze sparrow
steady moon
bronze sparrow
slate heart
# steady moon

make a folder in minecraft called tags then inside of that a folder called function

#

and put your tick.json and load.json there

steady moon
#

oh damn i forgot it did that

#

ill keep the template just incase next time i wanna do it

slate heart
#

ok

steady moon
#

done now where do i init the scoreboard

slate heart
#

load.mcfunction

steady moon
slate heart
#

#

you're done

slate heart
steady moon
#

still not really done

#

so now when i /reload it doesnt sen the say command

slate heart
#

put the datapack

#

in your wold

steady moon
#

well i know how to do that i just now wanna know to make the scoreboard

bronze sparrow
#

you can make it visible with scoreboard objectives setdisplay sidebar death

steady moon
#

load?

slate heart
#

yes

#

no wait

#

do with commands

#

do /scoreboard objectives setdisplay sidebar death

bronze sparrow
#

you can put it in the load function if you want

bronze sparrow
steady moon
#

well here is the thing the load doesnt work for some reason

slate heart
steady moon
#

when i do /reload it no wwork

steady moon
bronze sparrow
#

what does the log say

steady moon
slate heart
#

called function

#

and put your load.json and tick.json there

#

i already said that 😔

steady moon
#

oh my

#

hold im sorry for my idiotacy

slate heart
#

no it's okay

#

i was confused when i first started

#

datapacking

steady moon
#

if u want i can show it it over VC

#

now there it is

#

it works

#

i put it in functions not function

#

bro this game

#

is there a way to remove the display an reput it cause i wanna reload its colors

bronze sparrow
#

scoreboard objectives modify

#

this does that iirc

#

(with the correct sub commands and arguments of course)

steady moon
#

wait what is even IIRC

bronze sparrow
#

if i remember correctly

steady moon
#

o

#

well i modify the objective to update display?

slate heart
#

yes

#

you can change it's color

steady moon
steady moon
crimson nebula
#

you don't use & colors

slate heart
#

crimson nebula
steady moon
#

when i reload it resets

bronze sparrow
#

or that

slate heart
steady moon
slate heart
#

you removed the death when you reloaded and made a new one with those colors

steady moon
slate heart
#

do /kill @a

#

and it should show

steady moon
#

i killedd my self it works fine but i wanna not reset it when i reload

#

like just reload the display

bronze sparrow
#

it shouldn't reset at all

#

unless you have a command that does it

slate heart
#

remove the scoreboard objectives remove death in your load.mcfunction

steady moon
steady moon
crimson nebula
#

reset display to what?

steady moon
#

the scoreboard

#

on the left

slate heart
#

why do you wanna reset the display

#

if you dont wanna reset it

steady moon
#

i wanna reset how the display looks if i wanna change its color

slate heart
#

modify it

steady moon
#

what should i modify it with

bronze sparrow
#

the display name

steady moon
#

so like this

#

instead of making it with the name i make it with no name then modify the name to it?

bronze sparrow
#

you don't need that

#

you only need the modify if you want to change it afterwards

steady moon
bronze sparrow
#

but for the initial creation, you can just put it in the add command

steady moon
#

it works now

#

nice one for my first

#

can i add like a skull emoji or like put text instead of int into the scoreboard like in hardcore if someone dies in a SMP the scoreboard update saying they are dead

bronze sparrow
#

yes

steady moon
#

wait can i use this to check for blocks under a beacon seeing if u use netherite blocks so it runs an acheievement

bronze sparrow
#

just use an achivement directly

steady moon
#

wait what

bronze sparrow
#

no need to do workarounds

steady moon
#

how?

#

is there already a check

bronze sparrow
#

we have a construct_beacon trigger

#

combine it with a location check condition and you can make it only trigger if the player used specific blocks for the construction.

steady moon
#

wait what is the highest level for a beacon in code

#

like level 4 beacon should be 3?

bronze sparrow
#

idk if this is counted from 0 or 1

#

try it and see ig

steady moon
#

so after i put in the level

bronze sparrow
#

add it to your datapack and see when it triggers

#

to make the advancement show up, you need a display field

#

otherwise it is invisible

steady moon
#
{
  "parent": "minecraft:nether/create_beacon",
  "criteria": {
    "beacon": {
      "conditions": {
        "level": 4
      },
      "trigger": "minecraft:construct_beacon"
    }
  },
  "display": {
    "description": {
      "translate": "advancements.nether.create_full_beacon.description"
    },
    "frame": "goal",
    "icon": {
      "count": 1,
      "id": "minecraft:beacon"
    },
    "title": {
      "translate": "advancements.nether.create_full_beacon.title"
    }
  },
  "requirements": [
    [
      "beacon"
    ]
  ],
  "sends_telemetry_event": true
}
steady moon
#

but just level 4 i want with blocks

bronze sparrow
#

then they start counting from 1 in this instance

steady moon
#

ye

#

so now after the first check what should i do

#

do i do it in 1 check or 2 checks

#

1 criteria or 2

bronze sparrow
#

first, remove the requirements. It is unnecessary

#

and the telemetry stuff too

steady moon
#

the criteria?

bronze sparrow
#

what do you want to check?

steady moon
#

full netherite beacon

#

like when the beacon at full power and bottom blocks are netherite

#

like all 4 levels

bronze sparrow
#

you don't add another criteria, you add a condition.

#

conditions use predicates to check for further things.

#

making the location check predicate will be tedious though.

steady moon
#

im too dumb bro i need someone to explain in a call

bronze sparrow
#

can't vc rn I am busy with chores

steady moon
#

when u gonna be not busyt

bronze sparrow
#

I won't be free for toda, at least.

pallid irisBOT
#
{
  "display": {
    "icon": {
      "id": "minecraft:beacon"
    },
    "title": "",
    "description": "",
    "frame": "goal",
    "show_toast": true,
    "announce_to_chat": true,
    "hidden": true
  },
  "parent": "minecraft:nether/create_full_beacon",
  "criteria": {},
  "requirements": [],
  "sends_telemetry_event": true
}
steady moon
#

this is where i am at rn

#

idk where to put the predicates

cold knoll
bronze sparrow
#

it's for checking if the beacon base (all 4 levels) is made out of only netherite blocks

cold knoll
#

Ah

#

Well it goes in criteria

steady moon
#

if any of u are free to tell me how to do it in a VC

#

cause im a bit dumb

#

also sorry for late reply cause i went to play with my friend minecraft

steady moon
#

is this good naming i just searched who made the first ever netherite beacon

#

it gives 600 XP as rewards idk

#

cause its hard

#

when i add advancements i make sure its doable in survival hardcore like dont make advancements bad like "get killed"

#

still havent gotten the actual predicate yet so it happens when i get a full powered beacon

#
{
  "display": {
    "icon": {
      "id": "minecraft:netherite_block",
      "count": 1
    },
    "title": "Created by iJevin",
    "description": "Construct a full Netherite Beacon",
    "frame": "challenge",
    "show_toast": true,
    "announce_to_chat": true,
    "hidden": true
  },
  "parent": "minecraft:nether/create_full_beacon",
  "criteria": {
    "Create_Beacon": {
      "trigger": "minecraft:construct_beacon",
      "conditions": {
        "level": 4
      }
    }
  },
  "rewards": {
    "loot": [],
    "experience": 600
  },
  "sends_telemetry_event": true
}
crimson nebula
#

you mean the requirements?

bronze sparrow
steady moon
#

I mean I don't know how to add the thing u guys said where I need to check for each level if it has netherite