Custom Items

KubeJS TFC allows for the create of some of TFC’s item types

If Precision Prospecting Modrinth Link CurseForge Link is installed, the following item type is supported


Chisel

Type: tfc:chisel

Creates a new chisel item

Inherits the methods of the default item builder

Extra Methods

  • : Set the tool tier of the chisel
  • : Set the base attack damage of the chisel
  • : Set the base attack speed of the chisel
  • : Modifies the tool tier of the chisel
  • : Set the attack damage bonus of the chisel’s tool tier
  • : Set the attack speed bonus of the chisel’s tool tier

Example

StartupEvents.registry('item', event => {
    event.create('chisel', 'tfc:chisel')
        .texture('tfc:item/metal/chisel/copper')
})

Fishing Rod

Type: tfc:fishing_rod

Creates a new TFC fishing rod item

Inherits the methods of the default item builder

Extra Methods

  • : Set the strength of the fishing rod, defaults to 1
  • : Set the model to use while the rod is cast, defaults to minecraft:item/fishing_rod/cast
  • : Allow the rod to accept small bait by adding it to the tfc:holds_small_fishing_bait tag
  • : Allow the rod to accept large bait by adding it to the tfc:holds_large_fishing_bait tag

Example

StartupEvents.registry('item', event => {
    event.create('fishing_rod', 'tfc:fishing_rod')
        .fishingStrength(12)
        .texture('minecraft:block/dirt')
        .largeBait()
})

Glass Bottle

Type: tfc:glass_bottle

Creates a new glass bottle item

Inherits the methods of the jug item builder

Extra Methods

  • : Set the chance, in the range [0, 1], the bottle will break each time it is drunk from. Defaults to 0.5
  • : Set the chance, in the range [0, 1], the bottle will break each time is drunk from via a supplier. Defaults to () => 0.5

Example

StartupEvents.registry('item', event => {
    event.create('glass_bottle', 'tfc:glass_bottle')
        .breakChance(0.05)
        .capacity(120)
        .allowedFluids('kubejs:glass_safe')
})

Glassworking

Type: tfc:glassworking

Creates a new item which can perform a glassworking operation

Inherits the methods of the default item builder

Extra Method

  • : Set the operation the item performs. A full list of available operations can be obtained by running the command /kubejs dump_registries tfc:glass_operation in-game

Example

StartupEvents.registry('item', event => {
    event.create('glassworking', 'tfc:glassworking')
        .operation('tfc:saw')
})

Glassworking Tool

Type: tfc:glassworking_tool

Creates a new tool item which can perform a glassworking operation

Inherits the methods of the tool item builder

Extra Method

  • : Set the operation the tool performs, defaults to tfc:saw. A full list of available operations can be obtained by running the command /kubejs dump_registry tfc:glass_operation in-game

Example

StartupEvents.registry('item', event => {
    event.create('glass_knife', 'tfc:glassworking_tool')
        .operation('kubejs:cut')
        .knife()
})

Hammer

Type: tfc:hammer

Creates a new hammer item

Inherits the methods of the chisel item builder

Extra Method

  • : Set the texture the hammer uses while in a trip hammer and add the hammer to the tfc:trip_hammers tag

Example

StartupEvents.registry('item', event => {
    event.create('hammer', 'tfc:hammer')
        .tripHammerTexture('tfc:block/metal/smooth/red_steel')
        .speed(1.5)
})

Hoe

Type: tfc:hoe

Creates a new TFC hoe item

Inherits the methods of the chisel item builder

Example

StartupEvents.registry('item', event => {
    event.create('hoe', 'tfc:hoe')
        .texture('minecraft:item/diamond_hoe')
})

Javelin

Type: tfc:javelin

Creates a new javelin item

Inherits the methods of the chisel item builder

Extra Methods

  • : Prevent an extension, which renders the thrown javelin entity in the hand in first and third person, from being registered
  • : Set the texture used for the thrown entity of the javelin
  • : Set the model to use while throwing/charging the javelin
  • : Set the base damage the javelin inflicts when in entity form. Defaults to 1.5 times the javelin’s tier attack damage bonus
  • : Allow skeletons to spawn with the javelin by adding it to the tfc:skeleton_weapons tag
  • : Set the model to display at a specific display context
  • : Set the model generation at a specific display context
  • : Set the model to display in the none, fixed, ground, and gui display contexts
  • : Set the model generation for the none, fixed, ground, and gui display contexts

Example

StartupEvents.registry('item', event => {
    event.create('javelin', 'tfc:javelin')
        .thrownTexture('tfc:block/metal/smooth/blue_steel')
        .thrownDamage(12)
        .guiModel('kubejs:item/blue_stick')
})

Jug

Type: tfc:jug

Creates a new jug item

Inherits the methods the default item builder

Extra Methods

  • : Set the en_us text of the jug’s display when it contains fluid. The %s template can be used to place the fluid’s name where wanted
  • : Set the base and fluid overlay texture of the jug’s model. See an example from TFC for what an overlay texture should look like
  • : Set how much fluid, in mB, the jug can hold. Defaults to 100
  • : Set how much fluid, in mB, the jug can hold via a supplier. Defaults to () => 100
  • : Set which fluids the jug can hold via a tag, defaults to tfc:usable_in_jug

Example

StartupEvents.registry('item', event => {
    event.create('jug', 'tfc:jug')
        .filledDisplayName("Big 'ol Jug of %s")
        .displayName('Big Jug')
        .textures('tfc:item/ceramic/jug_empty', 'tfc:item/ceramic/jug_overlay')
        .capacity(5000)
})

Mace

Type: tfc:mace

Creates a new mace item

Inherits the methods of the chisel item builder

Example

StartupEvents.registry('item', event => {
    event.create('mace', 'tfc:mace')
        .speedBaseline(0.8)
        .modifyTier(tier => {
            tier.setUses(3000)
        })
})

Mold

Type: tfc:mold

Creates a new mold item

Inherits the methods of the default item builder

Extra Methods

  • .moldTable(pattern: String[14], textures?: Map<String, String>): Allow the mold to be put in the mold table by adding it to the tfc:usable_in_mold_table tag and generating a model for it
    • pattern: String[14]: An array of strings, the shape of the model in the model table. The array must have 14 values, each 14 characters long. Empty spaces will be ‘carved out’
    • textures?: Map<String, String>: The textures of the model in the mold table. The texture keys are 0 and particle. Optional, defaults to adding tfc:block/mold to both
  • : Set the base and fluid overlay texture of the mold’s model. See TFC for what an overlay texture should look like
  • : Set how much fluid, in mB, the mold can hold. Defaults to 100
  • : Set how much fluid, in mB, the mold can hold via a supplier. Defaults to () => 100
  • : Set which fluids the mold can hold via a tag, defaults to tfc:usable_in_jug

Example

StartupEvents.registry('item', event => {
    event.create('happy_mold', 'tfc:mold')
        .textures('kubejs:item/happy_mold_empty', 'kubejs:item/happy_mold_overlay')
        .capacity(15)
        .allowFluids('kubejs:happy_fluids')
        .moldTable([
            'XXXXXXXXXXXXXX',
            'XXXXXXXXXXXXXX',
            'XXXXXXXXXXXXXX',
            'XX  XXXXXX  XX',
            'XX  XXXXXX  XX',
            'XXXXXXXXXXXXXX',
            'XXXXXXXXXXXXXX',
            'X XXXXXXXXXX X',
            'X XXXXXXXXXX X',
            'XX XXXXXXXX XX',
            'XXX  XXXX  XXX',
            'XXXXX    XXXXX',
            'XXXXXXXXXXXXXX',
            'XXXXXXXXXXXXXX'
        ])
})

Prospector’s Pick

Type: tfc:propick

Creates a new prospector’s pick item

Inherits the methods of the chisel item builder

Extra Method

  • : Set the integer level of the pick, determines the chance the pick reports a false negative. The chance is calculated from the level as 0.3 - level * (0.3 / 5) where level is clamped to the range [0, 5]

Example

StartupEvents.registry('item', event => {
    event.create('propick', 'tfc:propick')
        .level(4)
        .texture('minecraft:block/sand')
})

Scythe

Type: tfc:scythe

Creates a new scythe item

Inherits the methods of the chisel item builder

Example

StartupEvents.registry('item', event => {
    event.create('scythe', 'tfc:scythe')
        .modifyTier(tier => tier.setUses(2000))
        .texture('minecraft:item/shears')
})

Tool

Type: tfc:tool

Creates a new generic tool item

Inherits the methods of the chisel item builder

Extra Methods

  • : Set the block tag the tool is effective against
  • : Set the mineable block tag to tfc:mineable_with_knife and add the tool to the tfc:tools/knife tag

Example

StartupEvents.registry('item', event => {
    event.create('tool', 'tfc:tool')
        .mineableBlocksTag('kubejs:ugly_blocks')
        .attackDamageBaseline(0.2)
        .modifyTier(tier => {
            tier.setUses(5000)
        })
})

Windmill Blade

Type: tfc:windmill_blade

Creates a new windmill blade item

Inherits the methods of the default item builder

Extra Methods

  • : Set the blade color, defaults to 0xFFFFFF. Translucency is not supported
  • : Set the texture of the blade. Defaults to tfc:entity/misc/windmill_blade

Example

StartupEvents.registry('item', event => {
    event.create('windmill', 'tfc:windmill_blade')
        .bladeColor(0x45F977)
})

Precision Prospecting Prospector

Type: precisionprospecting:prospector

Creates a new prospector item

Inherits the methods of the chisel item builder

Extra Methods

  • : Set the radii, displacement, and prospect tag of the prospector based on a preset. Accepts pros_hammer, pros_drill, or min_pros
  • : Set the integer level of the prospector, determines the chance the prospector reports a false negative. The chance is calculated from the level as 0.3 - level * (0.3 / 5) where level is clamped to the range [0, 5]
  • : Set the tag the prospector will scan for
  • : Set the cool down of the prospector
  • : Set the primary scanning radius of the prospector, defaults to 12
  • : Set the primary scanning radius of the prospector as a supplier, defaults to () => 12
  • : Set the secondary scanning radius of the prospector, defaults to 12
  • : Set the secondary scanning radius of the prospector as a supplier, defaults to () => 12
  • : Set the scanning displacement of the prospector, defaults to 0
  • : Set the scanning displacement of the prospector as a supplier, defaults to () => 0

Example

StartupEvents.registry('item', event => {
    event.create('clay_sniffer', 'precisionprospecting:prospector')
        .level(5)
        .prospectTag('kubejs:prospectable_clay')
        .primaryRadius(20)
        .secondaryRadius(4)
})