Caught exception from nmsot (java.lang.NoSuchFieldError: ENTITIES)
GraysonAdams opened this issue ยท 3 comments
When I add the following line to my backlist rules: "mob:creeper & chance:0.50"
I get: Server thread/ERROR [FML]: Caught exception from nmsot (java.lang.NoSuchFieldError: ENTITIES)
What am I doing wrong? This is correct syntax, no?
25.10 15:12:05 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231) ~[custom.jar:?]
25.10 15:12:05 [Server] INFO at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253) ~[custom.jar:?]
25.10 15:12:05 [Server] INFO at com.google.common.eventbus.EventBus.post(EventBus.java:217) ~[minecraft_server.1.12.2.jar:?]
25.10 15:12:05 [Server] INFO at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) ~[minecraft_server.1.12.2.jar:?]
25.10 15:12:05 [Server] INFO at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) ~[minecraft_server.1.12.2.jar:?]
25.10 15:12:05 [Server] INFO at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) ~[minecraft_server.1.12.2.jar:?]
25.10 15:12:05 [Server] INFO at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) ~[minecraft_server.1.12.2.jar:?]
25.10 15:12:05 [Server] INFO at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) ~[minecraft_server.1.12.2.jar:?]
25.10 15:12:05 [Server] INFO at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) ~[minecraft_server.1.12.2.jar:?]
25.10 15:12:05 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) ~[?:?]
25.10 15:12:05 [Server] INFO at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:606) ~[custom.jar:?]
25.10 15:12:05 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
25.10 15:12:05 [Server] INFO at com.mmyzd.nmsot.NoMobSpawningOnTrees.initialize(NoMobSpawningOnTrees.java:59) ~[NoMobSpawningOnTrees.class:?]
25.10 15:12:05 [Server] INFO at com.mmyzd.nmsot.rule.RuleSet.<init>(RuleSet.java:40) ~[RuleSet.class:?]
25.10 15:12:05 [Server] INFO at com.mmyzd.nmsot.rule.RuleSet.expr(RuleSet.java:122) ~[RuleSet.class:?]
25.10 15:12:05 [Server] INFO at com.mmyzd.nmsot.rule.RuleSet.term(RuleSet.java:139) ~[RuleSet.class:?]
25.10 15:12:05 [Server] INFO at com.mmyzd.nmsot.rule.RuleSet.factor(RuleSet.java:173) ~[RuleSet.class:?]
25.10 15:12:05 [Server] INFO at com.mmyzd.nmsot.rule.RuleMob.<init>(RuleMob.java:30) ~[RuleMob.class:?]
25.10 15:12:05 [Server] INFO Caused by: java.lang.NoSuchFieldError: ENTITIES
25.10 15:12:05 [Server] INFO net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from No Mob Spawning on Trees (nmsot)
25.10 15:12:05 [Server] Server thread/ERROR Encountered an unexpected exception
25.10 15:12:05 [Server] Server thread/ERROR [FML]: Caught exception from nmsot (java.lang.NoSuchFieldError: ENTITIES)```
I can confirm this issue.
No matter how I type in a mobs "name" (however I'm trying this on a client and with a modded mob):
@biome:ice_flats, mob:grimoireofgaia:banshee, weight:300
@biome:ice_flats, mob:grimoireofgaia.banshee, weight:300
@biome:ice_flats, mob:banshee, weight:300
@biome:ice_flats, mob:gaia.entity.monster.EntityGaiaBanshee, weight:300
All result in the same error, so I have no idea which one is correct.
https://gist.github.com/HellishINC/54810b6011f9739937ceb8aaa3985bc6
Having a similar issue with a set of rules I used in previous versions. Something in the mod broke when it was ported to 1.12.x.
Rule example, which worked in previous versions:
dim:0 & mob:EntityCreeper & chance:0.5
Edit: I'm a bit rusty on my Java, and never coded a Forge mod, so I might be totally wrong on this. Looking into the exception, there's a problem on RuleMob, line 30.
Looking into the Forge source code, ENTITIES has no "getValues()" but a "getValue()". So to get the list of mobs, there should be an iteration of the registry (an example is the getEntry function in EntityRegistry, line 355, I think).
It could also be that the namespace is not correctly imported. Or, it could be that the version of Forge used to develop version 1.2.1 of NMSOT has become obsolete. There seems to have been a change in how registry classes work.
Seems like this was addressed in the closed ticket #13. I hadn't seen it.