StartupEvents.registry("item", (event) => {
event
.create("combat_knife")
.displayName("§aCombat Knife") // Green display name
.maxStackSize(1) // Make it unstackable like weapons
.tiered((tiered) => {
tiered
.attackDamageBaseline(5) // Base attack damage (equivalent to an iron sword)
.durability(250) // Durability of the knife
.attackSpeedBaseline(2.0); // Faster attack speed than most weapons
});
});
#How can i get this sword item to work?
8 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes
```js :arrow_left:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
This example will look like this:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
.create("combat_knife", "sword")```
What are the codes to change damage and such?
e.create('iron_sword', 'sword').attackDamageBaseline(3).speedBaseline(-2.4)
Thank you ill try my best I'm super new to kubejs thank you for your help and patience!
Hey I wanted to thank you for your help! Your code worked and I was able to create my sword item