MaxNeedsSnacks / roadrunner

A general-purpose performance mod and fork of the popular "Lithium" mod made for the Forge mod loader.
GNU Lesser General Public License v3.0
24 stars 5 forks source link

Incompatibility with Create: Above and Beyond modpack #36

Closed 10935336 closed 3 years ago

10935336 commented 3 years ago

Expected Behavior

In this modpack the author has defined the following structure using kubejs. When roadrunner is not installed, the particle effect can be displayed and the recipe can work. image

Actual Behavior

After installing roadrunner, the recipe does not work properly and the particle effect is not displayed. then I get a kubejs error.

[16:47:22] [ERR ] Error occurred while handling event 'block.left_click': TypeError: Cannot find function getOpposite in object east. (server_scripts:bonkers_chemistry.js#530)

image

Reproduction Steps

  1. Installation Create: Above and Beyond 1.1 modpack
  2. Install RoadRunner-mc1.16.5-1.3.0.jar
  3. find kube.js:alchemical_ laser in jei
  4. Follow the instructions to build the structure
  5. Prepare to process the item
  6. Nothing happens

Environmental information

Minecraft Version: 1.16.5 Modpack: Create: Above and Beyond 1.1 RoadRunner version: mc1.16.5-1.3.0 Forge Version: 36.2.8 Rhino Version: rhino-forge-1605.1.4-build.67 Kubejs version: kubejs-create-1605.1.2-build.7、kubejs-forge-1605.3.18-build.152、kubejs-thermal-1605.1.4-build.2

Attachments

image Possible scripts for kubejs:

    Direction.ALL.values().forEach(face => {
        if (clickedFace == face)
            return
        let laser = block.offset(face)
        if (!laser.id.startsWith("cb_multipart:multipart"))
            return
        let te = laser.getEntity()
        if (!te)
            return
        let nbt = utils.newMap().toNBT()
        te.func_189515_b(nbt)
        let parts = nbt.func_150295_c("parts", 10)
        let valid = false
        let color = ""
        if (parts) {
            parts.forEach(part => {
                if (!part.id.endsWith("_cage_light"))
                    return
                if (part.pow == part.id.contains("inverted"))
                    return
                if (part.side != face.getOpposite().ordinal())
                    return
                valid = true
                color = part.id.replace("_inverted", "").replace("_cage_light", "").replace("projectred-illumination:", "")
            })
        }
MaxNeedsSnacks commented 3 years ago

Interesting. We do have an @Overwrite mixin on Direction.getOpposite from upstream, I wonder whether that removes Lat's @RemapForJS annotation as well...

MaxNeedsSnacks commented 3 years ago

Trying out some fixes with https://github.com/KubeJS-Mods/KubeJS/commit/2e09facd3e13bd64acf0f33248ab336d79acfa84 / https://github.com/KubeJS-Mods/Rhino/commit/c285e991514e2ed7bff0adff1c5880f9a5fe2f11, should be out on CurseForge as soon as it's merged

10935336 commented 3 years ago

Thanks for the quick fix. It works in kubejs-forge-1605.3.19-build.168 and rhino-forge-1605.1.5-build.75