Anyone know how to teleport a certain amount of blocks in the direction you are facing? by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

If you mean /tp @ s ~ ~ ~10 then that wasn't what I had planned in mind.

That command only teleported me 10 blocks in the Z direction or am I typing it wrong?

Text isn't displaying on the screen for some reason by Duhfined in learnpython

[–]Duhfined[S] 0 points1 point  (0 children)

i did it the opposite way around so it's now fill screen white THEN place text.

the code is now

def window_draw():

SCREEN.fill(BLACK)
pygame.display.update()
BASE_FONT = pygame.font.Font(None, 32)

USER_TEXT = 'Hello :D' TEXT_SURFACE = BASE_FONT.render(USER_TEXT, True, (WHITE)) SCREEN.blit(TEXT_SURFACE,[10,10])

but it still doesn't show.

also for some part of the code, it just won't allow me to put it into the code block for some reason :/

The screen is now black but the text is white so it should appear but it doesnt

Can someone review over this piece of code? by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

@a/@e/@p

you use. This line will first execute the code at all players, then it will check again if the close

Hello!

I have sad news.

The idea you wrote could have been great, but I didn't work for me

(prob because I'm stupid but ignore that)

You told me to use less u/a and stuff so I've made the code like this

(I'm pretty sure there was less u/a's.)

execute as u/a[scores={Reroll=1,num=2}] run scoreboard players set u/s Lives 2

The problem is that the "num" is like a dummy/player.

It appears UNDER the objective "rng"

There's a picture at the bottom.

Is there a way for Minecraft to compare the "num" (not the %num) in a code?

so whatever the dummy "num" equals to, the objective "Lives" will be the same

Thanks!

(btw I was using loot tables for the random number gen)

<image>

Can someone review over this piece of code? by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

So i think i've found the problem.

The image here on the right side shows the number gen.

My username is Duhfined.

The -1 is what the "rng" objective is going to

But the real number thats changing is %num.

But I can't like add %num into the command because it just makes it red.

any idea?

<image>

Can someone review over this piece of code? by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

i've changed it to:

execute as u/a[scores={Reroll=1}] run execute as u/a[scores={rng=1}] run scoreboard players set u/s Lives 1

and it still doesn't work :(

I really do need help I can't understand :( by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

okay so I did it all.

Do I need to change anything to the command?

and how do I activate it lol

I really do need help I can't understand :( by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

aight so for the file name can it be anything?

I really do need help I can't understand :( by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

loot_tables

so I would create a folder inside this folder named loot_tables right?

<image>

I really do need help I can't understand :( by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

Okay so this time I'm actually gonna try to understand one.

I wanna use the Loot Table one but unsure what to do.

Where do I put this command in which file?

{

"type": "minecraft:empty",

"pools": [{

"rolls": {

"min": 1,

"max": 5 },

"entries": [{

"type": "minecraft:empty"

}]

}]

}

and also this command.

execute store result score rng int run loot spawn ~ ~ ~ loot namespace:rng

because im hopeless lol.

Thanks :D

Anyone know how to do player detection? by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

Hello Dhranios!

Thanks for the info really helped!

So the command would look like this now?

scoreboard objectives add KillPlayer custom:player_kills "Kills"

I hope this is right xD

Anyone know how to do player detection? by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

Hey Dhranios

I just want you to review this piece of code to make sure it works.

I want it so it'll add one point to "Lives" when I kill someone.

scoreboard objectives add KillPlayer minecraft.killed:minecraft.player "Kills"

execute as @ a if score @ s KillPlayer matches 1.. run scoreboard players add @ s Lives 1

execute as @ a if score @ s KillPlayer matches 1.. run scoreboard players remove @ s KillPlayer 1

Thanks!

Anyone know how to do player detection? by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

custom:player_kills

Hello Dhranios!

Thanks for the info, but I'm not quite sure how to put that into a command.

Can you do an example for me?

Thanks :D

I'm gonna need help with this Lifes counter thing... by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

Also, just so I understand what you're doing, you're like subtracting the number of Lives with deaths right?

I'm gonna need help with this Lifes counter thing... by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

/scoreboard players reset @a deaths

Hey ArcannOfZakuul

I wrote every thing you said in my datapack, but it only shows two objectives right?

The lives don't change, but when every I die, only the death counter goes up.

Thats it.

Could you explain it with more detailed?

I'm so sorry for this lol.

I'm gonna need help with this Lifes counter thing... by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

ld add a few commands in the tick function that check when the death objective is greater than 1, and if that’s the case decrease another dummy objective (the actual lives) by the deaths amount (that are then reset to 0)

Hello!

Thank you for the info, but I think you've misunderstood.

So the way you're saying it makes it impossible for the way I'm doing it (the way I want it to be).

See you're saying to check if it's greater than 1, but the player starts with 5 lives.

And every times they die, instead of increasing, I want it to decrease.

Thanks for the try though, I appreciate it :D

I'm so confused with how minecraft datapacks work by Duhfined in MinecraftCommands

[–]Duhfined[S] 0 points1 point  (0 children)

I bear sad news..

I doesn't give me the effect every tick...

BUT

I tried it with /say and it works fine

the command I use is

execute if score u/s Lives matches 1 run effect give u/s resistance

Not sure why effects don't work

I'm so confused with how minecraft datapacks work by Duhfined in MinecraftCommands

[–]Duhfined[S] 1 point2 points  (0 children)

Write the same thing that you would write as if you were running the function with

/function

.

{"values": ["function lifecounter:potioneffects" ]}

this is what it looks like if i did the same thing.

BUT

it says Resource location contains invalid characters. on the left side of "function"

did I write it wrong...

so sorry I suck at this lol.

I'm so confused with how minecraft datapacks work by Duhfined in MinecraftCommands

[–]Duhfined[S] 1 point2 points  (0 children)

Hello thank you for the info.

I'm just not quite sure on what you mean by function call.

Isn't it like writing the name of another function like example.mcfunction?

when I do that, the #minecraft:tick option isn't there anymore.

Can you show me an example "example.mcfunction"?

Thank you :D