Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

[Bug] Vampire Baron do not drop Pure Blood (ClassCastException)

Kiliatos opened this issue ยท 1 comments

commented

Versions

  • Minecraft: 1.14.4
  • Forge: 28.1.45
  • Vampirism: Vampirism-1.14.4-1.6.0-alpha+20191013-2127

Issue Description

After slaying some Vampire Barons on our Server we never found any Pure Blood, instead the server logs a ClassCastException.

Reproduce Steps

Kill a Vampire Baron in the Vampire Forest.

Additional Information

[Server thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Server
java.lang.ClassCastException: net.minecraft.world.storage.loot.LootParameter cannot be cast to de.teamlapen.vampirism.api.difficulty.IAdjustableLevel
	at de.teamlapen.vampirism.world.loot.AdjustableLevelCondition.test(AdjustableLevelCondition.java:25) ~[?:1.6.0-alpha+20191013-2127]
	at de.teamlapen.vampirism.world.loot.AdjustableLevelCondition.test(AdjustableLevelCondition.java:13) ~[?:1.6.0-alpha+20191013-2127]
	at java.util.function.Predicate.lambda$and$0(Predicate.java:69) ~[?:1.8.0_221]
	at net.minecraft.world.storage.loot.LootPool.func_216091_a(LootPool.java:87) ~[?:?]
	at net.minecraft.world.storage.loot.LootTable.func_216114_a(LootTable.java:70) ~[?:?]
	at net.minecraft.world.storage.loot.LootTable.func_216120_b(LootTable.java:81) ~[?:?]
	at net.minecraft.entity.LivingEntity.func_213354_a(LivingEntity.java:1172) ~[?:?]
	at net.minecraft.entity.MobEntity.func_213354_a(MobEntity.java:426) ~[?:?]
	at net.minecraft.entity.LivingEntity.func_213345_d(LivingEntity.java:1147) ~[?:?]
	at net.minecraft.entity.LivingEntity.func_70645_a(LivingEntity.java:1115) ~[?:?]
	at de.teamlapen.vampirism.entity.vampire.VampireBaseEntity.func_70645_a(VampireBaseEntity.java:212) ~[?:1.6.0-alpha+20191013-2127]
	at net.minecraft.entity.LivingEntity.func_70097_a(LivingEntity.java:973) ~[?:?]
	at de.teamlapen.vampirism.entity.vampire.VampireBaseEntity.func_70097_a(VampireBaseEntity.java:103) ~[?:1.6.0-alpha+20191013-2127]
	at de.teamlapen.vampirism.entity.vampire.VampireBaronEntity.func_70097_a(VampireBaronEntity.java:90) ~[?:1.6.0-alpha+20191013-2127]
	at de.teamlapen.vampirism.player.vampire.VampirePlayer.biteAttack(VampirePlayer.java:1097) ~[?:1.6.0-alpha+20191013-2127]
	at de.teamlapen.vampirism.player.vampire.VampirePlayer.biteEntity(VampirePlayer.java:232) ~[?:1.6.0-alpha+20191013-2127]
	at de.teamlapen.vampirism.network.InputEventPacket.lambda$handle$1(InputEventPacket.java:98) ~[?:1.6.0-alpha+20191013-2127]
	at net.minecraftforge.fml.network.NetworkEvent$Context.enqueueWork(NetworkEvent.java:185) ~[?:?]
	at de.teamlapen.vampirism.network.InputEventPacket.handle(InputEventPacket.java:87) ~[?:1.6.0-alpha+20191013-2127]
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.lambda$tryDecode$3(IndexedMessageCodec.java:114) ~[?:?]
	at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_221]
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:114) ~[?:?]
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:147) ~[?:?]
	at net.minecraftforge.fml.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:65) ~[?:?]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) ~[eventbus-1.0.0-service.jar:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) ~[eventbus-1.0.0-service.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-1.0.0-service.jar:?]
	at net.minecraftforge.fml.network.NetworkInstance.dispatch(NetworkInstance.java:82) ~[?:?]
	at net.minecraftforge.fml.network.NetworkHooks.lambda$onCustomPayload$0(NetworkHooks.java:74) ~[?:?]
	at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_221]
	at net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(NetworkHooks.java:74) ~[?:?]
	at net.minecraft.network.play.ServerPlayNetHandler.func_147349_a(ServerPlayNetHandler.java:1275) ~[?:?]
	at net.minecraft.network.play.client.CCustomPayloadPacket.func_148833_a(CCustomPayloadPacket.java:42) ~[?:?]
	at net.minecraft.network.play.client.CCustomPayloadPacket.func_148833_a(CCustomPayloadPacket.java:12) ~[?:?]
	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.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) [?:?]
	at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:699) [?:?]
	at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:693) [?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127) [?:?]
	at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:679) [?:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:626) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221]
commented

Thanks for reporting.
Fixed and new alpha uploaded