#Can i use class loader to register a custom Thermal augment ?

40 messages · Page 1 of 1 (latest)

night sandal
rustic glenBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

night sandal
#

its line 393

elfin quail
#

in item event use

valid spokeBOT
#

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)))
})
night sandal
#

oh

#

imma try

elfin quail
#
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

night sandal
#

.mod ?

#

ooooh

night sandal
#

tysm

#

for the clue

#

i love u

#

idk how to add modifiers to it but whatever

vivid hound
# night sandal dude

funny enoguh, it's completely possible to extract your blurried out modpack name here xd, atleast i think so

night sandal
#

ARHH

night sandal
#

i can't use F in my script right ?

vivid hound
#

Should be automatic iirc

#

so you don't need to replace it with anything, you just remove it

night sandal
#

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())));
golden arch
#

lemme look

#

actually I didn't do modifiers, but pretty sure it's with NBT

night sandal
#

thank you

elfin quail
#

so it adds the one with nbt to creative menu

#

thats why it works