GregTechCEu Modern

GregTechCEu Modern

6M Downloads

KubeJS Generator machine type issues

Deepacat opened this issue ยท 4 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

1.5.4

Minecraft Version

1.20.1

Recipe Viewer Installed

EMI

Environment

Singleplayer

Cross-Mod Interaction

No

Other Installed Mods

Gregtech community pack + gt 1.5.4

Expected Behavior

All tiers of a machine using the generator machine type in kubeJS registry are registered, and UI input slots are usable when using auto generated UI ( .recipeType('test_generator_recipe_type', true, true) )

Actual Behavior

Using this machine type for registered machines, causes extra or some machines to not be registered in weird cases (Setting LV, MV, and HV will cause LV to not be registered, while registering LV will do ULV, and LV)

Also using .recipeType('test_generator_recipe_type', true, true) (true, true) at the end of a recipeType to inherit a generated user interface from the recipe type leaves the input slot un-interactable, while you can still input to the generator and it functions via external means such as pipes or a hopper

Steps to Reproduce

Registry

GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
    event.create('test_generator_recipe_type')
        .setEUIO('out')
        .setMaxIOSize(1, 0, 0, 0)
        .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
        .setSound(GTSoundEntries.ARC)
        .setMaxTooltips(6)
})
GTCEuStartupEvents.registry('gtceu:machine', event => {
// Issue in 'generator' machine type
    event.create('test_generator', 'generator', GTValues.LV, GTValues.MV, GTValues.HV)
// No UI generated
        .recipeType('test_generator_recipe_type')
// UI generated, slots are not interactable in UI
        .recipeType('test_generator_recipe_type', true, true)
        .tankScalingFunction(tier => tier * 3200)
})`

Server (Recipes work fine)

ServerEvents.recipes(e => {
    e.recipes.gtceu.test_generator_recipe_type('kubejs:gtceu/test/coal_tag_burning')
        .itemInputs('#minecraft:coals')
        .EUt(-32)
        .duration(200)
    e.recipes.gtceu.test_generator_recipe_type('kubejs:gtceu/test/charcoal_burning')
        .itemInputs('minecraft:charcoal')
        .EUt(-32)
        .duration(200)
})

Additional Information

event.create('test_generator', 'generator', GTValues.LV, GTValues.MV, GTValues.HV)

javaw_BamJHENmWZ

commented

test again with new system?

commented

Works fine aside from not being able to use item slot for generator inputs, it always just forced the slots seemingly
javaw_AY3kaodkQZ

GTCEuStartupEvents.registry('gtceu:recipe_type', event => {
    event.create('test_generator_recipe_type')
        .setEUIO('out')
// set only item input, generates tank anyways
        .setMaxIOSize(1, 0, 0, 0)
        .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT)
        .setSound(GTSoundEntries.ARC)
        .setMaxTooltips(6)
})

GTCEuStartupEvents.registry('gtceu:machine', event => {
	event.create('test_generator', 'generator')
        .tiers(GTValues.ULV)
        .definition((tier, builder) => (
            builder
                .langValue(GTValues.VLVH[tier] + " test generator")
                .recipeType('test_generator_recipe_type')
                .workableTieredHullRenderer('gtceu:block/machines/combustion')
        ))
})```
commented

nvm natural stupidity it works fine

commented
javaw_cvUlfrIqsh.mp4

splendid