Setting up workspace and mixins

I’m trying to setup mixins and my project.

annotation processor setting:

code :

@Mixin(EntityPlayerMP.class)
public class MixinNPlayer implements INPlayer {
    @Shadow /* just only for a test + implemented getter from the interface*/
    private String translator;

if i try to typecast im getting exception - EntityPlayerMP cannot be cast to INPlayer and also folder target/generated-sources/annotations is empty
during compilation im getting following warning:
Warning:java: The following options were not recognized by any processor: ‘[reobfSrgFile]’

@Mumfrey would be able to help.

You’ll have to set up your CoreMod to replicate what is being done here.

If you’re trying to use Mixins with a plugin, plugins are not ever going to be able to use Mixins, unless they become a CoreMod, at which point, they are a forge mod.

well then… im trying to setup a coremod now but i have problem with gradle

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Test'.
> You must set the Minecraft Version!
   > java.lang.NullPointerException (no error message)

I’ve been googling like a crazy but i could not find where am i supposed to set mc version and running build script with --stacktrace argument was not very helpful.

https://github.com/NeumimTo/Coremod

You must learn how to use ForgeGradle, there’s even documentation for it now
http://forgegradle.readthedocs.org/en/latest/
You need to set the version in the minecraft{} block
(See how sponge does it here)

im trying to add the minecraft block into build.gradle file

minecraft.setVersion('1.8')

minecraft.version = '1.8'

minecraft {
version = "1.8"
}

but everything ended with exception

* What went wrong:
A problem occurred evaluating root project 'Test'.

Invalid version notation, or version doesnt exist! The following are valid not
ations. Buildnumber, version, version-branch, mcversion-version-branch, and pomo
tion

That’s because you’re not specifying a valid version as said in the error message.
It has to be a valid forge version, I’m sure the ForgeGradle docs mention that, in fact, it does.
An example version is 1.8-11.14.1.1371

1 Like