Use Kubejs to customize GTM [GTM] Gregtechceu Modern MineCraft Game

This tutorial is set by the author to use the CC By-NC-SA protocol.

Foreword

GTM comes with Kubejs support, you can use Kubejs to customize formulas, materials and machines.

It is strongly recommended to use Probejs to get code prompts!

This article is not a JS tutorial. You should have a certain JS knowledge before reading.For the concepts of inheritance, deconstruction assignment, claim statement, and remaining parameters, it is recommended to query documentation or online search of MDN.

Common data

Most of the commonly used data is in the GTVALUES class. The most commonly used is the voltage value. It is recommended to use a high priority JS file to store these data.

 // priority: 10

const [ulv, LV, MV, HV, EV, Iv, LUV, ZPM, UV, UHV, UIV, UXV, OPV, MAX] = gtvalues.va

In this way, you can use these values ​​directly instead of gtvalues.va or memory every time.

formula

All GTM formula types (including custom formula types) can be found in recipeEventjs, and all GTM formulas are inherited from GTRECIPESCHEMA $ GTRECIPEJS. Therefore, one formula can basically be migrated directly to another formula type.The following is some commonly used methods on GTRECIPEJS:

 // This is the TypeScript code. Do not use it for Kubejs!

// TS Quick Equity: Method Name (Parameter Name: Parameter Type): Return type

DECLARE CLASS GTRECIPESCHEMA $ GTRECIPEJS EXTENDS Internal.RCipejs {

// The items to be input

// Parameter 1 (remaining parameters): Enter items-All parameters will be treated as an array, so no materials are used to wrap all materials.

Iteminputs (... inputs: inputITITITEM_ []): This

// The items to be output

// Note: It is invalid to use item.withchance () here, please use the CHANCEDOUTPUT () method

// Parameter 1 (remaining parameter): Output item-Ibid, no further description afterwards

Itemoutputs (... outputs: outputItem_ []): this;

// The programming circuit configuration used

// Parameter 1: Configuration-configuration of programming circuit, range 0-32

Circuit (configuration: number): this;

// The fluid to be input // Parameter 1 (remaining parameters): Enter the fluid

Inputfluids (... inputs: Internet.gtRecipeComponents $ FluidingRedientjs_ []: This;

// The fluid to be output

// Parameter 1 (remaining parameter): output fluid

Outputfluids (... Outputs: internal.fluidstackjs_ []): this;

// Consume EU per color

// Parameter 1: EU-If it is set to negative, then this formula will output instead of consuming energy (if possible)

EUT (EU: Number): this;

// The formula continues

// Note: This method does not actually exist in GTRECIPEJS, but (almost) each formula type will have this method, so list here

// Parameter 1: Time-The unit is tick

Duration (duration: string | number): this;

// It does not consume items in the formula, such as catalysts in chemical reactions and molds in molds

// Parameter 1: Items

Notconsumable (itemstack: inputItem_): this;

// The dimension required for the formula to take effect

// Parameter 1: Dimension

Dimension (Dimension: ResourceLocation_): this;

// Note: This is the function of the function, that is, you can call the same function name with different parameters and types to obtain different effects

// Parameter 1: Dimension

// Parameter 2: Whether it is reversed-When setting to True, the formula will not take effect only in this dimension

Dimension (Dimension: ResourceLocation_, Reverse: Boolean): this;

// The biological group system required for recipes

// Parameter 1: group is biome (biome: resourceLocation_): this;

// Parameter 1: Group system

// Parameter 2: Whether to reverse

Biome (biome: resourcelocation_, reverse: boolean): this;

// Whether every tick of the formula runs consumes materials and energy

Pertick (PERTICK: BOOLEAN): this;

// Input stress (mechanical power)

// Parameter 1: Stress

InputStress (Stress: Number): this;

// Output stress

// Parameter 1: Stress

OutputStress (stress: number): this;

// The speed of demand (mechanical power)

// Parameter 1: Speed ​​speed

RPM (RPM: Number): this;

// Blast furnace temperature

// Parameter 1: Temperature

BlastfurnaceTemp (blasttemp: number): this;

// Fusion startup EU

// Parameter 1: EU

FusionStarteu (EU: Number): this;

// Probably output items

// Parameter 1: Items

// Parameter 2: Rate

// Parameter 3: Voltage level gain-the higher the voltage level, the greater the output probability

CHANCEDOUTPUT (Stack: OutputITITEM_, CHANCE: Number, TierChanceboost: Number): this;

// Parameter 1: Tag prefix-that is, dust, small_dust, gem, etc. // Parameters 2: GT Materials-that is, the materials registered in GTMATERIALS

// Parameter 3: voltage level gain

CHANCEDOUTPUT (tag: tagprefix_, mat: com.gregtechceu.api.data.chematerial.material_, channel: number, tierChanceBoost: number): This;; This;

// Parameter 1: Tag prefix

// Parameter 2: GT material

// Parameter 3: Quantity

// Parameter 4: voltage level gain

CHANCEDOUTPUT (TAGPREFIX_, MAT: Com.gregtechceu.api.data.Chematerial.material_, Count: Number, TierChanceboost : Number): this;

// Probably output fluid

// Parameter 1: Flow

// Parameter 2: Rate

// Parameter 3: voltage level gain

CHANCEDFLUIDOUTPUT (Stack: Internal.fluidStackjs_, CHANCE: Number, TierChanceBoost: Number): This;

// The number of explosives consumed is mainly used for aggregation compressors

// Parameter 1: Number of explosives

Explosivesamount (Explosivesamount: Number): this;

// The type of ultra -net room (ultra -net room, sterile super net room)

// Parameter 1: Super Cleanline Type-only two types, Cleanroomtype.Cleanroom and CleanroomType.ster_Cleanroom

Cleanroom (CleanroomType: Cleanroomtype_): this;

// For the formula of the multi -block distilled tower, whether to generate the corresponding formula DisableDistilleryReCipes (Flag: Boolean): this; this;

}

Here are some examples:

 serverEvents.recipes (e => {

E.Recipes.gtceu.assembler ('Kubejs: UHV_ENERGY_INPUT_HATCH_16A'))

.Iteminputs (

'2x gtceu: uhv_nergy_input_hatch_4a',,

'4x gtceu: uhpic_chip',

'2x gtceu: Ruthenium_trinium_americium_neutronate_quadruple_wire',,

'4x gtceu: europium_octal_wire'

Cure

.Duration (200)

.Eut (491520)

.ItemoutPuts ('Gtceu: UHV_ENERGY_INPUT_HATCH_16A')

// Note: This will create a formula for large -scale chemical reactors at the same time

E.Recipes.GTCEU.CHEMICAL_REACTOR ('Kubejs: Chem/Chromatic_printed_Circuit_Board_persulfate')

.Iteminputs ('Kubejs: chromative_circuit_board', '32x gtceu: trinium_foil')

.Inputfluids ('gtceu: sodium_persulfate 10000') // Yes, you can write it directly without fluid.of ()

.ItemoutPuts ('Kubejs: chromative_printed_circuit_board') .Cleanroom (CleanroomType.Cleanroom)

.Eut (hv) // Note: This value is not a global variable that comes with it, it is declared in the previous "commonly used data" section

.Duration (1800)

E.Recipes.gtceu.gas_collector ('Kubejs: Gas_collector/Glacio')

.Dimension ('Ad_ASTRA: Glacio')

.Outputfluids ('Kubejs: GLACIO_AIR 10000')

.Eut (EV)

.Duration (200)

.Circuit (9)

})

Tips: How to use fluid tags

Many times some other modules will register the same name, such as Immersive Engineering to register heterophenol oil, AD ASTRA, PneumaticCraft will register oil, MEKANISM will register various chemical fluids. They have no reason to be used in GT formulas. In factYou can indeed use them in the formula where GTM comes, because these formulas use fluid labels.But when the custom formula, it is a pity that there is no native way to use fluid labels, whether it is FLUID.OF ('#Fluid: Tag', 1000) or '#Fluid: Tag 1000'.The following is a solution:

 const jsonObject = java.loadClass ('com.google.gson.jsonObject');

/**

*@Param {SPECIAL.FLUIDTAG} tag

*@Param {number} amount

*@ReturnS {Internet.jsonObject}

*/

let FluidingRedient = (tag, amount) => {

Let result = new jsonObject ()

Result.add ('amount', amount || 1000) // If you are not specified, the default is 1000 result.add ('value', {tag: tag})

Return Result

}

ServerEvents.recipes (e => {{

E.Recipes.gtceu.xxxxx ('xxxxx')

.Inputfluids (FLUIDINGREDIENT ('Forge: Hydrogen', 1000))

})

Principle: InputFLUIDS () acceptable parameter types actually include GTM's FluidingRediet, Kubejs FluidStack, and JSONObject. The first one cannot be used in JS, because the type of JS is very strict, even though you use the correct parameter type type type typeFLUIDINGREDIENT also reports an error when constructing; the second one does not accept the fluid label; only the third one can be used, and the object of the object of the JS cannot be used, because it is not a JSONObject, and does not have the method required when analyzing the fluid material in the source code.

Special circumstances

For the formula of the broken rock machine, due to the problem of Rhino, you need to use special means to tell it how to explain the .adddata () method: ADDDATA () method:

 event.recipes.gtceu.Rock_breaker ('SOME_RECIDE_ID')

.NonConsumable ('Minecraft: DIRT')

.ItemoutPuts ('Minecraft: DIRT')

['Adddata (java.lang.string, java.lang.string)'] ('Fluida', 'Minecraft: Water')

['Adddata (java.lang.string, java.lang.string)'] ('Fluidb', 'MINECRAFT: LAVA')

.Duration (20)

.Eut (8)

.AddCondition (RockBreakerCondition.instance)

Elements, materials, formulas and machines

Uncomfortable, the registration of elements, materials, and machines is carried out in gtceustartupevents.regotion (). Even if PROBEJS is installed, you don't want to get how much useful code prompts, because Probejs explains this method:

The type to be registered is a string. You can never know what you should write without looking at the source code or example of the module; and on the callback function ...

Any, or Any.The only two methods on the builderbase

Registered element

 gtceustartupevents.regization ('gtceu: element', e => {// parameter 1: name-string

// Parameter 2: Number of proton-number

// Parameter 3: Number of neutron-Number

// Parameter 4: Half-life (second) -Number-set to -1 No half-life

// Parameter 5: The element after decay-string | null

// Parameter 6: Symbol-String

// Parameter 7: Whether it is Hominin-BOOLEAN

E.create ('Protonium', 1000, 0, -1, NULL, 'Pn', False)

E.create ('chronomium', 180, 120, -1, null, 'ch', false)

})

Registered material

 gtceustartupevents.regization ('gtceu: material', e => {{{

// Some things are not in global variables, you need to use java.loadclass () to get their references

ConstialKey = java.loadClass ('com.gregtechceu.gtceu.api.data.Chemateial.Propertykey')

Const oreproperty = java.loadclass ('com.gregtechceu.gtceu.api.data.Chemateare.Properties.oreproperty')

// Modify the existing material attributes, you can get code prompts here

// The role of this code is to add a detailed conductive line to the 钌 镅 镅 oxide

Gtmaterials.rutheumtriniumamamemneutronate.addflags

// Add ore to high alkane -value gasoline

// olproperty Construct function:

// Parameter 1: Main product multiplication-number // Parameter 2: Bide product multiplication-number

// Parameter 3 (omitted): Whether the ore glows-Boolean

Gtmaterials.higholenegaSoline.setproperty (proprityKey.ore, New Oreproperty (3, 4, TRUE)))))))))

// Register materials, the create () method will return com.gregtechceu.gtceu.api.data.Chemical.Material.material $ Builder

// There is no prompt for this thing. These methods are found by the source code.

E.create ('Protonium')

// Main color

.Color (0xed1661))

// Secondary color

.SecondaryColor (0xd419b5)

// Add ingots for this material

.Ingot ())

// Add fluids (liquid, gas, plasma), and fluid attributes (temperature here) to this material (temperature)

// If you want to specify temperature and other attributes for the fluid, you can only write this way, although it looks ugly

// If you just want to simply add the fluid, you only need fluid ()

// Similarly, if you want to simply add gas, liquid, plasma, use GAS (), Liquid (), Plasma ()

['FLUID (com.gregtechceu.gtceu.api.fluids.store.fluidStorageKeke, com.gregtechceu.api.fluidbuilder)'] Quid, new gtfluidbuilder (). Temperature (100000))

// Specify the icon style of the item of this material

.Iconset (gtmatericaliconset.dull) // Material mark, which parts can be made at specifying this material

.Flags (

GtmaterFlags.gene on_plate,

GtmaterFlags.Gene on_bolt_screw,

GtmaterFlags.Gene on_frame,

GtmaterFlags.Gene on_rod,

GtmaterFlags.generate_gear,

GtmaterFlags.gienerate_small_gear,

GtmaterFlags.Gene on_fine_wire,

GtmaterFlags.gienerate_spring

Cure

// The composition element of this material

.Element (gtelements.get ('protonium'))

// If this material can make a wire

// Parameter 1: Voltage-Number

// Parameter 2: current-number

// Parameter 3: Loss-Number

// Parameter 4: Whether it is a superconductor-BOOLEAN

// Parameters 5 (omitted): Trend temperature-number. CableProperties (gtvalues.v [gtvalues.uev], 2, 36, false)

// The tool attributes of this material

// Parameter 1: Tool Properties-Toolproperty

// ToolProperty Constructing Function:

// Parameter 1: Digging speed-number

// Parameter 2: Attack damage-NUMBER

// Parameter 3: durability-number

// Parameter 4: Digging level-NUMBER

// Parameter 5: Tool type-gttooltype []

.Toolstats (New TOOLPROPERTY (144, 114, 80000, 6, [gttoolType.axe, gttoolType.pickaxe, gttoolType.sword])))))))))))

E.create ('Protonium_trinium_tritanate')

.Color (0xed9596)

.SecondaryColor (0xe7727e)

.Ingot ())

['FLUID (com.gregtechceu.gtceu.api.fluids.store.fluidStorageKeke, com.gregtechceu.api.fluidbuilder)'] Quid, new gtfluidbuilder (). Temperator (10200))

.Iconset (gtmatericaliconset.metallic)

.Flags (gtmaterFlags.Gene on_fine_wire) // The ingredients of this material will determine the chemical formula of this material

// The parameters are the name of the material in GTMATERIALS

.Components ('2X Protonium', '4x Trinium', '3X Tritanium', '7X Oxygen'))

.CableProperties (gtvalues.v [gtvalues.uev], 28, 0, true)

// This material can be made in alloy smelting furnaces. The raw materials are powder or fluids of the above ingredients. The output is automatically calculated, and the melting fluid is automatically registered

// For details, please refer to the following section

.Blasttemp (10200, 'high', gtvalues.va [gtvalues.uv], 600)

// This material can make a fluid pipeline

// Parameter 1: Maximum tolerance temperature-number

// Parameter 2: throughput-Number

// Parameter 3: Whether to transport gas-Boolean

// The following parameters are either or omitted

// Parameter 4 (omitted): Whether to transport acidic substances-Boolean

// Parameter 5 (omitted): Whether to transport low-temperature substances-Boolean

// Parameter 6 (omitted): Whether to transport plasma-Boolean

.FluidpipeProperties (200000, 80000, TRUE, TRUE, TRUE, TRUE)

})

Other common methods on Material $ Builder:

 // Still TS code DeCLARE Class Material $ Builder Extends Builderbase  {

// Add ore to this material

// Parameter 1: Whether the ore is glowing

Ol (emissive: boolean): this;

// Parameter 1: Main product multiplication

// Parameter 2: Bide product multiplication

Olmultiplier: number, byproductiplier: number): this;

Olmultiplier: number, byproductiplier: number, emissive: boolean): this;;

// What substances should be soaked in the ore of this material in the chemical immersion machine (usually mercury)

// Parameter 1: Material-Example GTMATERIALS.Mercury

Washedin (m: material): this;

// Parameter 2: Number of products washed out

WASHedin (M: Material, WASHEDAMOUNT: Number): this;

// Add ingots for this material

Ingot (): this;

// Parameter 1: Digging level

Ingot (HarvesstLevel: Number): this;

// Parameter 2: Burning time

Ingot (HarvesstLevel: Number, BURNTIME: Number): this;

// Add gems for this material

Gem (): this;

Gem (HarvestLevel: Number): this;

GEM (HarvesstLevel: Number, BURNTIME: Number): this;

// Add turbine rotor for the material

// Parameter 1: The highest speed speed

// Parameter 2: Loss

// Parameter 3: durability

Rotorsstats (Speed: Number, Damage: Number, Durability: Number): this;

// The temperature required for this material in the blast furnace/alloy smelting furnace

// Parameter 1: Temperature

Blastten (temp: number): this

// Parameter 2: The protective gas grade used by smelting-available value: 'Low' | 'MID' | 'HIGH' | 'Higher' | 'HIGHEST' | NULL

Blastten (temp: number, gastier: blastproperty.gastier): this;

// Parameter 3: power consumption, cover the default value

Blasttemp (Temp: Number, Gastier: Blastproperty.gastier, EUTOVERRIDE: Number): This;;

// Parameter 4: time consumption, cover the default value

BlastTemp (Temp: Number, Gastier: Blastproperty.gastier, EUTOVERIDE: Number, Durationoverride: Number): this;;

// Add by -products for the ore of this material

// Parameter 1 (remaining parameter): Bide product

Addorebyproducts (... byproducts: material []): this;

// Add the item pipeline for this material

// Parameter 1: Pipe priority

// Parameter 2: Traffic per second

ItempipeProperties (Priority: Number, Stackspersc: Number): this;

}

Register formula

Example:

 gtceustartupevents.regization ('gtceu: recipe_type', e => {{{{

// Create () Method Return to com.gregtechceu.gtceu.integration.kjs.builders.gtRecipedypebuilder e.create ('deep_atom_reassemblet

.Seteuio ('in')

.Setmaxiosize (6, 6, 9, 9)

.Setprogressbar (Guitextures.progress_bar_arrow, FILDIRECTION.Left_TO_RIGHT)

.Setsound (gtsoundentries.arc);

});

Common method:

<<<<> "> DeClare class gTRcipTyBuilds builderbase {{{

// Specify the classification of the formula, which is useful in the LDLIB UI editor

Category (category: string): this;

// Specify the number of IO of the formula, that is, the number of grids you see in Jei

// Parameters: Number of items input slots, quantity of output slots of items, quantity of fluid input slots, and quantity of fluid output slots

Setmaxiosize (Maxinputs: Number, Maxoutputs: Number, Maxfluidinputs: Number, MaxfluidoutPuts: Number): This;;

// Specify whether the formula type is input or output energy, or both

// Parameter 1: IO Type-'in' | 'Out' | 'Both'

Seteuio (IO: IO): this;

// Specify the icon displayed on the groove in the formula (such as the icon on the grid in the chemical reaction kettle formula)

// Parameter 1: Whether it is the output slot

// Parameter 2: Whether it is a fluid

// Parameter 3: icon texture-Use Guitextures to get quickly

Setslotoverlay (isoutput: Boolean, isflum: Boolean, Slotoverlay: Iguitexture): this; // Parameter 3: Is it the last one

Setslotoverlay (isoutput: Boolean, isflum: Boolean, Islast: Boolean, Slotoverlay: IGUITEXTURE): This;;

// Set the progress bar style

// Parameter 1: Progress stripe-Use Guitextures Quickly acquire

// Parameter 2: Fill direction-Use FillDirection to get quickly

SetprogressBar (ProgressBar: ResourceTexture, MoveType: Progresstexture.FillDirection): this;

// Set the special progress bar of the steam machine

SetsteampRogressBar (ProgressBar: SteamTexture, MoveType: Progresstexture.FillDirection): this;;;

// Set the sound of the formula work

// Parameter 1: Sound-Use GTSONDENTRIES to get quickly

Setsound (sound: soundntry): this;

// Set the maximum number of information displayed in JEI (energy consumption, duration, speed, stress, super net room requirements, etc.)

SetmaxTips (MAXTOOLTIPS: Number): this;

}

machine

 gtceustartupevents.regization ('gtceu: machine', e => {{{

// Parameter 1: Machine ID

// Parameter 2: Machine type-'Steam' | 'Simple' | 'Multiblock' | 'Kinetic'

// Parameter 3 (remaining parameters): Determine situation

// Returns different builders according to the parameter 2. These builder comes from com.gregtechceu.gtceu.integration.kjs.builders.machine.machineFunctionPreSets. Create () e.create ()

})

Steam machine

 gtceustartupevents.regization ('gtceu: machine', e => {{{

// Parameter 3: Whether there is a variant of high-pressure steam-Boolean

E.create ('Test_steam_machine', 'Steam', True)

// Parameter 1: Formula type-Get the original formula type with GTRECIPETYPES or use the GET method to obtain a custom formula type

.Recipedype (gtrecipeTypes.get ('test_recipe_type'))

})

Electricity unilateral machine

 gtceustartupevents.regization ('gtceu: machine', e => {{{

// Parameter 3: The voltage level of this machine-Number-integer 0-15

E.create ('Test_electric_machine', 'Simple', GTVALUES.LV, GTVALUES.MV, GTVALUES.HV, GTVALUES.EV, GTVALUES.IV)

.Recipedype (gtrecipeTypes.get ('test_recipe_type'))

// The function of the control machine as the voltage level increases, and the capacity of the fluid slot capacity increases

// Parameter 1: Function-Function

.TankScalingFunction (Tier => Tier*3200)

})

Electricity multi -square machine

 gtceustartupevents.regization ('gtceu: machine', e => {{{

// You can get code prompts

/***@Type {Internet.multiblockmachinebuilder}

*/

Let R = E.create ('Deep_atom_reassemble_chamber', 'Multiblock');

// Set the machine block which directions to rotate

R.rotationState (rotationState.non_y_axis))

// Set multi -block structure

R.Pattern (

DEF => FactoryBlockpattern.start () // Start the construction structure

.Aisle ('ccccccc', 'p p', 'p p', 'p p', 'p p', 'p p', 'ccccccc')

.Aisle ('cdddddc', 'rrrrr', 'fffff', 'fggf', 'fffff', 'rrrrr', 'cdddddc'))

.Aisle ('cdddddc', 'rfffr', 'ftttf', 'gaaag', 'ftttf', 'rfffr', 'cdddddc'))

.aisle ('cddddddc', 'rfffr', 'ftttf', 'gatag', 'ftttf', 'rfffr', 'cdddddc'). Aisle ('cdddddc', 'RFF FR ',' ftttf ',' gaaag ','Ftttf', 'rfffr', 'cdddddc'))

.Aisle ('cdddddc', 'rrrrr', 'fffff', 'fggf', 'fffff', 'rrrrr', 'cdddddc'))

.Aisle ('ccc#ccc', 'p p', 'p p', 'p p', 'p p', 'p p', 'ccccccc's

.Where ('#', predicates.controller (predicates.blocks (def.get ())))

.Where ('d', predicates.blocks ('gtceu: atomic_casing'))

.Where ('C', Predicates.blocks ('Gtceu: Atomic_casing').

.Or (Predicates.abilities (partability.parallel_hatch) .setmaxgloballimited (1))

.Or (Predicates.autoabilities (def.Recipeypes)) // Automatically set the required block capacity (input/output of the item/fluid/energy) according to the formula type.

Cure

.Where ('P', Predicates.blocks ('Ad_ASTRA: OSTRUM_PILLAR'))

.Where ('f', predicates.blocks ('gtceu: inrt_machine_casing'))

.Where ('t', predicates.blocks ('gtceu: ptfe_pipe_casing'))

.Where ('r', predicates.blocks ('gtceu: rtm_alloy_coil_block'))

.Where ('g', predicates.blocks ('gtceu: laminated_glass'))

.Where ('a', predicates.air ()))

.Where ('', predicates.any ()))

.Build () // Complete Construction

Cure

// When the machine structure is valid, it is recommended to use the texture of various mechanical blocks to obtain the connection texture

// Parameter 1: Basic texture-ResourceLocation

// Parameter 2: The texture when valid-resourcelocation-meaning is unknown, and it seems to have no effect in practice

// Parameter 3 (omitted): Whether to dye-Boolean

.WorkableCasingRenderer ('Gtceu: Block/Casings/Gcym/Atomic_casing', 'Gtceu: Block/Multiblock/IMPLOSION_COMPRESOR', False)

// Set the appearance of the machine controller block

// Parameter 1: Block-square ID | Internet.block

.PpearanceBlock (gcymblocks.casing_atomic)

// Available formula type

// Parameter 1 (remaining parameters): formula type-GTRECIPETYPE

.Recipeypes (GTRECIPETYPES.get

// The formula adjustment function (for example, the voltage overclocking will reduce the processing time is a adjustment function)

.ReciPemodifier (gtRecipeModifiers.parallel_Hatch.apply (overClockingLogic.nn_perfect_overClock, gtRciPemodifiers.electclock)))

});

Power machine

The mechanical power module is required.You can use Platform.isloaded ('Create') to judge.

 gtceustartupevents.regization ('gtceu: machine', e => {{{

E.create ('test_kinetic_machine', 'kinetic', gtvalues.lv, gtvalues.mv, gtvalues.hv, gtvalues.ev, gtvalues.iv)

// Parameter 2: Tool prompts when applying available-Boolean

// Parameter 3: Application of the default GUI function-Boolean

.Recipedype (gtRecipeTypes.get ('test_recipe_type'), true, true)

})

Custom coil block

 Startupevents.regency ('BLOCK', E => {{

E.create ('Strange_Matter_Coil_block', 'Gtceu: Coil')

.Temperature (19200) // Temperature

.Level (20) // The maximum parallel number of industrial furnace = this value*32

. Energydiscount (8) // Energy efficiency

.Tier (8) // level

.Coilmaterial (gtmatics.get ('Strange_matter')) // Material

.Tagblock ('Forge: Mineable/Wrench'))

. Hardness (5) .requirestool (true).

. Material ('Metal')

.Texture ('kubejs: block/strange_matter_coil_block') //

})

If you want your custom coil to have the same connection texture as the native coil and the lighting effect during work. The above code is an example, you need:

A basic texture picture (resolution 16n*16n, n is an integer larger than or equal to 1): strange_matter_coil_block.png

A mcmeta file with the same name as the above file: strange_matter_coil_block.png.mcmeta

A light texture picture (16N*16N): strange_Matter_Coil_block_bloom.png

A mcmeta file with the same name as the above file: strange_matter_coil_block_block.png.mcmeta

A basic connection texture picture (32N*32N): strange_matter_coil_block_ctm.png

A light texture picture (32N*32N): strange_matter_coil_block_block_ctm.png

A mcmeta file with the same name as the above file: strange_matter_coil_block_ctm.png.mcmeta

Put them under the path you specified by using the texture () method.The following is the content of the MCMETA file.

strange_matter_Coil_block.png.mcmeta

 {{

"Ldlib": {{

"Connection": "Kubejs: Block/Strange_Matter_Coil_block_CTM"

}

}

strange_matter_Coil_block_bloom.png.mcmeta

 {{

"Ldlib": {{

"Connection": "Kubejs: Block/Strange_Matter_Coil_block_block_CTM",

"Emissive": true

},

"Shimmer": {

"Block": true

}

}

strange_matter_Coil_block_bloom_ctm.png.mcmeta

 {"shimmer": {

"Block": true

}

}