Starting July 30th, you will no longer be able to log in to a Curse account that was not merged with a Twitch account. If you have not yet merged your Curse account with a Twitch account, please do so here! Otherwise, your account and its content will be inaccessible.
Dismiss
  • 0

    posted a message on /testfor substitute for 17w45b

    I used to use this command to make a command block power a comparator, and x,y,z is the location of the command block you want to modify:


    blockdata x y z {SuccessCount:1}


    It worked before 1.13, so I tried using this command to do the same thing in this snapshot:


    data merge block x y z {SuccessCount:1}


    It didn't work, but it may be a bug... If you do a 'data get' command on the same block, you'll see that 'SuccessCount' has indeed been set, but it's still not powering the comparator. Also, if you put a command block on the opposite side of the command block where the comparator is located, then the comparator will trigger 'on' if SuccessCount has a value, and will trigger 'off' if SuccessCount is zero (I don't think the block state is getting updated after the 'SuccessCount' value is changed).


    But it's still an early build, so this stuff is to be expected. I definitely like where this update is going because it's going to make command-driven vanilla mods a lot easier to do!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on /testfor substitute for 17w45b

    Hey, that works pretty good, thanks! I didn't think to put the 'nbt=...' before the nbt value. Anyway, I'm using it to set a scoreboard variable bTreasureMap, and if the player is holding it then that variable is '1' (if not holding the map then it's '0'). Then I use another execute command that tests whether bTreasureMap has a value in it, by comparing it with the scoreboard variable of a dummy player bFakeDude called 'bNull' which is always set to zero, like this:


    execute if score @p bTreasureMap > bFakeDude bNull run (insert another execute command here)


    I'm still hoping Dinnerbone allows the use of constants with this command, because "execute if score @p bTreasureMap > 0 run ..." makes more sense.


    I read your other post and I'm not sure what you're trying to do, so I'm not sure how to help. What are you testing for? What are you doing if the result is true or false? If I had more info then I could try to offer suggestions (but my knowledge of these new commands is pretty limited).

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on /testfor substitute for 17w45b

    I can do this in earlier versions of Minecraft with the 'testfor' command, but I can't figure it out in the snapshot 17w45b... How do I test for a player who's holding a piece of paper in their offhand that has an enchantment and a name? The name is "Treasure Map" and the enchantment is Fortune 1.


    Thanks in advance for the help!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Function doesn't work in 17w45a

    Thanks for the reply... Turned out I had the function in 'data/functions' (which doesn't work in 17w45a), so I moved the function into 'datapacks\TestDataPack\data\mctest\functions' then executed the function like "/function mctest:myfunction" and that worked. Almost...


    If the command in the function was simply "say Hi", then the function worked just fine. But if the command in the function was "execute as @p run say Hi" or "execute run say Hi" then the result was 'java.lang.NullPointerException'. The game didn't crash, it just showed that error string where the text for the function would have appeared.


    Maybe the new command system hasn't been ported to functions?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Function doesn't work in 17w45a

    Got a function that works just fine in 1.12, but I can't get any function to work in the latest snapshot.


    In 1.12 I had a command that I wanted to execute:


    say Hi


    I put that into a file named myfunction.mcfunction and put that file into world112/data/functions/stupid. In Minecraft, I typed '/function stupid:myfunction' in chat and the function worked just fine.


    But it doesn't work in the latest snapshot 17w45a... I have the command that I want to execute:


    execute run say Hi


    and I stuck it in a file named myfunction.mcfunction. I then put that file in world17w45a/data/functions/stupid. Finally, in Minecraft, I did '/function stupid:myfunction' and all that happens is "Unknown function: stupid:myfunction".


    Did something change? Do I need to put the function somewhere else? I just can't get the darned thing to work, any help would be appreciated, thanks!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Function from a command block question

    Thanks for the suggestions.


    I played around with your ideas and couldn't hash out the code to get it to work in a mcfunction. I don't think it's possible yet, because the commands currently don't seem to be tailored around external function files.


    But it looks like 1.13 will make that possible, here's the projected command copied from Dinnerbone's github:


    execute store result <name: entity> <objective: string> -> execute


    Yep, store the result of the 'execute' into a scoreboard variable. Boom shakalaka baybee, problem solved. That previous sentence is poorly worded and probably shouldn't be spoken by anyone. Anyway, I'm gonna wait until 1.13 before I try this. Thanks for the suggestions!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Function from a command block question

    Sort of a broad topic for a thread, sorry about that but I didn't know how to word the title. Anyway, I'm trying to figure out how to turn this situation into a function:


    Type this into the command block:

    execute @a ~ ~ ~ clone ~-1 ~-5 ~2 ~1 ~5 ~6 ~-1 ~-5 ~2 filtered force minecraft:diamond_ore


    Then, stand on top of that same command block and enter this into chat:

    /stats block ~ ~-1 ~ set AffectedBlocks @a dDiaNum


    So, when the command within the command block is executed, its numeric result is put into the score 'dDiaNum'.


    Here's my question... How do I word that to get it to work in a .mcfunction file?


    Thanks in advance for the help!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Teleport Specific Entities question

    Cool, thanks for the info!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Teleport Specific Entities question

    Sorry if this isn't the correct forum, I couldn't find any forum that best matched my question. Anyway, here's my command in question...


    /execute @e[type=llama,r=256] {Tame:1b} ~ ~ ~ tp @e[type=llama,r=1] -1916 72 -1059


    What I'm trying to do is teleport my tamed llamas to the coords -1916 72 -1059. The above code gives me an error when I use it; however, if I take out the {Tame:1b} then I'll teleport all llamas within that 256-block radius. I only want to teleport my tamed llamas. Can someone help me to tweak the above command to get it to work? Thanks in advance for the help!

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on New 1.11 Cartographer Question?

    Farmers, fletchers and shepherds all have the same cloak (brown with no apron), so I imagine cartographers will share librarian traits and also have a white tunic. But I don't think they're just going to drop into the towns of your Realms world that you've already explored, they'll only appear in new villages in unexplored areas (or they may appear when you breed villagers). Same for the Woodland Mansions, they'll most likely appear in wooded areas that you haven't yet explored.


    I guess the 20-dollar question is this: Will cartographer maps point to areas in pre-1.11 worlds where a Woodland Mansion would have spawned if that area hadn't already been explored? It would be a rip-off to get a treasure map that points to your old cow barn, lol.

    Posted in: Recent Updates and Snapshots
  • 0

    posted a message on Can't play MineCraft 1.10+

    Does Minecraft 1.10 crash when playing multiplayer AND singleplayer games, or does Minecraft 1.10 work fine in singleplayer but crashes in multiplayer?

    Posted in: Java Edition Support
  • 0

    posted a message on Command Block Multiplayer help

    Heeey, that's pretty slick. Thanks for the info nigathan! I went the route of the 'tags' since I've never used those before, and they did just the trick. Thanks again for the help, and sorry about the late reply.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Command Block Multiplayer help

    Hello! I'm having multiplayer problems with this command block contraption. Here's the command block thing I'm trying to do...

    First, I made a scoreboard objective:

    /scoreboard objectives add dDiaMap


    Second, I made a command block with this command in it:

    testfor @a {Inventory:[{Slot:-106b,id:"minecraft:paper",tag:{display:{Name:"Diamond Map"}}}]}


    Third, I set the SuccessCount stat on the command block by standing on top of it and executing this:

    /stats block ~ ~-1 ~ set SuccessCount @a dDiaMap


    Finally, I put a button on the command block. That's the contraption; what it's supposed to do is set a player's 'dDiaMap' to something besides '0' if that player is holding the Diamond Map in his or her offhand.


    Here's what it does in singleplayer...


    I pressed the button while I'm holding the Diamond Map in my offhand, and 'dDiaMap' will equal '1'. I found this out by executing the following command, and the result was '1':

    /scoreboard players add <playername> dDiaMap 0


    If I took the Diamond Map out of my offhand and pressed the button, 'dDiaMap' was '0'. So it worked fine in singleplayer.


    Now, when I opened my world to LAN and let my wife join it, here's what the command block contraption does in multiplayer...


    Press the button while I'm holding the Diamond Map in my offhand, and 'dDiaMap' will equal '0'. If my wife held the Diamond Map in her offhand, 'dDiaMap' was '0' for her too. When my wife left the game, my command block contraption went back to working fine as if I was playing in 'singleplayer' again.


    Is there something that needs to be done differently to make this work in multiplayer? Thanks in advance for the help!


    EDIT: Here's the diamond map item I'm referring to, sorry I forgot to add that to my post:


    /give @p minecraft:paper 1 0 {display:{Name:"Diamond Map"}}

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Made a Railgun, want it to function

    The explosion and hugeExplosion effects are sort of tricky, because if you're too far away from the effect then you won't see it at all... If you cannot see the explosion effect unless you're close to the tip of the gun, then you might need to try something different or skip the explosion effect.

    Fireworks can be seen from really far away though, so that might be an option with your gun:

    summon FireworksRocketEntity x y z {Life:0,LifeTime:0,FireworksItem:{id:fireworks,tag:{Fireworks:{Flight:2,Explosions:[{Flicker:1,Type:1,Colors:[16711680,255]}]}}}}

    Like all my other examples, x y z is the location of the tip of your gun. You can tweak the above code to work with your gun (change the color and size of the explosion, change the effects, etc). I don't know much about fireworks entities, so you're on your own as far as customization goes (I found this code on the 'net and tweaked it to blow up instantly instead of firing a rocket into the air first).

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Made a Railgun, want it to function

    I put a bunch of torches where the 'FallingSand' entites landed, and the torches broke the falling sand entities into items (sort of like when you put a torch down before digging straight up, so the torch breaks the falling sand or gravel before it suffocates you)... There's probably a fancier way to do that though.

    Posted in: Redstone Discussion and Mechanisms
  • To post a comment, please or register a new account.