https://github.com/CoFH/ThermalCore/blob/131a8a2eb807baa999707908ad9926a2fdedfa23/src/main/java/cofh/thermal/core/init/registries/TCoreItems.java#L393C1-L393C1
i wanna make a new dynamo power output augment idk how to start
#Can i use class loader to register a custom Thermal augment ?
40 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
its line 393
try it like this
const $FlowerBlock = Java.loadClass('net.minecraft.world.level.block.FlowerBlock')
const $FlowerPotBlock = Java.loadClass('net.minecraft.world.level.block.FlowerPotBlock')
const $Blocks = Java.loadClass('net.minecraft.world.level.block.Blocks')
const $MobEffects = Java.loadClass('net.minecraft.world.effect.MobEffects')
const $Properties = Java.loadClass('net.minecraft.world.level.block.state.BlockBehaviour$Properties')
const $BlockItem = Java.loadClass('net.minecraft.world.item.BlockItem')
const $IProperties = Java.loadClass('net.minecraft.world.item.Item$Properties')
const $CreativeTab = Java.loadClass('net.minecraft.world.item.CreativeModeTab')
let torchflowerBlock
StartupEvents.registry('block', event => {
// Torchflower
torchflowerBlock = event.custom('deluxe:torchflower', new $FlowerBlock($MobEffects.NIGHT_VISION, 5, $Properties.copy($Blocks.DANDELION)))
// Torchflower pot
event.custom('deluxe:potted_torchflower', new $FlowerPotBlock(torchflowerBlock.get(), $Properties.copy($Blocks.DANDELION))
})
StartupEvents.registry('item', event => {
event.custom('deluxe:torchflower', new $BlockItem(torchflowerBlock.get(), new $IProperties().tab($CreativeTab.TAB_MISC)))
})
const $AugmentItem = Java.loadClass('cofh.thermal.lib.common.item.AugmentItem')
const $IProperties = Java.loadClass('net.minecraft.world.item.Item$Properties')
const $CreativeTab = Java.loadClass('net.minecraft.world.item.CreativeModeTab')
const $AugmentDataHelper = Java.loadClass('cofh.core.util.helpers.AugmentDataHelper')
StartupEvents.registry('item', event => {
event.custom('deluxe:torchflower', new $AugmentItem(new $IProperties(), $AugmentDataHelper.builder().mod('whetever idk', 1).build()))
})```
@night sandal
funny enoguh, it's completely possible to extract your blurried out modpack name here xd, atleast i think so
ARHH
Should be automatic iirc
so you don't need to replace it with anything, you just remove it
okay ty
it still doesnt work lol
it doesnt do anything
const $AugmentItem = Java.loadClass('cofh.thermal.lib.common.item.AugmentItem')
const $IProperties = Java.loadClass('net.minecraft.world.item.Item$Properties')
const $CreativeTab = Java.loadClass('net.minecraft.world.item.CreativeModeTab')
const $AugmentDataHelper = Java.loadClass('cofh.core.util.helpers.AugmentDataHelper')
StartupEvents.registry('item', event => {
event.custom('kubejs:dynamo_output_augment', new $AugmentItem(new $IProperties(), $AugmentDataHelper.builder().type('TAG_AUGMENT_TYPE_DYNAMO').mod('TAG_AUGMENT_DYNAMO_POWER', 100.0).mod('TAG_AUGMENT_DYNAMO_ENERGY', 1.0).build()))
})```
itemsTab(registerItem("dynamo_output_augment", () -> new AugmentItem(itemProperties(),
AugmentDataHelper.builder()
.type(TAG_AUGMENT_TYPE_DYNAMO)
.mod(TAG_AUGMENT_DYNAMO_POWER, 1.0F)
.mod(TAG_AUGMENT_DYNAMO_ENERGY, 0.9F)
.build())));
I believe it's done with NBT, I just did it a little while ago
lemme look
actually I didn't do modifiers, but pretty sure it's with NBT
it was in fact
thank you
i just looked at the code and all the .type() does is add an nbt tag
so it adds the one with nbt to creative menu
thats why it works