• 0

    posted a message on mcfunction not executing commands in order
    So I was just missing that the summoning of the armor stand needed to be with respect to my position. Perfect!
    Quote from eglaios»
    ould take a bit of time to become familiar with functions mechanics, but if you're ready for the next step, there's a way to make a "for" loop using functions.
    Here's a bit how it would look :one-time
    FOR loop function-Increase $Times' Time score by 1-Summon new armor stand under player-Copy $Times' Time score into [new armor stand]'s Time score-Teleport player 1 block forward-If $Times' Times score < 61 then run function again-Set $Times' Time score to 0 (reset)
    This can all be done using commands, and the result will be a line of armor stands having a score from 1 to 60, in order.
    Using scores will also avoid harcoding each different entity. If you are not happy with scores, you can even store the values into armor stand's data
    Now that's awesome! But some things require names. Actually, probably not, but since one of the functions has 1800 commands that will be executed in a single, probably longer, tick, I think running them with set names will be easier on the TPS
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on mcfunction not executing commands in order

    I'm new to mcfunctions and have already done some simple ones.

    but this one has got me:

    I want the function to summon an armor stand with certain name bellow me, then tp me forward and then place another, and then tp.

    But it's tp-ing me to the end but all the armor stands get placed only under the block where i executed the function


    This is the function:


    summon armor_stand ~ ~-1 ~ {Invisible:1b,NoBasePlate:1b,Small:1b,CustomName:"{\"text\":\"x30\"}"}
    execute at ElTodoFull run tp @p ~1 ~ ~

    ...

    (it's copied 61 times with a different name for the armor stand)

    ...


    I generated the function with python, but since it's executing the tp and the summoning correctly, it's not a python problem, but it seems like it doesn't execute them in order.

    Python code:

    for i in range(30,-31,-1):

    | print(r"summon armor_stand ~ ~-1 ~ {Invisible:1b,NoBasePlate:1b,Small:1b,CustomName:%s%s%s}"%(com,a,com))
    | print("execute at ElTodoFull run tp @p ~1 ~ ~")


    How can i make the function so it executes them in order? It's too many different names to do it by hand, command by command.


    Edit I still want to know why the commands are not executed in order, but I "found" a workaround by hardcoding the coordinates where they are spawned

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on DeathCount scoreboard only in nether

    Thank you! that actually worked. Took me longer as I needed it for something quite different, but that gave me the basis.


    It's also possible to check in what dimension the player is in by adding nbt={Dimension:"minecraft:DIMENSION"} in the selector. But I don't know if checking NBT data is more expensive in terms of performance.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on DeathCount scoreboard only in nether

    Is it possible to setup a DeatCount scoreboard that only counts deaths that happen in the nether? (and won't count deaths that happen in other dimensions)

    Thanks in advance!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [Solved] Detect specific item (with lore) in inventory and give effect

    Actually, item tags look more appealing. I might investigate them later.

    Thank you!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [Solved] Detect specific item (with lore) in inventory and give effect
    Quote from dalor_homer»

    Why do you write "minecraft:execute"?

    You just have to write "/execute"

    :)




    Requiered for servers with essentials, but thanks!

    Quote from eglaios»

    Maybe "minecraft.execute" is some server syntax or whatever?

    If it is so, you might have to write "minecraft:effect" instead of "effect" as well...


    Anyway the best for this is to set a custom item tag.


    For example, Helmet /give command (commands there are from vanilla solo) :

    give @p minecraft:iron_helmet{Item:"night_vision_helmet",display:{#}}





    Then you can simply look only for the custom tag in specific slot (Item:"night_vision_helmet"). This way, you don't have to look at other tags like "Lore" (By the way, I'd say your 2 commands don't have the exact same "Lore" tag as your helmet, this might be the issue)

    effect give @a[nbt={Inventory:[{Slot:103b,tag:{Item:"night_vision_helmet"}}]}]






    Beside that, I am not sure about your execute command :

    execute at @[wearing helmet] run effect give ElTodoFull





    This command means "if anyone is wearing the helmet, give effect to ElTodoFull, no matter who is wearing"

    For my example command, I simply used :

    effect give @[wearing helmet]





    So only those wearing it get night vision




    I put my neame there just for testing. I got it to work! My command was good, but it was missing a single period at the end of the lore. Oh the headaches that that period caused! This command works:

    /minecraft:execute at @a[nbt={Inventory:[{Slot:103b,id:"minecraft:golden_helmet",tag:{display:{Lore:['{"extra":[{"text":"Permite ver en la oscuridad."}],"text":""}']}}}]}] run effect give @p minecraft:night_vision 12 0 true

    I even recolored the parts to modify in yellow so people who want to do the same can do it more easily, the slot is where in the inventory the item is.

    I decided for it to detect the lore, as players in my server can actually rename their items, and even color them. They can't edit lores.


    Thanks anyways!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [Solved] Detect specific item (with lore) in inventory and give effect

    I'm trying to make a night vision helmet but everything I've tried doesnt work

    Here are my attempts.



    /minecraft:execute at @p[nbt={Inventory:[{Slot:103b,id:"minecraft:iron_helmet",tag:{display:{Lore:["\"Permite ver en la oscuridad.\""]}}}]}] run effect give ElTodoFull minecraft:night_vision 10 10

    /minecraft:execute at @p[nbt={Inventory:[{Slot:103b,id:"minecraft:iron_helmet",tag:{display:{Lore:['{"text":"Permite ver en la oscuridad.","color":"light_purple"}']}}}]}] run effect give ElTodoFull minecraft:night_vision 10 10

    When I execute the command nothing happens, no return in console, output in command blocks, nor errors.

    I made sure to balance the brackets, to use the correct slot (helmet) and to give me the item with the NBT tag, but nothing has worked so far.

    I'd really appreciate some help.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Scoreboard Elo system

    I need help with an ELO system.

    I have some experience with scoreboards and have advanced on creting the scoreboard that counts the kill and adds a point

    But in addition to the kill, When a player kills another one, they get 10% of the points of the player they killed


    I'm guessing this can be done with an execute that gets the points of the player they killed, multiplied by 0.1, and also multiplies the points of the dead player by 0.9.

    That's the thing that got me.


    Thanks in advance!

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Question regarding 4 way railway systems

    I think this could help!


    Posted in: Survival Mode
  • 0

    posted a message on Help with commands (If equivalent, execute, scoreboard for items)
    Quote from feasantics»

    I am sorry, but I found this subject to be much more interesting than I first thought. I put together a much more versatile command that I think you will prefer over the first reply I had made. Once again, we are using two repeating command blocks set to always active with the following commands:

    execute at @e[type=item,name="Coal"] if block ~ ~-1 ~ minecraft:stone if block ~ ~1 ~ minecraft:cobblestone run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:diamond",Count:1b}}



    execute as @e[type=item,name="Diamond"] at @s if entity @s if block ~ ~-1 ~ minecraft:stone if block ~ ~1 ~ minecraft:cobblestone run kill @e[type=item,limit=1,name="Coal"]

    These commands are much alike my previous ones, however, it will work relative to the dropped items position. This means that you are not limited to certain coordinates. The command is executing at the coordinates of the dropped Coal and searching for a block below and above the coal (Stone above and Cobblestone below). The things you will have to change in the commands are:


      • The @e selectors
        • You will have to change the "name=" of the item it is executing as. Be sure to use the actual listed name of the item! (Ex. Instead of "minecraft:experience_bottle" you have to use "Bottle O' Enchanting")
      • The block searches
        • You can specify any blocks for the above and below blocks by changing the minecraft:stone and minecraft:cobbestone. I have also tested to see if it works if both the above and below blocks were the same and it still works perfectly fine.

    I hope this reply is better than the first one I had posted, and I once again give my apologies for making multiple replies, but I am sure it was worth it for the better commands. Enjoy! (P.S. Your English is perfect as far as I can see)


    Thank you so much!
    It's exactly what I needed! Also, sorry for not responding, I thought I'd be getting notifications but they never came and I just checked to see.
    Quote from YMbrothers»


    Here's the correction you requested in your signature. : )


    1. /execute as @e[type=item,nbt={OnGround:1b},nbt=!{Item:{id:"minecraft:(type of item u summon)"}}] at @s if block ~ ~-1 ~ (block the item is on) if block ~ ~-2 ~ (another block) run summon item ~ ~ ~ {Item:{id:"minecraft:(type of item u summon)",Count:(number of item, if u don't give one, it won't summon)}}

    2. /execute as @e[type=item,nbt={OnGround:1b},nbt=!{Item:{id:"minecraft:(type of item u summon)"}}] at @s if block ~ ~-1 ~ (block the item is on) if block ~ ~-2 ~ (another block) run kill @s


    You know programming, so I don't need to explain.

    BUT, if you're trying to explain stuff to us using pseudo code, please indent. It's better for my/our brain.


    And yes, summon first before you kill.



    Edit: Looks like I'm too late ._. Screw that read-only maintenance...


    Thank you for the corrections, it really helps!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Custom world generation settings

    Remember when you were able to change the generation of the world?

    It's no longer available!


    I no longer have time to go explore and mining for too much time.


    Is there a mod that brings it back to 1.14?


    Thank you!

    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Help with commands (If equivalent, execute, scoreboard for items)

    I'm trying to make a datapack and i'm now practicing with command blocks.

    For it to work I'd need the following commands:

    I know programming so I will give the algorythm to see if you can help me.


    If dropped_item is on block and under another_block: (I believe it's made with executes and for that i'd need a scoreboard for the item?)

    kill item

    summon another_item (in the same coordinates) (It may be better to first execute the summon new_item at the item and then delete the old one?)


    Thank you!

    I'm pretty sure this will require repeating > chain > chain command blocks. But if your solution is better, I'd really apreciate it.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on An alternative to the locked chest block?

    I remember that leaves used to work for that.

    They shouldn't drop that much items.

    Posted in: Discussion
  • 0

    posted a message on I want to make a boss

    I see that the hardest thing would be that it changes size.

    You can search in google for "Minecraft mob summon generator" I recommend the one from "Minecraft Tools" but if it lacks something, you can try another one.

    In that page you will see a lot of very intuitive options and everything you say is there (Change health, potion effects, armor, different weapons, follow range, speed, etc...).

    The boss bar can be done with commands or datapacks that are pretty simple.


    But I think it's impossible to change its size without a mod. But what you could do to make it appear more scary is to, if it reaches certain health, spawn a new one but mounted over something like a creeper or an iron golem.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on So i want to set up a server for just me and another friend of mine,

    If you are not in the same wifi, your best option is to download the server.jar of the current version.

    I suggest using Hamachi to connect and open the server, it provides a virtual ip adress that you friend can access.

    You have to place the server.jar inside any empty folder and then open the server, it will close immediately but there will be a new file called EULA, open it and change it to True.

    Then open again the server and then, after it's done, close it.

    A new file appeared: server.properties. Open it and where it says ip, copy the ipv4 of your hamachi and paste it there.

    Finally save the file, open the server, make sure your friend conects to your hamachi network and provide hium with your ip.

    Done!

    Posted in: Server Support and Administration
  • To post a comment, please or register a new account.