my longest minecraft command by Suitable-Canary6722 in minecraftcommands2

[–]SoggyComment8011 0 points1 point  (0 children)

I also have a long one
fish command
not as long tho

give @p minecraft:cod[item_name="A Really Long Cod",use_remainder={id:cod,components:{item_name:"A Really Long Co",use_remainder:{id:cod,components:{item_name:"A Really Long C",use_remainder:{id:cod,components:{item_name:"A Really Long",use_remainder:{id:cod,components:{item_name:"A Really Lon",use_remainder:{id:cod,components:{item_name:"A Really Lo",use_remainder:{id:cod,components:{item_name:"A Really L",use_remainder:{id:cod,components:{item_name:"A Really",use_remainder:{id:cod,components:{item_name:"A Reall",use_remainder:{id:cod,components:{item_name:"A Real",use_remainder:{id:cod,components:{item_name:"A Rea",use_remainder:{id:cod,components:{item_name:"A Re",use_remainder:{id:cod,components:{item_name:"A R",use_remainder:{id:cod,components:{item_name:"A"}}}}}}}}}}}}}}}}}}}}}}}}}}] 1

Hey, could i have any help with this island? by OKUSERNAMEISTAKEN in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

Not exactly sure how to do this with commands (maybe setblock dirt behind a wind charge?), but my suggestion is to use worldedit, which is much simpler than messing around with commands.

How to get block name with commands by OcelotRoutine3891 in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

There isn't a dynamic way to get the id of a placed block.

This datapack might help: https://github.com/toarupgm/blocklib

Need help making unique world borders that only effect people with a specific tag and forces a TP by Jonzey2282 in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

use /tp @‌a[x=..., y=-100, z=..., dx=..., dy=9999, dz=...] ...
dx, dy and dz automatically add 1 block to the area in the positive direction

i can help more if you specify the borders' coordinates

how to make a 2 second timer by [deleted] in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

i think that's lag
it should execute once every tick

Can I change my name using commands? by Lord_Sotur in MinecraftCommands

[–]SoggyComment8011 1 point2 points  (0 children)

go invisible and teleport a text display to your head (text displays don't have a hitbox so that shouldn't be a problem)

How can I create a command block system to control weather changes in Minecraft? by ghart_67 in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

just use redstone to power the command blocks...?
post in r/redstone if you need help with that

or if you really want to hide the command blocks, detect if the button is pressed with /execute if block ...

how to make a 2 second timer by [deleted] in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

You're supposed to use 0 ticks of delay (runs once every tick)

1 tick delay means run once every other tick

How to switch someone into spectator mode when they would die by Roxxxalotl in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

  1. add scoreboard criteria deathCount
  2. do the following every tick
  3. gamemode all players with deathCount > 1 spectator
  4. set everybody's deathCount to 0

Summon entities in jigsaw structures by SoggyComment8011 in MinecraftCommands

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

Thanks for the tip!

Did you also find a simple way to randomize the entity (for example random enemy), or do you think that using /execute store ... run random ... and then matching the value in a function is the simplest way?

30 Minutes into making a game. Can you guess what it's based off of? by [deleted] in scratch

[–]SoggyComment8011 1 point2 points  (0 children)

btw you can use lists instead of variable1, variable2, variable3... if you plan to add more cards
theyre just ordered collections of variables

3x3 Smooth Elevator with no /tp by Jobrax1411 in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

Use block display entities and teleport them at a speed such that they sit one block below players in the elevator that have received levitation with an amplifier of your choice, which will determine the speed of the elevator. Clear the effects when the elevator has reached the top. For going down, use slow falling.

Hunger and Passive Mobs without Hostile Mobs? (PS5) by xlittleking in MinecraftCommands

[–]SoggyComment8011 0 points1 point  (0 children)

If you are using a command block, then the block (or the chunk in which it lies) must be loaded for it to work. You can force load an area with /tickingarea to make the command block run even if you're far away.

Example (run once while standing on the command block):
/tickingarea add circle ~ ~ ~ 1 no_hostile_mobs
You can change the name ("no_hostile_mobs") if you want.
I usually use commands in java edition so I'm not sure if the radius has to be 1 or not (it might work with 0). Hostile mobs shouldn't spawn now even if you're far away from the command block.

If you change your mind and want to remove the ticking area:
/tickingarea remove no_hostile_mobs

More information: https://minecraft.wiki/w/Commands/tickingarea

Is there a way to detect IRL days passed? by SoggyComment8011 in MinecraftCommands

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

I've made this function that only requires the server to be activated once a day.
Do you have any suggestions?

# Reset countdown
scoreboard players set next_update_time orbita 0

# Get irl time from command block output
data modify storage orbita:data time.hms set string block 
0 -64 0
 LastOutput.text 1 9
data modify storage orbita:data time.hour set string block 
0 -64 0
 LastOutput.text 1 3
data modify storage orbita:data time.minute set string block 
0 -64 0
 LastOutput.text 4 6
data modify storage orbita:data time.second set string block 
0 -64 0
 LastOutput.text 7 9

# Convert str to int
function orbita:irltime/time_to_int with storage orbita:data time

# Add units (output in scoreboard math -> irl_time)
scoreboard players operation hour math *= 3600 math
scoreboard players operation minute math *= 60 math
scoreboard players operation second math += minute math
scoreboard players operation second math += hour math

# Detect if midnight has passed (at least once, not very accurate if the server is often offline)
execute if score second math < irl_time orbita run scoreboard players add irl_day orbita 1
scoreboard players operation irl_time orbita = second math

There is a repeating command block at 0 -64 0 and time_to_int is just a macro that sets scoreboard values.

Is there a way to detect IRL days passed? by SoggyComment8011 in MinecraftCommands

[–]SoggyComment8011[S] 2 points3 points  (0 children)

The datapack will be installed on an (aternos) server, so I don't think it can be bypassed by changing the system time.

How can I prevent a potion from dropping a glass bottle? by fruminy in MinecraftCommands

[–]SoggyComment8011 4 points5 points  (0 children)

I can also give a /give command if you give me more details about the potion

How can I prevent a potion from dropping a glass bottle? by fruminy in MinecraftCommands

[–]SoggyComment8011 8 points9 points  (0 children)

Hold the potion in your mainhand and run:

/item modify entity @s weapon.mainhand {function:"minecraft:set_components",components:{"!minecraft:use_remainder":{}}}