HomeJavaModsTetraJS
TetraJS
ModsJava

TetraJS

by yiran1457 · on CurseForge

⬇ Download on CurseForge

The author built this one for Minecraft 1.20.1 on Forge. On other versions it may install and then do nothing.

Allows you to use KubeJS to register your own ModularItem and StatBar.

//in startup
StartupEvents.registry("item", event => {
    event.create("tetra:test", "TetraJS:BaseModularItem")
        .tjs$setHoneBase(200)
        .tjs$setHoneIntegrityMultiplier(100)
        .tjs$isCanHone(true)
        .tjs$addMajorSlot("sword/hilt", 15, 15, true)
        .tjs$setSynergiesPath("double/")

    event.create("tetra:dynamic_test", "TetraJS:DynamicModularItem")
        .tjs$setSynergiesPath("test/", "double/")

    event.create("tetra:head", "TetraJS:EquipModularItem")
        .tjs$setSlot("head")
        .tjs$addMajorSlot("sword/hilt", 15, 15, true)

    event.create("tetra:ring", "TetraJS:CuriosModularItem")
        .tjs$addMajorSlot("sword/hilt", 15, 15, true)
        .tjs$isUnbreakable()
        .tjs$addCuriosSlot("ring")

    event.create("tetra:back", "TetraJS:CuriosModularItem")
        .tjs$addMajorSlot("sword/hilt", 15, 15, true)
        .tjs$addCuriosSlot("back")

    event.create("tetra:bow", "TetraJS:BowModularItem")
        .tjs$addMajorSlot("sword/hilt", 15, 15, true)

})

TetraJSEvents.registerEnchantAspect(event => {
    event.register("enchant", "armor", "bow")
})
//in client
TetraJSEvents.registerStatBar(event => {
  event.registerAttributeBar("minecraft:generic.movement_speed")
    .setMultiplier(100)
    .setOffset(-1)
    .setAttributeGetterType("multiply")
    .setLabelGetter("singledecimallabel")

    event.registerEffectBar("abilityCombo")

    event.registerEffectBar("ammoCapacity")
    .setMax(5)
    .setSegmented(true)
})

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more