Arclight
Arclight copied to clipboard
[1.20.1] EntityType Returns Null Error
I have confirmed that ...
- [X] Arclight is up to date
- [X] all dependencies are installed
- [X] all plugins and mods are up to date
- [X] unable to reproduce in Spigot
- [X] unable to reproduce in Forge
Arclight version
arclight-forge-1.20.1-1.0.5-SNAPSHOT
OS & Java versions
Ubuntu
Plugins and Mods
MythicMobs
Description
When trying to create a new mythicmob with mob type set to forge entity, mythicmobs logs an error
Step to reproduce
No response
Logs
[11:55:30 ERROR] [STDERR]: java.lang.NullPointerException: Cannot invoke "io.izzel.arclight.common.bridge.bukkit.EntityTypeBridge.bridge$entityFactory()" because "entityType" is null [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.craftbukkit.v1_20_R1.CraftRegionAccessor.handler$bhc000$arclight$useFactory(CraftRegionAccessorMixin.java:1068) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.craftbukkit.v1_20_R1.CraftRegionAccessor.spawnEntity(CraftRegionAccessorMixin.java) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.bukkit.adapters.BukkitEntityType.spawnEntity(BukkitEntityType.java:70) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.bukkit.entities.BukkitCustom.spawn(BukkitCustom.java:37) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.bukkit.adapters.BukkitEntityType.spawn(BukkitEntityType.java:39) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.core.mobs.MobType.spawn(MobType.java:843) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.core.mobs.MobExecutor.spawnMob(MobExecutor.java:575) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.core.mobs.MobExecutor.spawnMob(MobExecutor.java:568) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.bukkit.commands.mobs.SpawnCommand.onCommand(SpawnCommand.java:161) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.bukkit.utils.commands.Command.onCommand(Command.java:64) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.bukkit.utils.commands.Command.onCommand(Command.java:55) [11:55:30 ERROR] [STDERR]: at io.lumine.mythic.bukkit.utils.commands.Command.onCommand(Command.java:55) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServerMixin.java:877) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.craftbukkit.v1_20_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:50) [11:55:30 ERROR] [STDERR]: at MC-BOOTSTRAP/[email protected]/com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.commands.Commands.m_242674_(CommandsMixin.java:257) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_246958_(ServerPlayNetHandlerMixin.java:2853) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_244885_(ServerPlayNetHandlerMixin.java:1223) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18693_(BlockableEventLoop.java:67) [11:55:30 ERROR] [STDERR]: at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.TickTask.run(TickTask.java:18) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServerMixin.java:770) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServerMixin.java:161) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_129961_(MinecraftServerMixin.java:753) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_7245_(MinecraftServerMixin.java:747) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130012_(MinecraftServerMixin.java:732) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServerMixin.java:2074) [11:55:30 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServerMixin.java:251) [11:55:30 ERROR] [STDERR]: at java.base/java.lang.Thread.run(Thread.java:842)
Server pack link (Optional)
No response
more context for later fixes/discussions
looks like entityType in spawnEntity function in CraftRegionAccessor.java returns null
there is a mixin for craftregionaccessor that uses entitytypebridge but it does not work I assume
https://github.com/IzzelAliz/Arclight/blob/9931895b6b67edef1f3e325c372d017a9d56e9ff/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftRegionAccessorMixin.java#L25C1-L31C6
This is the code from MythicMobs decompiled through recaf for research purposes
In BukkitEntityType.java in MythicMobs plugin, this is the spawnEntity function they use. Other sources maybe can help:
List contiunes and here is the BukkitAllay for example:
Will hope this will help to fix the issue.
MythicMobs uses loc.getWorld().spawnEntity to spawn entities, maybe that's the issue?
Still no idea where to begin to fix will leave it to @IzzelAliz.
I think mobtypes in mythicmobs are hardcoded so it needs special work so I will not going to continue this issue till If there is a fix possible
similar error on denizen too
I am now sure it is not about mythicmobs being hardcoded, mythicmobs has their own CustomMob system if using unknown bukkitentitytype and will use that, but now I am sure there is a bug going on in Arclight that prevents mobs to being spawn and returning null.
Changed title because it seems it is not only with mythicmobs.
It seems denizen error is not a valid error, it is just I am using turkish computer that messes up "i" & "I" characters, but mythicmobs error still exists.
for more clarifiction, mythicmobs entitytype returns null denizen entitytype returns entitytype of the mob.
Found the problem, so basicly mythicmobs gets "MythicMobs Mob Type" from mobs config file;
and gets entitytype from their name in here; (if name doesn't exist it tries to get it from Id)
so that means arclight does not return mobtype using;
it seems these 2 functions are deprecated so we need to write a mixin for entitytype I guess
with some more experiment I am now sure this all cause because fromname returns null.
This is all I got @IzzelAliz I will leave rest to you because I have no idea how to fix.
Any word on this being fixed? I feel this mod is a valid reason someone would want to run an ArcLight server.