Skip to content

calling getKilledByEntityStats on non-null IEntityDefinition causing FATAL #129

@Krutoy242

Description

@Krutoy242

Code:

#reloadable
for entityDef in game.entities {
  mods.zenutils.PlayerStat.getKilledByEntityStats(entityDef);
}

Error:

[SERVER_STARTED][SERVER][FATAL] [reloadable | SIDE_CLIENT]: Error executing {[0:crafttweaker|reloadable]: test.zs}: Cannot read field "field_151513_e" because the return value of "net.minecraftforge.fml.common.registry.EntityEntry.getEgg()" is null
java.lang.NullPointerException: Cannot read field "field_151513_e" because the return value of "net.minecraftforge.fml.common.registry.EntityEntry.getEgg()" is null
	at youyihj.zenutils.api.player.PlayerStat.getKilledByEntityStats(PlayerStat.java:85)
	at TestVF3ApdJ.__script__(test.zs:3)
	at __ZenMain__.run(Test)
	at youyihj.zenutils.impl.runtime.ZenUtilsTweaker.loadScriptInternal(ZenUtilsTweaker.java:283)
	at youyihj.zenutils.impl.runtime.ZenUtilsTweaker.loadScript(ZenUtilsTweaker.java:147)
	at youyihj.zenutils.impl.reload.ScriptReloader.reloadScripts(ScriptReloader.java:49)
	at youyihj.zenutils.impl.reload.ReloadCommand.reloadScripts(ReloadCommand.java:76)
	at youyihj.zenutils.impl.reload.ReloadCommand.executeCommand(ReloadCommand.java:48)
	at crafttweaker.mc1120.commands.CTChatCommand.func_184881_a(CTChatCommand.java:73)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions