Camera Mod

Camera Mod

18M Downloads

Camera Mod Implementation Mixin Issue

VeguiDev opened this issue ยท 2 comments

commented

Bug description
When run the debug client on development the minecraft startup fails.

Steps to reproduce the issue

  1. Clone this repo 'farfania-camera-app'
  2. And execute this command './gradlew runClient'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Log files
The log file https://pastebin.com/U47U5nQ7.

Versions

  • Minecraft version 1.16.5
  • Forge version 36.2.39
  • Mod version 1.0.14

Other mods
In this development enviroment are installed as dependency the mod EyeMod and the Camera Mod.

commented

Sorry I will only accept issues with the actual mod. Not the development environment of a fork.

commented

I know this is very old, but this is the thread that came up when I searched for "mixin" on this mod.

dependencies {
    minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
    implementation fg.deobf("maven.modrinth:camera-mod:forge-1.19.2-1.0.14") // Also pulls in JEI and Jade
}

I added camera-mod as a dependency for my own mod, and I was seeing this error:

[11:57:36] [pool-3-thread-1/FATAL] [mixin/]: Mixin apply failed assets/camera/camera.mixins.json:LecternTileEntityMixin -> net.minecraft.world.level.block.entity.LecternBlockEntity: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException Critical injection failure: @Inject annotation on hasBook could not find any targets matching 'Lnet/minecraft/world/level/block/entity/LecternBlockEntity;m_59567_()Z' in net.minecraft.world.level.block.entity.LecternBlockEntity. Using refmap camera.refmap.json [PREINJECT Applicator Phase -> assets/camera/camera.mixins.json:LecternTileEntityMixin -> Prepare Injections ->  -> handler$zza000$hasBook(Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Parse]

This happens because fg.deobf and Mixins do not get along. But it can be overcome by adding this to build.grade:

minecraft {
    runs {
        client {
            property 'mixin.env.remapRefMap', 'true'
            property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
        }
    }
}

then re-run genIntellijRuns and refresh gradle project

Source: SpongePowered/Mixin#462 (comment)