[SOLVED]Running sponge in development mode?

I am trying to run sponge as a forge dependency. But they way sponge is made with mixins doesn’t allow me to run it. Mixins try to find the obfuscated fields, while a forge development doesn’t has those.

ERROR:

[mixin]: Mixin failed applying mixins.sponge.core.json:server.MixinMinecraftServer -> net.minecraft.server.MinecraftServer: org.spongepowered.asm.mixin.transformer.InvalidMixinException Shadow field field_71315_w was not located in the target class

SRG Location:

FD: net/minecraft/server/MinecraftServer/tickCounter net/minecraft/server/MinecraftServer/field_71315_w

Are their any run parameters I can use to disable the obfuscation in mixins? (For so far I understood this)

(pls note I am cracking my brain 4 days on this already, so please read what I wrote. I know that sponge isn’t in a usable state yet)

Quite the contrary. Everything isn’t implemented, but if you’re using it correctly, it most certainly runs.

Ik about that :blush:. I just placed that to make sure people that actually know this should post.

But I think @mumfrey is the only one that can help me out here :worried:.

I don’t understand what you’re actually trying to do. What do you mean by “as a forge dependency”.

Like this: PacketLib/build.gradle at master · thomas15v/PacketLib · GitHub.

At some point, @AbrarSyed is going to finish the Sponge SDK which will provide a workspace ready made for sponge plugin development (much like forge provides a workspace)

The way I have configured my environment is to have the Sponge project in eclipse and make a plugin project depend on Sponge for launching. That will provide you with a obfuscated environment to work with.

The problem with that is that I don’t need a plugin SDK workspace. But more a Forge/SpongeMod Workspace. Its the same as writing a mod and using the buildcraft API to get Containers pipe attachable. But that doesn’t work with sponge yet.

Could it be that I need to use Eclipse ? Mixin/AnnotatedMixins.java at master · SpongePowered/Mixin · GitHub

What the SDK im building is
It is well known that you can make a sponge plugin using just the spongeAPI. The problem with this however is that it doesnt allow you to test your plugin because that requires a whole SPonge implementation. This is where teh SDK comes in. It is essentially a standard forge mod development workspace with the Sponge implementation as a dependency + anything extra necessary for that to work as expected.

etc…
Whats taking the SDK so long to come out?? me being lazy… very lazy… and generally busy with other things. However it is almost exactly what you are looking for.
As for what you are doing wrong, im not sure… but its obviously not right, or it would be working. Sorry, I cant really offer any advice on this.

2 Likes

Thats fine :smile:. But I won’t give up (yet). I am reading through the gradle documentation atm … . If I find it (what is probably very unlikely), I will explain it here to.

EDIT:

GOT IT TO WORK !!!
Thanks people :smiley:. Basicly a compiled sponge doesn’t work. But if you let gradle handle it as a subproject it goes mutch better.

1 Like

This doesn’t even make sense. Methinks it was an entirely different problem altogether that you solved without realizing it.

1 Like

@FerusGrim Dont be so quick to condemn people.

Its very possible that the mixins dont work so well using the dev jar, I dont know anyone thats tried that except this dude here. We might have to do some magic to get this working correctly. And from the paste of his build.gradle (albiet, a quick look-over), it seemd as though he had all the important parts there, especially the special Mixin AP arguments and stuff…

Considering the most recent build is passing CI…

Great, the project builds, great. I dont remember us testing the workingness of the dev jar though… so in this context the CI status is irrelevant.

I assumed the error in the OP was a compilation error; in which case it would definitely be relevant.

AH yes, fair enough.

The error he got however was at runtime. There is no reason to compile sponge again as its already compiled in the dev jar. In fact the fix for his issue was to compile Sponge alongside his project as a subProject. Why? I still have no idea… its weird.

2 Likes

I have a clue why this works. I think that the mixin library detects when it is a jar or a class file. When its a jar it will read the mappings of the deobfuscation_data-<version>.lzma file from the forgebin. When its just a bunch classes it will ignore that and work with an deobfuscation workspace. I don’t know where this process happens in mixins (thats why I tagged mumfrey), actually their is a very good change this doesn’t even happens in mixins at all. It could be that forge “fools” mixins when it tries to access a field.

EDIT:
I just realised something. I know that if you work with mod dependencies in forge. You have to do setupdecompworkspace. But meaby for sponge setupdevworkspace would work, but the only problem with that is that setupdevworkspace simply doesn’t work for me. For some unknow reason its gives a http denied when I the script wants to download something from the server. Meaby belgium/my_ip_range is blacklisted on the server :stuck_out_tongue:, no idea xD.

how can i remove messages

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)