Minecraft, you don’t need to use NBT formatted as JSON-like strings that confuse everyone. You can use true and false instead of 1b and whatever other value you use. Or do you use 1 and 0? You really don’t have to do this. You can make developer’s life simple. I want to use JSON like this:
It’s really annoying, especially since in the new Minecraft snapshots, other commands are forcing you to use strict JSON, while others require you use JSON-like nbt. It’s awful, especially since you can’t simply swap out strict JSON for non-strict JSON, you have to cheat it, handwrite the JSON-like stuff (humans were never meant to write JSON easily), or create your own JSON-like generator.
I ran into this while creating a command compactor, and I didn’t want to reinvent JSON, so I scrubbed it at the end with a regex.
But then I couldn’t use strict JSON, so to get around that, I made it so that if you have whitespace at the end of a key, it removes the whitespace and keeps the strict json:
But this is ugly, and probably not the best solution. I really just wanted it to work, since this was getting on my nerves (if anyone has something for to make this work, PLEASE let me know.)
So, I really thought Minecraft should fix this (I thought it was a bug at first), so I filed a report:
Turns out, they said it was intended. Makes no sense, though. I won’t request a feature on the subreddit, as it’s not a popular idea. It only helps developers, really.
I wish Mojang would fix this. Please make up your mind. You can use JSON-like nbt and drive developers insane, or just let use use JSON.Â
Or I guess a modding api would solve all of this, but I don’t think that’s going to happen. Ever.
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
âś“ Live Streamingâś“ Interactive Chatâś“ Private Showsâś“ HD Qualityâś“ Free Actions
Free to watch • No registration required • HD streaming
I made a Minecraft One Command Block Framework in Ruby.
Why?
Because I hate Minecraft commands. I wanted something that made it easier to create a “one command creation”, instead of you c=having to do everything by hand. And I think I did it. It’s called diamond-lang (a precise material in Minecraft). I mean, I didn’t think of emeralds when I named it. Emerald-lang sounds much cooler, but I’m stuck with diamond-lang.Â
Anyways, I pretty much made it a lot simpler for developers to create one command creations, which should mean we can see more awesome creations.
class Conveyor < DiamondLang::OneCommand
 def setup(c)
  c.title s(:a), :subtitle, {"text " => "command by Ben from bensites.com"}.to_json
  c.title s(:a), :title, {"text " => "Conveyor Belts"}.to_json
 end
 def tick(c)
  black_carpet = b 'carpet', colors(:black)
  pistons = (2..5).map {|d| [d, b('piston', d)]}.each do |d, piston|
   c.execute s(:e), relative,
    :detect, relative, black_carpet,
    :execute, s_self, relative,
    :detect, coords('~', '~-1', '~'), piston,
    :tp, s_self,  (d == 2 && "~ ~ ~-.2" ) ||
         (d == 3 && "~ ~ ~.2") ||
         (d == 4 && "~-.2 ~ ~") ||
         (d == 5 && "~.2 ~ ~")
  end
 end
end
Conveyor.create
which is pretty nice compared to the really long command it creates. Hopefully it helps people. I’ll talk about some of the really annoying things in Minecraft that made this command almost impossible to create in a day or two, but that’s the main idea. I haven’t yet gotten to do things I really want to, due to limitations in Minecraft, but I’m hoping to do them soon.
Anyways, turns out that Minecraft can be a lot ruby with Rubies. Hooray!
If you want to check it out, I made a webpage for it at bensites.com/diamond-lang, or you can do `gem install diamond-lang`