-
Notifications
You must be signed in to change notification settings - Fork 12
Generating Blocks or Items based on GreatePropertyKeys
Electrolyte edited this page Dec 30, 2025
·
2 revisions
Starting from Greate 0.0.58+, you are able to generate certain blocks and/or items via GregTech's KubeJS integration. As of version 0.0.59, this works with tiered belts, shafts, cogwheels, girders, and gearboxes.
const $KineticProperty = Java.loadClass("electrolyte.greate.content.gtceu.material.KineticProperty")
GTCEuStartupEvents.registry('gtceu:material', event => {
GTMaterials.Cupronickel.setProperty(GreatePropertyKeys.KINETIC, new $KineticProperty(3, 500))
})
- The first parameter is the tier the material should use (Think GregTech tiers (ULV = 0, LV = 1, etc.))
- The second parameter is the max capacity of the material (This should not exceed the max voltage of the first parameter)
In the example above, since the tier is 3 (HV) the max capacity should not exceed 512.
const $CogwheelProperty = Java.loadClass("electrolyte.greate.content.gtceu.material.CogwheelProperty")
GTCEuStartupEvents.registry('gtceu:material', event => {
GTMaterials.Cupronickel.setProperty(GreatePropertyKeys.COGWHEEL, new $CogwheelProperty(GTMaterials.Aluminium))
})
- The parameter should be the material used on the cogwheel itself (not the shaft part)
Ex. For steel cogwheels, they use steel for the shaft part and andesite alloy for the cogwheel part
const $BeltProperty = Java.loadClass("electrolyte.greate.content.gtceu.material.BeltProperty")
GTCEuStartupEvents.registry('gtceu:material', event => {
GTMaterials.Cupronickel.setProperty(GreatePropertyKeys.BELT, new $BeltProperty([GTMaterials.Neutronium, GTMaterials.Steel], 20))
})
- The array can be any length, these are the materials of the shafts the belt can support. (Any material in this array must have a KineticProperty attached to it!)
- The 20 is the max length of the belt. This will be 20 by default if omitted.
GTMaterials.Cupronickel.setProperty(GreatePropertyKeys.BELT, new BeltProperty(List.of(GTMaterials.Neutronium, GTMaterials.Steel), 20));
GTMaterials.Cupronickel.setProperty(GreatePropertyKeys.KINETIC, new KineticProperty(3, 500));
GTMaterials.Cupronickel.setProperty(GreatePropertyKeys.COGWHEEL, new CogwheelProperty(GTMaterials.Aluminium));
You will have to add your own lang & textures. (Check assets/greate/textures/block/<material>/ for block textures & assets/greate/textures/item/ for item textures.)