- Add attributes using universal minecraft editor install#
- Add attributes using universal minecraft editor mod#
- Add attributes using universal minecraft editor code#
Add attributes using universal minecraft editor code#
Nested comments a multi-lined comment cannot be in another multi-linedĬomments are used for a variety of reasons for explaining confusing code, explaining what a function does, listing copyright information, and to disable code without deleting it. # Makes the stone pick be craftable with stoneĪ multi-lined comment is started with "/*" and ended with "*/".Įverything between the symbols is ignored. Anything past the "//" here is ignored and doesn't do anything. A single-lined comment in ZenScript can be started with "#" or "//" That sounds kind of confusing, but it's really not complicated at all. In ZenScript, a Comment is a structure in code that is ignored by the interpreter, but is created for readability. The variable feature might not look very useful right now, but it's vital in more advanced scripts. If you replace "var" with "val", some sort of error will occur, and the script will likely not work. Will remove both the Glass block and the Lapis Block. Do note using values are mostly optional, but they're considered a good coding practice for ZenScript and other similar programming languages.Ī Variable is just like a value, but it can be set multiple times. It might not look like a big difference, but it really is if you use the value a lot. Values are especially useful so you can type less and still get the same effect. For example,ĭeclares a value named "stonePick" with the value of "".
![add attributes using universal minecraft editor add attributes using universal minecraft editor](https://i.ytimg.com/vi/GIgLnmdDrJE/maxresdefault.jpg)
The val keyword is used for declaring a value. That might sound complicated, but it's actually quite simple. In ZenScript, a Value is an item (or other type) that can be set and used later. If you wanted to replace it, you'd have have to remove the recipe, and then add it again. Of course, that last example does not replace the Stone Pickaxe recipe it just adds a new recipe for it. For example, adding a new recipe requires two one for the output, and one for the recipe itself.Īs you can likely guess, the above script adds the Diamond Pickaxe recipe. Often, a function needs more than one argument. In the example above, the Stick is the argument, and IItemStack Output is the parameter. In ZenScript, an argument is the value you provide to a parameter in a function. Of course, for the sake of readability, it is recommend that each statement gets its own line.Ĭalling a function with multiple parameters and adding shaped recipes Spaces and new lines don't mean anything in ZenScript, meaning you can do some funky things. Remember: you can call multiple functions in one script, like shown below.
Add attributes using universal minecraft editor mod#
Natura is the mod ID of Natura, and Blazerail is the unlocalized name of the Blaze Rail. This will remove the crafting recipe for the Bed:Īnd this will remove the crafting recipe for the Blaze Rail from Natura:
![add attributes using universal minecraft editor add attributes using universal minecraft editor](https://i1.rgstatic.net/publication/345316289_Treebanking_User-Generated_Content_a_UD_Based_Overview_of_Guidelines_Corpora_and_Unified_Recommendations/links/5fa371d0a6fdcc0624150132/largepreview.png)
In this example, minecraft is treated as the mod ID, and stick is the unlocalized name of the Stick. When Minecraft is launched, you will find you can no longer craft Sticks. To remove a crafting recipe, a simple "remove" function exists: Various tools exist to discover these, including NEI's data dumping feature. It's important to know the unlocalized name of the item and blocks you want to use, as well as the mod ID that adds that particular item or block. Most functions in MineTweaker relate to the addition and removal of recipes. A semicolon is required after the end of each statement. Notice the called function has a semicolon at the end of it. That file may contain other messages, but this should be found somewhere within it. The print function will log a message into the minetweaker.log file in your minecraft directory.
![add attributes using universal minecraft editor add attributes using universal minecraft editor](https://mc-addons.com/uploads/posts/2020-05/1588834062_tinkers-legacy-previously-vanillaweapons_32.jpg)
The most basic function in the print function, as shown below. In ZenScript, a function is a procedure that does something, like add or remove a recipe. It is recommended you use the Atom Text Editor, along with the Atom-MineTweaker package rather than a normal text editor, but it is not required.Īlternative packages exist for other editors, including Notepad++, Visual Studio Code, and Sublime. ZenScript is relatively simple compared to other programming languages, as it is created specifically for MineTweaker. ZenScript looks much like JavaScript or Java. It allows for more advanced features, such as loops. Unlike in MineTweaker 2, MineTweaker 3 is built on top of a custom programming language named ZenScript. The name of these files does not matter to the scripts or MineTweaker, however it is recommended to not uses spaces or symbols (excluding underscores) for the sake of convention and ease of access. All scripts are written in files with the ".zs" file extension (for example, "witchery.zs"). This should be at the same level as the "/mods/" and "/config/" directories.
Add attributes using universal minecraft editor install#
4 Calling a function with multiple parameters and adding shaped recipesīefore you can write any MineTweaker scripts, install MineTweaker and create a "/scripts/" directory in the "/minecraft/" directory, if it is not already there.