ScriptCraft

ScriptCraft

14.6k Downloads

how do you register a item

AlgoRhythm-Technologies opened this issue ยท 4 comments

commented

I checked the book and read it thoroughly the book never said how to register an item. yes, there were the how to make an EnderBow chapter, but it never said how to register an item. It just registered a recipe that made a bow that was enchanted. what I want to do is make an item that has never existed in the game before like an emerald sword or something.

commented

so would I have to make a duplicate of an already existing item then change the texture? Is the there some plugin that runs mods?

commented

You cannot make primitives that do not already exist in the game, only instances of things that exist, or new things that are novel combinations of already-existing primitives.

commented

You might be able to do it by examining the source code of this Bukkit mod: https://github.com/knokko/Custom-Items and reimplementing it in Scriptcraft.

Or simply by installing the mod: https://dev.bukkit.org/projects/custom-items-and-textures and using as a server admin.

If you want to script that plugin programatically from Scriptcraft, you can get an idea from here of how to interact with a loaded plugin from Scriptcraft, both directly through the plugin's API, and via invoking its commands for things that it doesn't publicly expose as an API: https://github.com/Magikcraft/magikcraft-core/blob/master/multiverse/multiverse-bukkit.ts

commented

I noticed that mod earlier, but could not find the source code.