So, I just got Millenaire quests unlocked, and built my first village - yay.
However, now my server is spamming the following, many times a second:
Code:
ERROR: MLEntityGenericAsymmFemale@: Frida Bernhard/812543047951953408/net.minecraft.world.WorldServer@4703402f: Could not register as mw is null
over and over and over.
A search suggests this is a common Millenaire problem, but no solution, and apparently no interest from the mod developer on fixing it.
This is going to be a server breaker, given the speed at which my disk is filling with these messages... no way of getting ridding it short of removing Millenaire from the pack?
Update: so, given that Millenaire appears to work OK despite the error messages, I just want to silence it. There's no source code available, so... time for a spot of bytecode editing. I have succeeded in modifying the mod to ditch that error. I can't really redistribute the modified JAR, since 1) it's probably not legal to do so, and 2) you don't want to be accepting modified JARs from just anyone
So, if anyone is suffering from this problem and needs a fix, here's some instructions on how to tweak the JAR. Note: I assume no responsibility if your world eats itself or your server subsequently catches fire!
- I'm using ReJ, a Java-based Java bytecode editor. You can get it from Sourceforge: http://rejava.sourceforge.net
- Make a safe copy of millenaire-6.0.0.jar before you start (it's in mods/ on your server installation), and work on that copy.
- Extract and run Rej: java -jar rej.jar
- In ReJ, open up your copied millenaire-6.0.0.jar file, and navigate down to org/millenaire/common. Expand that, and open MillVillager.class
- Now you'll see a bunch of Java bytecode. Don't panic. Search for "mw is null". You should now see some code like this:
Code:
130 getfield MillWorld MillVillager.mw
133 ifnonnull label_144
136 aload_0 this
137 ldc_w String Constant "Could not register as mw is null"
140 invokestatic void MLN.error(Object, String)
143 return
We need to remove lines 136, 137 & 140 (they're not strictly line numbers, but that's not important for our purposes right now). Just select each line, and press Remove. Should look like this when you're done:
Code:
130 getfield MillWorld MillVillager.mw
133 ifnonnull label_144
136 return
Now press Save As..., choose a new temporary filename and save your modified JAR (note: pressing Save doesn't appear to work well - save a new JAR with Save As...).
You should have a quietened down Millenaire mod at this point, so copy your newly saved file back into your server mods/ directory, ensuring the original millenaire-6.0.0.jar is moved out of the way. And be sure to keep the original JAR in case of problems!
Also, it should only be necessary to modify this on the server for SMP installations. Clients don't need the modified JAR.