1
Scripting In Minecraft (Idea)
What if Minecraft had a script system like computer craft? I've been working in .vbs script for the past while, and I thought letting Minecraft have a programing system would be really cool! It could do math, run commands, and other things. For instance, this could be a simple calculator:
/inputbox (Enter First Number) result = a
/inputbox (Enter Second Number) result = b
/tellraw @a "Addition = (a) -- (b)"
/tellraw @a "Subtraction = (a) - (b)"
/tellraw @a "Multiplication = (a) * (b)"
/tellraw @a "Division = (a) / (b)"
What it does: "/inputbox" Opens a menu, like a command block menu. The text at the top "Set Console Command for Block" is the text in the parentheses. In this case, it's Enter First Number and Enter Second Number. When you type the input and press done, it's saved as "a". This can be used later. For the tellraw, that a and b stuff can only be done in... Shoot! I forgot where to put the script... There can be a special block like a command block? All right, that's good! Anyways, for the tellraw, that a and b stuff can only be done in the... umm... name... uh... COMPUTER! Yeah that sounds good... /tellraw @a "Addition = (a) -- (b)" does the actual math. It says "Addition = (a+b)". See the built in math capabilities? What about scoreboard functionality?
/scoreboard objectives add Score dummy result = a
This means the objective "Score" will be saved as "a". Easy highscore system!
/scoreboard players test @a Highscore {(b) < (a)} 9999
This will test if the Highscore (Saved as "b") score is less than the Score (Saved as "a") score. Notice that the testing for the Score score is inside curly brackets. This tells the code block that it's a special function, and should treat everything inside them as one argument. One command function? Check!
/scoreboard objectives add Score dummy
/kill @a[score_Score_min=1] (clock)
/scoreboard players set @a Score 0 (clock)
One command! The scoreboard command only gets executed ONCE because it doesn't have the clock feature at the end. As for the kill and other scoreboard, they will get executed 20 times a second, because they have the clock. As long as the computer has a redstone signal, it will activate all the clock commands. And, it's way more compact because you don't have to use /summon, riding, NBT and all of that. I think it's a good idea, and I don't know a lot about coding, so feel free to comment constructive criticism!
/inputbox (Enter First Number) result = a
/inputbox (Enter Second Number) result = b
/tellraw @a "Addition = (a) -- (b)"
/tellraw @a "Subtraction = (a) - (b)"
/tellraw @a "Multiplication = (a) * (b)"
/tellraw @a "Division = (a) / (b)"
What it does: "/inputbox" Opens a menu, like a command block menu. The text at the top "Set Console Command for Block" is the text in the parentheses. In this case, it's Enter First Number and Enter Second Number. When you type the input and press done, it's saved as "a". This can be used later. For the tellraw, that a and b stuff can only be done in... Shoot! I forgot where to put the script... There can be a special block like a command block? All right, that's good! Anyways, for the tellraw, that a and b stuff can only be done in the... umm... name... uh... COMPUTER! Yeah that sounds good... /tellraw @a "Addition = (a) -- (b)" does the actual math. It says "Addition = (a+b)". See the built in math capabilities? What about scoreboard functionality?
/scoreboard objectives add Score dummy result = a
This means the objective "Score" will be saved as "a". Easy highscore system!
/scoreboard players test @a Highscore {(b) < (a)} 9999
This will test if the Highscore (Saved as "b") score is less than the Score (Saved as "a") score. Notice that the testing for the Score score is inside curly brackets. This tells the code block that it's a special function, and should treat everything inside them as one argument. One command function? Check!
/scoreboard objectives add Score dummy
/kill @a[score_Score_min=1] (clock)
/scoreboard players set @a Score 0 (clock)
One command! The scoreboard command only gets executed ONCE because it doesn't have the clock feature at the end. As for the kill and other scoreboard, they will get executed 20 times a second, because they have the clock. As long as the computer has a redstone signal, it will activate all the clock commands. And, it's way more compact because you don't have to use /summon, riding, NBT and all of that. I think it's a good idea, and I don't know a lot about coding, so feel free to comment constructive criticism!
4
Uhh, minecraft's code is mainly Java. So if they did, it should definitely be java instead of VBScript, which not a lot of people know. There's already a mod called the Turtle Mod or something like this which allows you to do something similar I think. I haven't looked into it, but you should research it a little
It's called computer craft, and I want to learn how to code it. Also, you're right about the java thing. Just an idea
Creating .vbs files is scripting, not "coding", terms wise.If you want a scripting language, look at ComputerCraft. http://www.computercraft.info/
See? I know nothing... BTW I changed the title, etc. Thanks
