• 0

    posted a message on how to make a command block say the nearest object in 12.2

    I just gave you all you need to do it :'0


    Why don't you try to search a little by yourself?

    Maybe it' s condescendant, but if you don't look by yourself, you will not progress!


    Well, maybe you don't know how to use the generator.

    Why you search to have require to use "selector" which means it gonna write the name of what you have inside, in your case "@e[sort=nearest,limit=1]


    So you put it in the generator and it give you the answer :


    /tellraw @p ["",{"selector":"@e[limit=1,sort=nearest]"}]
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on how to make a command block say the nearest object in 12.2

    You have to use the tellraw function. Type "tellraw generator"on Google, you will find what you search ;)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Summoning items (iron ingot, or gold ingot) when pressing a button? (please help)

    Hello !


    You can do that with the summon command, like this :


    summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:coal",Count:1b}}
    
    
    If you want, you can even add enchantments, you can do that the item don't dispawn, I let you search about NBT if you want to do that :)
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on give effects when someone spawns

    For the first command, you just need to activate it once, so either you type it in you chat, or you put a command block on Impulse, inconditionnal and with Redstone and activate it with a button.


    The second one has to be placed in a command block on repeat, inconditionnal and always active.


    If you want for exemple give absorption 4 for 10sec to a player who just died, you write in your command block :


    execute as @a if score @s time matches 1 run effect give @s minecraft:absorption 10 4

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Prevent Specific Item Placement.

    Well, you can just do a datapack with customData on diamond (or anything you cannot place, it's not important) , so you can have a diamond with different texture if it has this CustomData.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Possible? 3 levers w/ 3 repeaters, via one redstone path to 3 different outputs?

    Yes you're right, if you turn on the left lever before the right ones, it will not work and only one lamp will work. The best way to have the lamp you one with this setup is to switch off all, and to switch on right to left, I think a better setup can be found for this, it was just to give an idea of how it can work :)

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on Prevent Specific Item Placement.

    Well, you can't say "this item can't be placed" if you're not in adventure mode, but a thing you can do is :


    1) store the number of dead bush the player has placed

    2) detect if there is a dead bush on the map and if there is, search for the player who has placed it, with the score stored, to refund the bush

    3) replace the dead bush to air. I think you can do it by checking where the player look.


    I cannot do the commands for now, if you're good with command blocks, try to do that, if not, I will try to do that later today :)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Command Block: Direction Storage

    Well, I know you can do like summon ^ ^ ^ or something like this but this is the most simple solution here, he have a bow who shot arrow at first place, and he can choose if he want to shoot with more or less power.


    Or am I missing something ? :D

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to make two commands in sign

    J'apprend avec les meilleurs <3

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Command Block: Direction Storage

    Hello ! To do it simply, you have to put three command block :


    1) "execute as @e[type=minecraft:arrow] at @s run summon minecraft:trident ~ ~ ~" with the command block on repeat, unconditionnal, always active


    2) "execute as @e[type=trident] run data modify entity @s Motion set from entity @e[type=arrow,limit=1,sort=nearest] Motion" on Chain, conditionnal, always active


    3) "kill @e[type=minecraft:arrow]" OnChain, conditionnal, always active.


    The first command spawn a trident where was an arrow, second change the motion of the trident with the motion of the arrow, third kill the arrow.

    If you don't want skeleton to shoot trident as well, you will have to add commands block, tell me if you want.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Making an animal respawn after it is killed

    Well, if it move, you can just spawn an armorstand invincible who follow the animal, and when he die, you spawn a new one at the armor stand's place


    here the commands :


    summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,Tags:["target"]}
    
    execute unless entity @e[limit=1,type=cow,tag=target] at @e[type=minecraft:armor_stand,tag=target,limit=1] run summon minecraft:cow ~ ~ ~ {Tags:["target"]}
    
    tp @e[type=minecraft:armor_stand,tag=target] @e[type=cow,limit=1,tag=target]
    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on give effects when someone spawns

    Hello, if you want to do that, you have to create a scoreboard that will store the time until last die. When this score matches 1, it means players have resurected, and you can give it potion effect. Here the code :


    scoreboard players add @a time minecraft.custom:minecraft.time_since_death
    
    execute as @a if score @s time matches 1 run effect give @s [potion effect you want]
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Add block in a shulker inside an enderchest with command block

    J'ai enfin trouvé une solution pour ce système de quêtes !

    Chaque joueur va avoir un espace dédié (c'était prévu à la base), mais j'avais pas vraiment moyen de trouver cet endroit sans les y tp et du coup perdre leur position initiale.


    Mais j'ai un peu augmenté mes connaissances et j'ai trouvé la solution ! On peut enregistrer la position du joueur dans un score, et donc enregistrer la position de leur coin dédié ! À l'intérieur se trouvera un coffre caché avec un objet qui aura des tags pour savoir quel quête il a, etc, et quand je veux modifier cet objet, je n'aurai qu'à summon un armorstand auquel je changerai sa position en utilisant un /execute store result @e Pos


    Et ainsi avoir la position de ce coffre !

    J'aurai au préalable donné les information que je veux modifier à l'armorstand.


    Quand il a fini, je le détruit, comme ça, j'ai pas des armorstand qui traîne de partout, les joueurs qui ne jouent plus n'ont pas d'armorstand, et je me fais plus chier à summon des coffres qui risquent de créer des bugs.


    Eh beh j'aurai mis du temps à la trouver la solution ! J'en apprend tous les jours sur les command block héhé.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Minecraft functions file structure 1.15.2

    Oh I know! Maybe you don't have pack.mcmeta !

    Saves\world_name\datapacks\your_datapack\pack.mcmeta


    And within you have


    {

    "pack": {

    "pack_format": 5,

    "description": "description"

    }

    }

    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please .