Jump to content

[Custom NPCs 1.7.10] [Question] Crash when attacked by mob


Elron

Recommended Posts

When a guard npc gets atacked by a mob of terrafirmacraft mod, the game crashes. I don't know if it is a easily fixable bug, but maybe there is a way to make the npc invisible to mobs, like player on creative mod? That could be temporary solution! Thanks!

Link to comment
Share on other sites

I have to admit that I don't know the exactly version of MC, but the forge version is 10.13.4.1558 if that helps.

 

Here is the crash report:

 

---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 12/01/16 14:38
Description: Ticking entity

java.lang.ArrayIndexOutOfBoundsException: 2
at com.bioxx.tfc.Handlers.EntityDamageHandler.applyArmorCalculations(EntityDamageHandler.java:104)
at com.bioxx.tfc.Handlers.EntityDamageHandler.onEntityHurt(EntityDamageHandler.java:71)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_57_EntityDamageHandler_onEntityHurt_LivingHurtEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140)
at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:298)
at net.minecraft.entity.EntityLivingBase.func_70665_d(EntityLivingBase.java:1129)
at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:785)
at noppes.npcs.entity.EntityNPCInterface.func_70097_a(EntityNPCInterface.java:506)
at net.minecraft.entity.projectile.EntityArrow.func_70071_h_(SourceFile:270)
at com.bioxx.tfc.Entities.EntityProjectileTFC.func_70071_h_(EntityProjectileTFC.java:106)
at net.minecraft.world.World.func_72866_a(World.java:2070)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648)
at net.minecraft.world.World.func_72870_g(World.java:2034)
at net.minecraft.world.World.func_72939_s(World.java:1887)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)


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

-- Head --
Stacktrace:
at com.bioxx.tfc.Handlers.EntityDamageHandler.applyArmorCalculations(EntityDamageHandler.java:104)
at com.bioxx.tfc.Handlers.EntityDamageHandler.onEntityHurt(EntityDamageHandler.java:71)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_57_EntityDamageHandler_onEntityHurt_LivingHurtEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140)
at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:298)
at net.minecraft.entity.EntityLivingBase.func_70665_d(EntityLivingBase.java:1129)
at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:785)
at noppes.npcs.entity.EntityNPCInterface.func_70097_a(EntityNPCInterface.java:506)
at net.minecraft.entity.projectile.EntityArrow.func_70071_h_(SourceFile:270)
at com.bioxx.tfc.Entities.EntityProjectileTFC.func_70071_h_(EntityProjectileTFC.java:106)
at net.minecraft.world.World.func_72866_a(World.java:2070)
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648)
at net.minecraft.world.World.func_72870_g(World.java:2034)

-- Entity being ticked --
Details:
Entity Type: arrowTFC (com.bioxx.tfc.Entities.EntityProjectileTFC)
Entity ID: 29775
Entity Name: Arrow
Entity's Exact location: 338,86, 143,91, -14600,01
Entity's Block location: World: (338,143,-14601), Chunk: (at 2,8,7 in 21,-913; contains blocks 336,0,-14608 to 351,255,-14593), Region: (0,-29; contains chunks 0,-928 to 31,-897, blocks 0,0,-14848 to 511,255,-14337)
Entity's Momentum: 1,03, 0,40, 0,43
Stacktrace:
at net.minecraft.world.World.func_72939_s(World.java:1887)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)

-- Affected level --
Details:
Level name: New World
All players: 1 total; [EntityPlayerMP['Spekiz'/36, l='New World', x=343,85, y=144,00, z=-14597,47]]
Chunk stats: ServerChunkCache: 808 Drop: 0
Level seed: 376020899036813378
Level generator: ID 00 - TFCDefault, ver 0. Features enabled: true
Level generator options: 
Level spawn location: World: (192,145,-14608), Chunk: (at 0,9,0 in 12,-913; contains blocks 192,0,-14608 to 207,255,-14593), Region: (0,-29; contains chunks 0,-928 to 31,-897, blocks 0,0,-14848 to 511,255,-14337)
Level time: 579876 game time, 615141 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 146680 (now: false), thunder time: 11238 (now: false)
Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 237629824 bytes (226 MB) / 716341248 bytes (683 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 17
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 11 mods loaded, 11 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1558-1.7.10.jar) 
UCHIJAAAA	Forge{10.13.4.1558} [Minecraft Forge] (forge-1.7.10-10.13.4.1558-1.7.10.jar) 
UCHIJAAAA	tfc_coremod{0.79.27} [TFC[coremod]] (minecraft.jar) 
UCHIJAAAA	cuchaz.ships.core{1.7.10-1.0.3} [ships Mod Core] (minecraft.jar) 
UCHIJAAAA	terrafirmacraft{0.79.27} [TerraFirmaCraft] ([1.7.10]TerraFirmaCraft-0.79.27.903.jar) 
UCHIJAAAA	customnpcs{1.7.10d} [CustomNpcs] (CustomNPCs_1.7.10d.jar) 
UCHIJAAAA	FastCraft{1.21} [FastCraft] (fastcraft-1.21.jar) 
UCHIJAAAA	ReiMinimap{1.7.10} [Rei's Minimap] (Reis-Minimap-Mod-1.7.10.jar) 
UCHIJAAAA	cuchaz.cuchazinteractive{1.7.10-1.0} [Cuchaz Interactive] (shipsMod-v1.7.10-1.0.4.jar) 
UCHIJAAAA	cuchaz.ships{1.7.10-1.0.3} [ships Mod] (shipsMod-v1.7.10-1.0.4.jar) 
GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP[Private/36, l='New World', x=343,85, y=144,00, z=-14597,47]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'

Link to comment
Share on other sites

Yeah, but I am pretty sure Bioxx won't fix this and I don't wish that you waste your time fixing this. Just wanted to know if there's a way to make the NPC invisible so the npc will ignore it. The crash is due to mob attacking an npc, when an npc attacks a mob nothing happens.

Link to comment
Share on other sites

  • 1 year later...
On 1/15/2016 at 9:39 AM, Noppes said:

Not caused by my mod. com.bioxx.tfc is the one crashing.

 
 

Hi I was just looking for the same bug and I can cross this issue with the explanation from the terrafirmacraft team.

Could you look at it?

 

 

Quote

The problem is that CustomNPCs for whatever reason decided to extend EntityLivingBase instead of just EntityLiving like every other mod out there does, or they overriding the function getLastActiveItems(). Every single living entity in vanilla Minecraft as well as from mods that follow the "normal" route of extending EntityLiving or EntityPlayer always has the memory allocated for either 4 or 5 slots: the 4 armor slots and optionally the item they are holding. Our damage handler is based off of that assumption that the array of itemstacks for the armor will always be returned.

I would suggest you contact CustomNPC support and ask them if they have a specific reason for overriding EntityLivingBase.getLastActiveItems(), and if they could change their implementation to always return an array of at least size 4 like all other living entities do.

4

Kittychanley

http://terrafirmacraft.com/f/topic/9581-problem-with-custom-npcs/

 

and also here

Quote

You must have created a custom NPC that completely ignores the standard way of handling armor slots. Just about every entity in Minecraft has the 4 armor slots in the code regardless of if you can actually get them to wear armor. All of our calculations are based off the fact that every other mod is using that same standard, but in this case CustomNPC is not.

There's nothing we can do to fix this. The problem is with CustomNPC for not using armor standards.

6

http://terrafirmacraft.com/f/topic/9137-solved-custom-npc-tfc-damagearmor-calculation-crash/

 

Can you look at the code if it's true because now it ended up in a dead end. And possibly backport the fix to 1.7.10? Both mods are awesome but they can't be used together just for this calculation crash.

Thanks

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.