Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

[Modcompat] Unexpected Error Issue w/ Vampirism Mod in Forge

BaiterYamato opened this issue ยท 1 comments

commented

Versions

Issue Description

When I try to execute the command "/npc create" from taterzens the console give a error with vampirism and i cant create the npc

Reproduce Steps

Create a world in creative mode and use the command /npc create

Additional Information

[18:34:41] [Server thread/ERROR] [de.te.va.pl.ModPlayerEventHandler/]: Failed to attach capabilities to player. Player: [!!!org.samo_lego.taterzens.npc.TaterzenNPC$1@54c2f826=>java.lang.NullPointerException:null!!!]

 

[18:34:41] [Server thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: org.samo_lego.taterzens.npc.TaterzenNPC$1 cannot be cast to net.minecraft.entity.player.ServerPlayerEntity
Index: 2
Listeners:
0: NORMAL
1: ASM: de.teamlapen.vampirism.core.ModEventHandler@4100bff0 onAttachCapabilityWorld(Lnet/minecraftforge/event/AttachCapabilitiesEvent;)V
2: ASM: de.teamlapen.vampirism.player.ModPlayerEventHandler@4533f87e onAttachCapability(Lnet/minecraftforge/event/AttachCapabilitiesEvent;)V
3: ASM: de.teamlapen.vampirism.entity.ModEntityEventHandler@6e3cc8a5 onAttachCapabilityEntity(Lnet/minecraftforge/event/AttachCapabilitiesEvent;)V
4: ASM: de.teamlapen.werewolves.player.ModPlayerEventHandler@5b116dd0 onAttachCapability(Lnet/minecraftforge/event/AttachCapabilitiesEvent;)V
java.lang.ClassCastException: org.samo_lego.taterzens.npc.TaterzenNPC$1 cannot be cast to net.minecraft.entity.player.ServerPlayerEntity
at de.teamlapen.vampirism.player.TaskManager.(TaskManager.java:61)
at de.teamlapen.vampirism.player.VampirismPlayer.(VampirismPlayer.java:32)
at de.teamlapen.vampirism.player.vampire.VampirePlayer.(VampirePlayer.java:168)
at de.teamlapen.vampirism.player.vampire.VampirePlayer$1.(VampirePlayer.java:128)
at de.teamlapen.vampirism.player.vampire.VampirePlayer.createNewCapability(VampirePlayer.java:126)
at de.teamlapen.vampirism.player.ModPlayerEventHandler.onAttachCapability(ModPlayerEventHandler.java:94)
at net.minecraftforge.eventbus.ASMEventHandler_101_ModPlayerEventHandler_onAttachCapability_AttachCapabilitiesEvent.invoke(.dynamic)
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:589)
at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:583)
at net.minecraftforge.common.capabilities.CapabilityProvider.gatherCapabilities(CapabilityProvider.java:48)
at net.minecraftforge.common.capabilities.CapabilityProvider.gatherCapabilities(CapabilityProvider.java:44)
at net.minecraft.entity.Entity.(Entity.java:221)
at net.minecraft.entity.LivingEntity.(LivingEntity.java:205)
at net.minecraft.entity.player.PlayerEntity.(PlayerEntity.java:159)
at org.samo_lego.taterzens.npc.TaterzenNPC$1.(TaterzenNPC.java:153)
at org.samo_lego.taterzens.npc.TaterzenNPC.(TaterzenNPC.java:153)
at org.samo_lego.taterzens.api.TaterzensAPI.createTaterzen(TaterzensAPI.java:129)
at org.samo_lego.taterzens.api.TaterzensAPI.createTaterzen(TaterzensAPI.java:148)
at org.samo_lego.taterzens.commands.NpcCommand.spawnTaterzen(NpcCommand.java:1225)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262)
at net.minecraft.command.Commands.func_197059_a(Commands.java:217)
at net.minecraft.network.play.ServerPlayNetHandler.func_147361_d(ServerPlayNetHandler.java:1119)
at net.minecraft.network.play.ServerPlayNetHandler.func_244548_c(ServerPlayNetHandler.java:1102)
at net.minecraft.network.play.ServerPlayNetHandler.func_147354_a(ServerPlayNetHandler.java:1081)
at net.minecraft.network.play.client.CChatMessagePacket.func_148833_a(SourceFile:36)
at net.minecraft.network.play.client.CChatMessagePacket.func_148833_a(SourceFile:9)
at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21)
at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18)
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144)
at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23)
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:734)
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:159)
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118)
at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:717)
at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:711)
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127)
at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:697)
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:646)
at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232)
at java.lang.Thread.run(Unknown Source)

 

[18:34:41] [Render thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Client
java.lang.IllegalArgumentException: A team with the name '' already exists!
at net.minecraft.scoreboard.Scoreboard.func_96527_f(SourceFile:188) ~[?:?] {re:classloading}
at net.minecraft.client.network.play.ClientPlayNetHandler.func_147247_a(ClientPlayNetHandler.java:1964) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.network.play.server.STeamsPacket.func_148833_a(SourceFile:122) ~[?:?] {re:classloading,re:mixin}
at net.minecraft.network.play.server.STeamsPacket.func_148833_a(SourceFile:16) ~[?:?] {re:classloading,re:mixin}
at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?] {re:classloading}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?] {re:classloading,re:mixin}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(SourceFile:103) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:947) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:184) ~[minecraft-1.16.5-client.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_281] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_281] {}
at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.1.24-launcher.jar:36.1] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {}
at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:50) [ForgeWrapper-1.4.2.jar:?] {}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_281] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_281] {}
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] {}
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] {}
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] {}
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] {}

 

[18:34:41] [Render thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Client
java.lang.IllegalStateException: Player is either on another team or not on any team. Cannot remove from team ''.
at net.minecraft.scoreboard.Scoreboard.func_96512_b(SourceFile:236) ~[?:?] {re:classloading}
at net.minecraft.client.network.play.ClientPlayNetHandler.func_147247_a(ClientPlayNetHandler.java:1995) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.network.play.server.STeamsPacket.func_148833_a(SourceFile:122) ~[?:?] {re:classloading,re:mixin}
at net.minecraft.network.play.server.STeamsPacket.func_148833_a(SourceFile:16) ~[?:?] {re:classloading,re:mixin}
at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?] {re:classloading}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?] {re:classloading,re:mixin}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(SourceFile:103) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:947) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:184) ~[minecraft-1.16.5-client.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_281] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_281] {}
at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.1.24-launcher.jar:36.1] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {}
at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:50) [ForgeWrapper-1.4.2.jar:?] {}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_281] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_281] {}
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_281] {}
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] {}
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] {}
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] {}
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] {}

commented

Thank you for reporting.
@Cheaterpaul
we should probably check instanceof instead of !remote (and just directly pass the player instance)

this.player = (ServerPlayerEntity) factionPlayer.getRepresentingPlayer();

if(!player.getEntityWorld().isRemote()) {