• 0

    posted a message on potion effects while holding an item[SOLVED]
    Quote from zaldatil»

    is there a way to integrate the tag into the netherite pick this villager sells?

    /summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:2,type:plains},Offers:{Recipes:[{buy:{id:acacia_boat,Count:1},sell:{id:netherite_pickaxe,Count:1,tag:{display:{Name:"\"test\"",Lore:["\"test\""]},Enchantments:[{id:unbreaking,lvl:1},{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999}]}}


    is there a way to add that tag to the netherite pick this villager sells?


    /summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:2,type:plains},Offers:{Recipes:[{buy:{id:acacia_boat,Count:1},sell:{id:netherite_pickaxe,Count:1,tag:{display:{Name:"\"test\"",Lore:["\"test\""]},Enchantments:[{id:unbreaking,lvl:1},{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999}]}}


    (sorry if i posted this twice im new here and didnt know if it acualy posted)


    (look at the villager)

    /data merge entity (press tab, lot's of characters will appear, an uuid) {VillagerData:{profession:farmer,level:2,type:plains},Offers:{Recipes:[{buy:{id:acacia_boat,Count:1},sell:{id:netherite_pickaxe,Count:1,tag:{yourspecialtag:1b,display:{Name:"\"test\"",Lore:["\"test\""]},Enchantments:[{id:unbreaking,lvl:1},{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999}]}}

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Questions about villagers

    As a server owner, Villagers are terrible for performance, although I don't go to the extent of disabling hostile AI (I lowered the spawn range and ammount, in a way to keep the same density but nearer to the player).

    Also made a datapack myself that disables diamond tier Villagers AI for 5 minutes but activates it in the last 10 seconds to allow restocking. Before that, Villagers were responsible for 14% of the lag over all the other things, including chunk loading and other plugins.

    I can assure you realms would be even worse in terms of performance.


    About the protection, do you know which plugin do they use? Search the command in google, I.E /claimchunk claim, /chunk claim /claimland, /protect, click with a golden shovel, etc.

    You will find the plugin and its documentation/wiki, search if it's possible to enable mob-griefing or something similar.


    But if they used the mobgriefing false gamerule, there is nothing much to do, more than ask the admins, depending on their response (They tell you exactly why, or they tell you to shut up) I wouldn't play on that server.

    Posted in: Survival Mode
  • 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
  • To post a comment, please .