More Swords Legacy

More Swords Legacy

919k Downloads

[Bug] Serve Crash (Ender Aura Enchantment & Battle Towers Fireball)

0xebjc opened this issue ยท 4 comments

commented

###ISSUE
Battle towers has a enemy mob entity "battle towers golem" which fires explosive fireball projectiles, the fire balls are an entity. When player is struct by fireball with "ender aura enchantment" some times the server crashes. I say some times because I can get the golem fireball to hit the player and a successful teleport to a mob via the ender aura enchantment can occur, but a high change, say 40% of the time, within 3-6 stikes from the fireball the server crashes.

###GAME INFO
Minecraft Version: 1.12.2
More Swords Legacy Version: MoreSwordsLegacy-1.12.2-1.0.6.0
Battle Towers Version: BattleTowers-1.12.2 (Latest as of 25 FEB 2020)

###CRASH LOG

https://pastebin.com/dm3EL1qd

###STACKTRACE INFO

Description: Ticking entity

java.lang.IndexOutOfBoundsException: Index: 13, Size: 13
	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
	at java.util.ArrayList.get(ArrayList.java:433)
	at net.darkhax.msmlegacy.EnchantmentEffectHandler.handleEnderAura(EnchantmentEffectHandler.java:197)
	at net.darkhax.msmlegacy.EnchantmentEffectHandler.checkAndApplyEffect(EnchantmentEffectHandler.java:339)
	at net.darkhax.msmlegacy.EnchantmentEffectHandler.onDamageMob(EnchantmentEffectHandler.java:77)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_278_EnchantmentEffectHandler_onDamageMob_LivingHurtEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
	at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:604)
	at net.minecraft.entity.player.EntityPlayer.func_70665_d(EntityPlayer.java:1120)
	at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:926)
	at net.minecraft.entity.player.EntityPlayer.func_70097_a(EntityPlayer.java:1038)
	at net.minecraft.entity.player.EntityPlayerMP.func_70097_a(EntityPlayerMP.java:645)
	at net.minecraft.world.Explosion.func_77278_a(Explosion.java:159)
	at net.minecraft.world.WorldServer.func_72885_a(WorldServer.java:1169)
	at atomicstryker.battletowers.common.AS_EntityGolemFireball.func_70071_h_(AS_EntityGolemFireball.java:105)
	at net.minecraft.world.World.func_72866_a(World.java:1996)
	at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:832)
	at net.minecraft.world.World.func_72870_g(World.java:1958)
	at net.minecraft.world.World.func_72939_s(World.java:1762)
	at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613)
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767)
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
	at java.lang.Thread.run(Thread.java:748)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
	at java.util.ArrayList.get(ArrayList.java:433)
	at net.darkhax.msmlegacy.EnchantmentEffectHandler.handleEnderAura(EnchantmentEffectHandler.java:197)
	at net.darkhax.msmlegacy.EnchantmentEffectHandler.checkAndApplyEffect(EnchantmentEffectHandler.java:339)
	at net.darkhax.msmlegacy.EnchantmentEffectHandler.onDamageMob(EnchantmentEffectHandler.java:77)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_278_EnchantmentEffectHandler_onDamageMob_LivingHurtEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
	at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:604)
	at net.minecraft.entity.player.EntityPlayer.func_70665_d(EntityPlayer.java:1120)
	at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:926)
	at net.minecraft.entity.player.EntityPlayer.func_70097_a(EntityPlayer.java:1038)
	at net.minecraft.entity.player.EntityPlayerMP.func_70097_a(EntityPlayerMP.java:645)
	at net.minecraft.world.Explosion.func_77278_a(Explosion.java:159)
	at net.minecraft.world.WorldServer.func_72885_a(WorldServer.java:1169)
	at atomicstryker.battletowers.common.AS_EntityGolemFireball.func_70071_h_(AS_EntityGolemFireball.java:105)
	at net.minecraft.world.World.func_72866_a(World.java:1996)
	at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:832)
	at net.minecraft.world.World.func_72870_g(World.java:1958)

-- Entity being ticked --
Details:
	Entity Type: battletowers:golemfireball (atomicstryker.battletowers.common.AS_EntityGolemFireball)
	Entity ID: 106681
	Entity Name: entity.Golem Fireball.name
	Entity's Exact location: -205.71, 69.40, 302.29
	Entity's Block location: World: (-206,69,302), Chunk: (at 2,4,14 in -13,18; contains blocks -208,0,288 to -193,255,303), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Entity's Momentum: 0.45, 0.03, -0.75
	Entity's Passengers: []
	Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
	at net.minecraft.world.World.func_72939_s(World.java:1762)
	at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613)

-- Affected level --
Details:
	Level name: world
	All players: 1 total; [EntityPlayerMP['Simon'/578, l='world', x=-190.20, y=67.00, z=296.50]]
	Chunk stats: ServerChunkCache: 445 Drop: 0
	Level seed: -1535938722
	Level generator: ID 00 - default, ver 1. Features enabled: true
	Level generator options: 
	Level spawn location: World: (-184,64,256), Chunk: (at 8,4,0 in -12,16; contains blocks -192,0,256 to -177,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Level time: 3094918 game time, 872244 day time
	Level dimension: 0
	Level storage version: 0x04ABD - Anvil
	Level weather: Rain time: 18072 (now: true), thunder time: 76101 (now: false)
	Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767)
	at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
	at java.lang.Thread.run(Thread.java:748)
commented

Darkhax,

Not sure how best this problem could be fixed or what exactly is causing the problem, maybe the Ender Aura is trying to teleport the player to the Fireball? because it is an Entity? Just as the fireball is destroyed?

At minimum it would be nice to disable the enchantment in a config files if this is a really difficult issue to fix?

Thanks for your time and for a really great mod.
-jc

commented

I'm building a mod pack and worst case I just remove the battle towers mod, but would prefer to get this fixed and keep the mod in the modpack.

commented

I haven't tested, this might be a problem also with wither head projectiles, I believe they are entities also?

commented

Sorry for not responding sooner. I was not getting notifications for this. The issue was an off by one in my code. I was picking one of 13 random mobs but I was asking for mob 14. This is now fixed.