forked from GregTechCEu/GregTech-Modern
-
Notifications
You must be signed in to change notification settings - Fork 0
KubeJS
Drackion edited this page Jun 8, 2023
·
52 revisions
GTCEuStartupEvents.registry('gtceu:element', event => {
event.create('test_element', 27, 177, -1, null, 'test', false);
})GTCEuStartupEvents.registry('gtceu:material_icon_set', event => {
event.create('test').parent(GTMaterialIconSet.SHINY)
})Kubejs Items:
kubejs\assets\gtceu\textures\item\material_sets\test\
kubejs\assets\gtceu\models\item\material_sets\test\
Kubejs Blocks/Frames:
kubejs\assets\gtceu\textures\block\material_sets\test\
GTCEuStartupEvents.registry('gtceu:material', event => {
event.create("test")
.ingot(1)
.element(GTElements.get("test_element"))
.color(0x2176ff).iconSet(GTMaterialIconSet.METALLIC)
.flags(GTMaterialFlags.GENERATE_PLATE, GTMaterialFlags.GENERATE_ROD, GTMaterialFlags.GENERATE_FRAME)
})Material Flags
- GENERATE_BOLT_SCREW
- GENERATE_DENSE
- GENERATE_FINE_WIRE
- GENERATE_FOIL
- GENERATE_FRAME
- GENERATE_GEAR
- GENERATE_LENS
- GENERATE_LONG_ROD
- GENERATE_PLATE
- GENERATE_RING
- GENERATE_ROD
- GENERATE_ROTOR
- GENERATE_ROUND
- GENERATE_SMALL_GEAR
- GENERATE_SPRING
- GENERATE_SPRING_SMALL
Icon Sets
- BRIGHT
- CERTUS
- DIAMOND
- DULL
- EMERALD
- FINE
- FLINT
- FLUID
- GAS
- GEM_HORIZONTAL
- GEM_VERTICAL
- GLASS
- LAPIS
- LIGNITE
- MAGNETIC
- METALLIC
- NETHERSTAR
- OPAL
- QUARTZ
- ROUGH
- RUBY
- SAND
- SHINY
- WOOD
- Custom Icon Sets
GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
event.create("test_recipe_type")
.category('test') //Used in the GTlib / LDlib Recipe type ui editor
.setEUIO("IN")
.setMaxIOSize(3, 4, 2, 0) //Min Input Slots, Max Output Slots, Min Fluid Input Slots, Max Fluid Input Slots
.setSlotOverlay(false, false, GuiTextures.SOLIDIFIER_OVERLAY)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.COOLING);
if (GTCEu.isCreateLoaded()) {
event.create("test_kinetic_recipe_type", "kinetic") // name, category
.setMaxIOSize(3, 1, 2, 1)
.setSlotOverlay(false, false, GuiTextures.DUST_OVERLAY)
.setSlotOverlay(true, false, GuiTextures.DUST_OVERLAY)
.setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
.setSound(GTSoundEntries.FIRE)
.setMaxConditions(1) // if you may add a rpm condition, it will help adjust JEI layout
}
})GTCEuStartupEvents.registry('gtceu:machine', event => {
//steam
event.create("test_simple_steam_machine", "steam").recipeType("test_recipe_type")
//electric
event.create("test_electric", "simple")
.recipeType("test_recipe_type")
.tankScalingFunction(tier => 3200)
.tiers(GTValues.LV, GTValues.MV, GTValues.HV, GTValues.EV, GTValues.IV);
//multi
event.create("test_simple_multiblock", "multiblock")
.rotationState(RotationState.NON_Y_AXIS)
.recipeType("test_recipe_type")
.appearanceBlock(GTBlocks.CASING_STAINLESS_CLEAN)
.pattern(definition => FactoryBlockPattern.start()
.aisle("BBB", "XXX", "XXX")
.aisle("BBB", "X#X", "XMX")
.aisle("BBB", "XSX", "XXX")
.where('S', Predicates.controller(Predicates.blocks(definition.get())))
.where('B', Predicates.blocks("minecraft:stone"))
.where('X', Predicates.blocks(GTBlocks.CASING_STAINLESS_CLEAN.get()).setMinGlobalLimited(5)
.or(Predicates.autoAbilities(definition.getRecipeType())))
.where('M', Predicates.abilities(PartAbility.MUFFLER).setExactLimit(1))
.where('#', Predicates.air())
.build())
.workableCasingRenderer("gtceu:block/casings/solid/machine_casing_clean_stainless_steel",
"gtceu:block/multiblock/implosion_compressor", false)
.register();
})StartupEvents.registry('block', event => {
event.create('infinity_coil_block', 'gtceu:coil')
.temperature(100)
.level(0)
.energyDiscount(0)
.tier(10)
.coilMaterial(GTMaterials.get('infinity'))
.texture('kubejs:block/example_block')
.tagBlock('forge:mineable/wrench')
.hardness(5)
.requiresTool(true)
.material('metal')
.model('kubejs:block/example_block')
})###Custom Ore "Stone" Types
event.create('bedrock', 'ore')
.stateSupplier(() => Blocks.BEDROCK.defaultBlockState())
.material(Material.STONE)
.color(MaterialColor.STONE)
.sound(SoundType.STONE)
.unificationEnabled(true)
.materialIconType(GTMaterialIconType.ore)
.generationCondition(ItemGenerationCondition.hasOreProperty);ServerEvents.recipes(event => {
//Note if on v1.0.3 use:event.recipes.gtceu.gt_recipe_serializer('alloy_smelter', 'recipe_id') instead
event.recipes.gtceu.alloy_smelter('recipe_id')
.inputItems('gtceu:wire_single.copper', 'gtceu:wire_single.nickel')
.outputItems('2x gtceu:wire_single.cupronickel')
.duration(120)
.EUt(16)
})