All users will need to merge their Minecraft Forum account with a new or existing Twitch account starting October 23rd. You can merge your accounts by clicking here. Have questions? Learn more here.
Dismiss
  • 0

    posted a message on Lost my mc saves from 2011/12/13/14 Read please
    Quote from vztekly»

    Doesn't really matter, what matters is what caused this. And that is most likely Windows 10. You could try going over "recent copies" (right click on the main .minecraft folder, then check its properties and the recent files tab), but if that doesn't work then the only solution us using a backup. Which you apparently don't have.
    Posted in: Discussion
  • 1

    posted a message on Need help creating custom traders selling custom stuffs
    Quote from Blitzbeast»

    create a function with @s like :

    give @s wooden_sword 1 0 {display:{Name:"CustomName"}}



    or @p


    give @p wooden_sword 1 0 {display:{Name:"CustomName"}}


    Is one of them better ?


    It depends on the situation and the commands you're going to use. If you have a function which targets a specific player then generally speaking it's better to use @s. That's because @s target's a specific entity (player or mob); the one which is 'using' the function. As a result of that it also helps you to keep your functions usable on multiplayer environments.

    But as said, it heavily depends on context. If your function consists of '/give @s stuff' and you run this from a commandblock then this obviously won't work anymore. The target selector is the one running the function, but in this case that's the command block. So then it might be easier to use @p.

    However... This is why a commonly used method is to use: /execute @p ~ ~ ~ function mycode:give_stuff (in the commandblock), and then use @s in the function itself. This way you always remain in full control over who gets to do what but without having to change your functions every time. And as a bonus your commands will be easily usable in multiplayer environments.

    Which is why I always use @s in my functions and use /execute to target a specific entity.

    Another benefit is that applying such a methodology you also make sure that your functions remain independent of your levels. Which makes it easier to re-use them, which will become more important when 1.13 comes out.

    Hope this helps!
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on How would I go about setting up my server to receive donations?

    Might be easiest to get a Patreon account and then direct your players to that place.

    Posted in: Discussion
  • 0

    posted a message on Need help with the scoreboard tag

    The Minecraft wiki is a good place for this kind of info. If you check out the scoreboard page you'll find all you need.


    I think your best bet here is to use either a tag, but a team might also be useful.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Minecraft Community

    Just search around these forums, there have been dozens of threads about this already.


    But I guess you can summarize it with: "People moved on". Nothing lasts forever you know.

    Posted in: Discussion
  • 0

    posted a message on BUYCRAFT ERROR 404 PAGE NOT FOUND! HELP

    I have no idea what buycraft is supposed to be, but the only people who can fix this are the ones who run the website you're visiting.

    Posted in: Discussion
  • 0

    posted a message on Infinite Block in Adventure Mode

    What do you know... I stand corrected on my first post: this whole thing can easily be achieved in a function (so without any commandblocks)


    I was looking for a way to resolve the issue of players using the offhand, which is tricky because you'd need the command chain to fork a bit: so test if a player has slabs in his offhand and if so replace those, but if not continue with what I have above. Not easily done with command blocks but somewhat easily done with functions (more or less).

    Then the above hit me: my command structure already made this code independent :D


    So:

    Create a new directory in data/functions, I suggest something like "infslab". Then add 3 files:


    start.mcfunction

    scoreboard objectives add infslab stat.useItem.minecraft.wooden_slab
    scoreboard players reset @a infslab
    gamerule gameLoopFunction infslab:run


    stop.mcfunction

    gamerule gameLoopFunction -
    scoreboard objectives remove infslab


    And finally:


    run.mcfunction

    execute @a[score_infslab_min=1] ~ ~ ~ scoreboard players tag @s add slab
    execute @a[tag=slab] ~ ~ ~ replaceitem entity @s slot.weapon.mainhand wooden_slab
    execute @a[tag=slab] ~ ~ ~ scoreboard players set @s infslab 0
    execute @a[tag=slab] ~ ~ ~ scoreboard players tag @s remove slab


    And there you go. Infinite slabs, fully independent of any command block. But... with the small caveat that if players start placing slabs using their offhand then they'll be able to duplicate those slabs.


    I suppose you could counteract this by telling your players that they should only place those slabs using the offhand, then change the code above accordingly (change mainhand into offhand). It might even add an extra challenge because players would have to carefully read in order not to get stuck in your game.


    Food for thought?


    Sorry for the horrible layout above, I tried, but this forum editor is pretty much the worst there is and someone I seriously wonder why I even bother.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on T-Flip Flop in 17w49a -- It's broken.
    Quote from Ryan_Mak»

    It is confirmed to be re-added in the next snapshot. Check Grum's comment on

    https://bugs.mojang.com/browse/MC-122911


    Each to their own but I wouldn't call that a confirmation. Heck, even the mods and helpers (on Bugtrack) aren't even fully sure what Grum meant.
    Posted in: Recent Updates and Snapshots
  • 0

    posted a message on Brutalist/Industrial Office Complex

    Really nice build, some of those platforms remind me a bit of Oni levels (old video game). Anyway, what to do... I know it's probably a bit silly but I'd be tempted to load up some tech mods (RFTools, ActuallyAdditions, maybe even IndustrialCraft) and then use those "tech blocks" within your office / factory space. Of course that would seriously defy the vanilla aspect of the game, but... yah :)


    But I really enjoyed your build, thanks for sharing the pictures!

    Posted in: Creative Mode
  • 0

    posted a message on How do I close a Portal?

    Use water sent out from a dispenser to close the portal, use a flint and steel (within a dispenser) to re-open it.


    (edit) I attached a screenshot on how I sorted this out on my server / testworld. On the other side is a lever to turn this on/off, the right dispenser holds the flint/steel and the left one contains one water bucket. The lever is on the right side, 'behind' the sandstone with the redstone dust on it.

    Posted in: Survival Mode
  • 0

    posted a message on Infinite Block in Adventure Mode

    Sorry for a double post but the editor keeps stalling on me while trying to edit. I solved the glitch, but... it is a bit specific:


    RC: execute @a[score_infslab_min=1] ~ ~ ~ scoreboard players tag @s add slab

    CC: execute @a[tag=slab] ~ ~ ~ replaceitem entity @s slot.weapon.mainhand wooden_slab

    CC: execute @a[tag=slab] ~ ~ ~ scoreboard players set @s infslab 0

    CC: execute @a[tag=slab] ~ ~ ~ scoreboard players tag @s remove slab


    This should work all the time, even when the player has a full inventory somehow. Because the main hand will (as far as I can tell from mind) always be the hand which was just used to place the slab.


    (edit: obviously this will glitch when a player decides to use his offhand ;))

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Infinite Block in Adventure Mode

    Yups, there are some problems with the above commands. The idea is on the mark though.


    So start with:


    /scoreboard objectives add infslab stat.useItem.minecraft.wooden_slab


    RC = repeating command block, CC = chain command block, set to conditional. You need to chain them (but I assume you know how):


    (edit) this time without typoes :P


    RC: execute @a[score_infslab_min=1] ~ ~ ~ scoreboard players tag @s add slab

    CC: execute @a[tag=slab] ~ ~ ~ give @s wooden_slab 1

    CC: execute @a[tag=slab] ~ ~ ~ scoreboard players set @s infslab 0

    CC: execute @a[tag=slab] ~ ~ ~ scoreboard players tag @s remove slab


    The good news: this works, players can keep on slabbing.

    The bad news: it glitches, I end up with an inventory which seems empty while it actually contains a slab. Haven't tried this on my server though, only single player so far.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Need help creating custom traders selling custom stuffs

    Well, this is a perfect example why I never use generators. Generally speaking strict JSON means that everything needs to be inside quotes. Comparable to the title command which also uses that: /title title {"text":"Hello there!"}. Both 'text' (the property name) and its value need to be encased in quotes.


    The best way to get colored stuff in the game is to use functions, because there you can use § characters as long as you escape them with  (alt-0194), or use the 'UTF8 without BOM' file format. Which basically boils down to a regular textfile which follows the above concept.


    Best tip I can give you is to check the data value section on the villager wiki page. It's really not that difficult to set up your own villager trading, the main caveat is to make sure that you keep your formatting straight. Easily done if you constantly type both the opening and closing characters and enter your values between them.


    summon Villager ~ ~1 ~ {
    CustomName: "Villager #31",Profession:1,Career:1,CareerLevel:6,Offers:{
    Recipes:[
    {buy:{id:"coal",Count:1},sell:{id:emerald,Count:4,tag:{ench:[{id:1,lvl:3}]}}}
    ]
    }
    }

    That's how I always "write out" recipes. Then I just fill stuff in. Say I want it to sell "extra shiny" emeralds...


    [/p]
    [p]summon Villager ~ ~1 ~ {CustomName: "Villager #31",Profession:1,Career:1,CareerLevel:6,Offers:{Recipes:[{buy:{id:"coal",Count:1},sell:{id:emerald,Count:4,tag:{HideFlags:3,ench:[{id:1,lvl:1}],display:{Name:"A Shiny",Lore:["Something glittering"]}}}}]}}[/p]
    [p]

    So now all I'd have to do is dump this command into a function, add color codes to the name and lore entries and you're pretty much done. For example...


    summon Villager ~ ~1 ~ {CustomName: "§a§lVillager #31",Profession:1,Career:1,CareerLevel:6,Offers:{Recipes:[{buy:{id:"coal",Count:1},sell:{id:emerald,Count:4,tag:{HideFlags:3,ench:[{id:1,lvl:1}],display:{Name:"§fA §a§oShiny",Lore:["§6§lSomething glittering"]}}}}]}}

    I run this by using /function catslair:villager, and the result can be seen in my screenshots.


    Easy enough, right?

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on Enchantment: "Skillful"

    I'm not really in support of this, but I also don't oppose the idea.


    The problem I have with this idea is that there are more ways to obtain XP. If you're out mining then you don't only get XP from killing mobs, but also from mining coal, redstone, lapis, diamonds and emeralds (provided you don't use silk touch). Next you also get XP from smelting iron and gold as soon as you take out the results.


    So for regular survival gameplay such an XP boost could become seriously overpowered.


    As such my preference would be to make something like this available in the End, as they're already doing with Mending. So only after you "finish" the game then you'll gain access to more enhanced powerups.


    Of course from a technical perspective I'm not too sure that this is doable right now, considering that the XP drops are currently hard coded. Only items ("loot") can be set up using loot tables. So before this would be possible I'd imagine that they would need to make the XP drops more modular. And then also allow us to apply a dynamic reward system.


    All in all it would make the whole thing a lot more complex I think.

    Posted in: Suggestions
  • 0

    posted a message on Command debugger needed ASAP

    Get MCEdit, then edit your worldsave and undo the modifier change.


    Also: try to keep recent backups :P

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