#how to make a custom improvement in kubajs for thermal_expansion?
1 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
make your custom item, then in its recipe use this as the output:
Item.of('kubejs:my_custom_item', '{AugmentData: {RFMax: 2, Radius: 3}}')
The list of augment things can be found linked in the thermalpedia (install patchouli)
I won't be able to take in creative mode
yeah
you could make it work without nbt, but that requires registering the item as an item based off a java class, which i have no experience doing in 1.18 (in 1.19+ its a lot easier)
oh shit
can you throw off the code?
wdym?
What?
what do you mean by "throw off the code"?
send me the code
for 1.18 this is the example people throw around
#1097900921813487626 message
[Quote ➤](#1097900921813487626 message) The code so far:
let BONE_TIER;
onEvent('item.registry.tool_tiers', event => {
BONE_TIER = event.add('bone', tier => {
tier.uses = 96
tier.speed = 1.0
tier.attackDamageBonus = 2.0
tier.level = 2
tier.enchantmentValue = 8
tier.repairIngredient = 'minecraft:bone'
})
})```
*--- other, normal startup scripts---*
```js
const $DeferredRegister = java('dev.architectury.registry.registries.DeferredRegister')
const $Tiers = java('net.minecraft.world.item.Tiers')
const $Item = java('net.minecraft.world.item.Item')
const $CreativeModeTab = java('net.minecraft.world.item.CreativeModeTab')
const $Registry = java('net.minecraft.core.Registry')
const $KnifeItem = java('com.nhoryzon.mc.farmersdelight.item.KnifeItem')
let ITEMS = $DeferredRegister.create('kubejs', $Registry.ITEM_REGISTRY)
ITEMS['register(net.minecraft.class_2960,java.util.function.Supplier)']('kubejs:bone_knife', () => {
return new $KnifeItem(BONE_TIER)
})
ITEMS.register()
thanks
note its not specific to augments, its for a knife.
you would need to change the class for the augment class, and the paramaters you pass to its constructor.
It also looks to use fabric names for the register method, you would need to swap those for forge names
so how do I figure out where to replace it?
look at thermals code for the augment item class, and see what parameters it takes.
also copy the class name to replace the knife one (const $KnifeItem = java('com.nhoryzon.mc.farmersdelight.item.KnifeItem'))
where to find it?
no that is completely wrong
the first example is irrelevant, its the second example that you want
the first example is just for a custom bone tool tier
I don't understand a damn thing I'm sorry
then you should just use the otehr method,, where it wont be pickable in creative
or wait and see if someone else who has more experience with 1.18 custom registry objects comes along
oh shit