Knokko's Custom Items
Note: this plug-in requires a different installation procedure than most other plug-ins. You really need to check the installation section or one of the tutorials.
Description
This plug-in allows the owners and developers of servers to create custom items with their own textures. (It requires a server resource pack.) Everyone who would like to use this plug-in needs to download the Editor and use that to create their own custom item set.
Installation
- Download and run the Editor. Editor.jar can be found in the Files section. If you have a working Java installation, you can just download and double-click this file. If not, you can either install Java or download a native version of the Editor from https://github.com/knokko/custom-items-gradle/releases
- Put this plug-in (CustomItems.jar) in your plug-ins folder
- Configure the items and textures you want (in the Editor)
- Click on the Export... button, and follow the steps (in the Editor)
- Optional: Install ActionBarAPI to display custom tool durability and wand/gun cooldowns. See https://knokko.github.io/custom items/compatibility/positive.html for details.
If you need more detailed information about these steps, you can ask for help on the Discord server.
Discord server
Invite link: https://discordapp.com/invite/bmF3Zvu
New tutorials:
https://www.youtube.com/watch?v=GsC-pNlBjwg
Old basic tutorials:
Text: https://knokko.github.io/custom%20items/index.html
Video: https://www.youtube.com/playlist?list=PLcc-tPs9PuADC-shEBRynL9s2j6slSWCa
Old advanced tutorials:
Custom containers (video): https://knokko.github.io/custom%20items/tutorials/containers/index.html
Wands and guns (text): https://knokko.github.io/custom items/tutorials/wands and guns/index.html
Troubleshooting
If you can, use /kci debug
If that doesn't work, check out https://knokko.github.io/custom items/troubleshooting.html
Supported minecraft server versions
Minecraft 1.8.x and earlier: impossible to support (at least without mods)
Minecraft 1.9.x, 1.10.x and 1.11.x: not supported, but could be if there would be enough interest
Minecraft 1.12.2: supported
Minecraft 1.13.2: supported
Minecraft 1.14.4: supported
Minecraft 1.15.2: supported, but misses custom tridents
Minecraft 1.16.4: supported, but misses custom tridents
Minecraft 1.16.5: supported, but misses custom tridents
Minecraft 1.17.0: supported, but misses custom tridents
Minecraft 1.17.0: supported, but misses custom tridents
Minecraft 1.18.2: supported, but misses custom tridents
Minecraft 1.19.4: supported, but misses custom tridents and special melee damage sources
Minecraft 1.20.4: supported, but misses custom tridents and special melee damage sources
Minecraft 1.21.x and later: didn't exist at the time of writing this
Notes when using alongside ViaRewind
Players will only be able to see the right textures, if the resourcepack format of their client version is the same as the resourcepack format of the server version. The following versions use the same resourcepack format:
Minecraft 1.8 and earlier (Note: this resourcepack format misses required features and therefor can't be supported)
Minecraft 1.9 to minecraft 1.12 (Note: even though this plug-in can't be used on servers with minecraft 1.11 or earlier, players from minecraft 1.9 to 1.11 may be able to join and see custom textures if you use a minecraft 1.12 server)
Minecraft 1.13 and minecraft 1.14
Minecraft 1.15 and minecraft 1.16
Features
-Custom items with their own display name, lore, attribute modifiers and textures
-Custom tools with their own damage and durability
-Custom bows with their own damage, speed and durability
-Custom armor with their own armor value and other attribute modifiers, unfortunately without model texture.
-Crafting recipes that can use vanilla ingredients and custom items (or combined)
-Block & mob drops for custom items
-Custom containers (like a custom furnace, but much more powerful, unfortunately without block texture)
-Custom projectiles with custom wands to launch them
-Custom blocks (but still in beta)
Commands
- /customitems damage <amount> [player name] will decrease the remaining durability of the custom tool in the main hand of the target player (the player with name player name) by amount. If the remaining durability is smaller than (or equal to) amount, it will be destroyed. Only players with the customitems.damage permission can use this command.
- /customitems debug will let the plug-in do check for installation problems and send the results in the chat to the player who executed the command. Note that this command will not work if the installation is too bad. Only players with the customitems.debug permission can use this command. Note: if you use a big server resourcepack, this command can freeze the server for multiple seconds, so anyone with this command has the power to freeze the server by repeatedly using this command.
- /customitems encode will create a text representation of the item in the main hand of the command executor and put that in the server console. This can be used for complex crafting ingredients in the Editor. Only players with the customitems.encode permission can use this command.
- /customitems give <item name> [player name] [amount] to give the custom item with that name to the player with the given name (by default the player that executes the command). Only players with the customitems.give permission can use this command.
- /customitems list sends the names of all custom items to the player who executed the command. This can be nice for testing or when you forgot the name of a custom item. Only players with the customitems.list permission can use this command.
- /customitems reload will reload the config.yml and the current .cis file (or .txt file). Only players with the customitems.reload permission can use this command.
- /customitems repair <amount> [player name] will increase the remaining durability of the custom tool in the main hand of the target player (the player with name player name) by amount. This command will not repair the tool beyond the maximum durability (if current durability + amount is larger than the maximum durability, the durability will be set to the maximum durability). Only players with the customitems.repair permission can use this command.
- /customitems setblock <custom block> [x] [y] [z] [world] will place a custom_block at location (x, y, z) in world. Only players with the permission customitems.setblock can use this command.
- /customitems take [page] [target player] lets the target player take custom items from an in-game GUI. The page is needed when you have more than 54 custom items. By default, this command will use the command executor as target player and page 1. This command requires the permission customitems.take
- /kci playsound <sound> [x] [y] [z] [world] [volume] [pitch] plays the given custom sound at the given location (or the location of the command executor when no location is specified). If no volume or pitch is given, they will get the default value of 1
- /kci tag is a debug command that sends the NBT tag of the item in your main hand via the chat
When you put disableoutput between /kci and the rest of the command, you can disable command feedback/output, which can be useful for commands that are executed automatically.
Source code (programmers only)
In reply to knokko:
Thank you so much, this is such a great plugin for me, otherwise I wouldn't have bothered to really comment about it but I wanted to use this badly and this seems to work now, once again thanks! Have a great day!
In reply to knokko:
Actually as it seems I had both versions at the same time (dumb mistake), with the newer version it looks like the Knokko Core commands don't work at all and this armor bug still seems to occur, I don't know if it's just the github version, but I'll wait till the new version releases on the actual release page I guess? I'm using the editor and the attributes seem to work better now, however wearing multiple pieces of custom armor sets still seems to make my armor bar decrease and I still take more damage, as before. Maybe I'm doing something wrong, so if I am could you tell me? All I did was download that version, remove the old Knokko Core, and add that one, and now it seems like Knokko Core isn't working at all but it does show up under the plugin list, sorry for another reply but I'm not sure why this is happening still. If you could help again it'd be appreciated!
(For Specifics, I'm making leather armor into "Emerald Armor" by coloring it green, and also giving it a higher value than diamond but when I wear the helmet and the chestplate the value actually decreases instead of increasing. Armor Piece example: chestplate armor value = 9.0 / armor toughness = 2.5)
In reply to Haxabur26273:
I don't think you are doing something wrong, this is most likely my fault (or minecraft/Bukkit has weird behavior, but that is also my responsibility to take care of).
I didn't get that bug with the new version of Knokko Core, at least not that I am aware off. Could you send the .cisb file to [email protected] ? (Or publish it somewhere where I can access it) so that I can try this myself?
In reply to knokko:
Sure thing, hope I'm allowed to post links? Not sure kinda new to this. It seems like the whole Knokko core version you gave me doesn't work anymore. / Emailed it to you.
In reply to Haxabur26273:
I found the bug you were talking about and resolved it. The new version of knokko core will most likely be available 12 to 13 hours later on BukkitDev, but you can download it already from https://github.com/knokko/Core-Plugin-1.14/blob/master/Knokko%20Core%201.14.jar
It is the same link as before, but the original file has been overwritten, so you will download the improved one.
Thank you for pointing this problem out!
In reply to knokko:
Okay, can confirm this does definitely work now, tried with multiple sets, thanks a lot, and for fixing it so quickly, and also responding so quickly! Have a great day and keep doing good work!
Hey there! I don't really know what am I doing wrong here. I am pretty sure I did everything right but the Custom Items just does not work. I have the latest Knokko Core, the Latest Custom items, everything. It's showing me this error in the console:
Don't really know what to do with this, so I would greatly appreciate your help since you are the author of the plugin. I have 1.12 Server, have the Knokko Core for 1.14 ( But I think it works since the Knokko core is green when I type /pl ) Thanks!
> [19:43:24 ERROR]: Could not load 'plugins/Custom+Items+1.12.2.jar' in folder 'pl > ugins' > org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: nl/kno > kko/util/bits/BitInput > at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j > ava:131) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager. > java:326) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager > .java:248) [craftbukkit.jar:git-Bukkit-f46ccd7] > at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.j > ava:304) [craftbukkit.jar:git-Bukkit-f46ccd7] > at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.ja > va:188) [craftbukkit.jar:git-Bukkit-f46ccd7] > at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.jav > a:522) [craftbukkit.jar:git-Bukkit-f46ccd7] > at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201] > Caused by: java.lang.NoClassDefFoundError: nl/knokko/util/bits/BitInput > at java.lang.Class.forName0(Native Method) ~[?:1.8.0_201] > at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_201] > at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav > a:40) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j > ava:127) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > ... 6 more > Caused by: java.lang.ClassNotFoundException: nl.knokko.util.bits.BitInput > at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_ > 201] > at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. > java:77) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. > java:62) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_201] > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_201] > at java.lang.Class.forName0(Native Method) ~[?:1.8.0_201] > at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_201] > at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav > a:40) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j > ava:127) ~[craftbukkit.jar:git-Bukkit-f46ccd7] > ... 6 more
In reply to Forge_User_22778490:
( I did everything right and followed the Editor guide too. Made my own resource pack with the resource of the Custom Item in it already, put it in the *server* resource pack. put the .cis file in new-made folder CustomItems, literally everything. I am lost )
In reply to Forge_User_22778490:
The error you are getting suggests that you don't have Knokko Core (or it is not being loaded for some reason), so this is quite weird. Could you show me the entire console output? (From the moment you start the server until the error occurs)
And is knokko core listed when you do /plugins ?
All I can think of is that you are using the knokko core for the wrong minecraft version. (Knokko Core 1.12 7 is for minecraft 1.12 and Knokko Core 1.14 1 is fo rminecraft 1.14)
If you used the wrong one, that would explain the error.
In reply to knokko:
Hello and thank you for your almost instant reply! So, I installed the Knokko Core 1.12 7 that you suggested but no difference. And yes, Knokko Core was listed in /plugins, even though I had the Knokko Core for 1.14. Still, don't know what am I doing wrong here.
Here is the full Console:
In reply to Forge_User_22778490:
I think I know what is wrong and I uploaded a new jar file to https://github.com/knokko/Custom-Items/blob/master/Custom%20Items%201.12%20and%201.14%204.5.jar
(It would take like 12 more hours if I would post it here and wait for it to be improved.)
Could you test what happens if you use that jar file instead of the Custom Items you are using right now?
If even this one doesn't work, please zip your server folder (the one that contains the plugins folder) and mail it to [email protected]
Then I will try if to get the same error as you, but I think the new jar file will resolve it.
In reply to knokko:
Hello! I am so thankful for your time and work you put into this. It finally works, and I am so happy to be completely honest! It worked flawlessly before and now it stopped working so I got worried since this plugin is actually insanely good. Thank you very much, keep it up, man! Looking up for your future plugins, if there is going to be any, since all of your plugins are SO GOOD for my RPG server!
- Thanks again, your fan, Toniczech!
In reply to Forge_User_22778490:
In reply to Toniczech0512379:
By the way - I really cannot seem to find WOOD PLANKS as a recipe. Is it going to be added in the future? :)
In reply to Forge_User_22778490:
The naming of the items is a little different from the naming in minecraft. Wooden planks are WOOD and wooden logs are LOG and LOG2.
In reply to knokko:
Another question - Can I ask what does the "internal item damage" mean? Thought it was the Damage that the sword is going to do. Now I see a text up on the Editor and it says I have to put a modifier on it to put a type of damage that the sword going to do. I think that it should work differently... I want people on my server know how much damage does the "sword" do... It just says +3 even tho it does 4 damage... Kinda misunderstandable.
In reply to Forge_User_22778490:
The internal item data is not related at all to the damage your item will deal. It is necessary to link custom items to custom textures in the resource pack. It is actually the damage the item has 'taken' (like in durability loss).
Minecraft resourcepacks allow items to have different textures based on how much damage it has taken and whether or not they are unbreakable. This plug-in 'abuses' this system by making all custom items unbreakable and setting the damage the item has taken. Since all custom items are unbreakable, the tools use my custom durability in the lore to serve as the practical durability since the real durability of the item is reserved for determining the texture it gets.
And about the +3: that behavior is just the normal minecraft behavior of tools. With your first, you do 1 damage and you do 3 damage extra because you also wield that weapon, which makes a total of 4 (normal weapons have the same behavior).
And I should thank you for pointing out the bug that prevented you from using the plug-in. This bug must have been present for a long time, but didn't manifest it on my computer. You will have saved a lot of future users from that some bug!
In reply to knokko:
No problem! Really enjoying this plugin so I just couldn't move to another one without posting a ticket. By the way, can you add a SOUND to when the Item breaks? It just doesn't feel good when the Item just disappears out of your hand! Just a TIP!
In reply to knokko:
By the way - Found another bug. I can't seem to stack the Items that are supposedly stackable in my inventory. I can stack them in a chest, or stack them in my inventory when the chest is opened. But no way I can stack them when I just press E. Thanks for every answer!
In reply to Forge_User_22778490:
Sounds are indeed a good idea, I will look into that when I have more time.
Regarding the bug you mentioned, I am aware of this one. Unfortunately, this is not something I can solve. Luckily, this only happens in creative mode, not in survival mode. (As far as I know, only survival mode is important as players generally should be in survival mode.)
is there a way to make this so you can do mob spawners? like for specific mobs such and zombie skeletons ect?