Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
EvanTFC

Problem with Custom NPCs

5 posts in this topic

I've had trouble with the Custom NPCs mod. I get a crash every time i hit a NPC with a TFC item, let alone, wear TFC armor and punch a NPC with a empty hand.

I wondered if there would be any updates to this problem, because i'm not sure if i'm the only one experiencing this.

Don't know if you guys need a crash report from me, because i do have a lot of mods, but i don't think that's the problem. I crashed on several world's, as i've attempted to get the mod to work.

I need help with this.

0

Share this post


Link to post
Share on other sites

A couple of crash reports would be helpful. They will provide all the info we need that you didn't include because you didn't use the form to submit your post, and will also show which of the two mods actually needs to make changes for compatibility. 

1

Share this post


Link to post
Share on other sites

Alright, i hit an NPC with a mace, this is what i got:

Spoiler

 

---- Minecraft Crash Report ----
// Uh... Did I do that?

Time: 10/7/16 5:14 PM
Description: Ticking memory connection

java.lang.ArrayIndexOutOfBoundsException: 1
    at com.bioxx.tfc.Handlers.EntityDamageHandler.applyArmorCalculations(EntityDamageHandler.java:120)
    at com.bioxx.tfc.Handlers.EntityDamageHandler.onEntityHurt(EntityDamageHandler.java:87)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_207_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:520)
    at com.bioxx.tfc.Handlers.EntityDamageHandler.onAttackEntity(EntityDamageHandler.java:335)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_208_EntityDamageHandler_onAttackEntity_AttackEntityEvent.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.minecraft.entity.player.EntityPlayer.func_71059_n(EntityPlayer.java:1185)
    at net.minecraft.network.NetHandlerPlayServer.func_147340_a(NetHandlerPlayServer.java:821)
    at net.minecraft.network.play.client.C02PacketUseEntity.func_148833_a(SourceFile:55)
    at net.minecraft.network.play.client.C02PacketUseEntity.func_148833_a(SourceFile:10)
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212)
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659)
    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:120)
    at com.bioxx.tfc.Handlers.EntityDamageHandler.onEntityHurt(EntityDamageHandler.java:87)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_207_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:520)
    at com.bioxx.tfc.Handlers.EntityDamageHandler.onAttackEntity(EntityDamageHandler.java:335)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_208_EntityDamageHandler_onAttackEntity_AttackEntityEvent.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.minecraft.entity.player.EntityPlayer.func_71059_n(EntityPlayer.java:1185)
    at net.minecraft.network.NetHandlerPlayServer.func_147340_a(NetHandlerPlayServer.java:821)
    at net.minecraft.network.play.client.C02PacketUseEntity.func_148833_a(SourceFile:55)
    at net.minecraft.network.play.client.C02PacketUseEntity.func_148833_a(SourceFile:10)
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212)

-- Ticking connection --
Details:
    Connection: net.minecraft.network.NetworkManager@156a194
Stacktrace:
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659)
    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 Vista (x86) version 6.0
    Java Version: 1.8.0_91, Oracle Corporation
    Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
    Memory: 50402904 bytes (48 MB) / 523501568 bytes (499 MB) up to 523501568 bytes (499 MB)
    JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx512M -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: 0
    FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 42 mods loaded, 42 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.29} [TFC[coremod]] (minecraft.jar) 
    UCHIJAAAA    mod_ThreadedLighting{1.7.10-1.0} [Threaded Lighting] (minecraft.jar) 
    UCHIJAAAA    gilded-games-util{1.7.10-1.2} [Gilded Games Utility] (gilded-games-util-1.7.10-1.9.jar) 
    UCHIJAAAA    divinerpg{1.4.1.3} [DivineRPG] ([1.7.10][SMP]DivineRPG-1.4.1.3.jar) 
    UCHIJAAAA    terrafirmacraft{0.79.29} [TerraFirmaCraft] ([1.7.10]TerraFirmaCraft-0.79.29.922 (1).jar) 
    UCHIJAAAA    AmnesiaDecorations{1.1.1} [Amnesia Decorations] (AmnesiaDecorations-1.7.10-1.1.1.jar) 
    UCHIJAAAA    AmnesiaLights{1.1.1} [Amnesia Lights] (AmnesiaLights-1.7.10-1.1.1.jar) 
    UCHIJAAAA    antiqueatlas{1.7.10-4.2.10} [Antique Atlas] (antiqueatlas-1.7.10-4.2.10.jar) 
    UCHIJAAAA    thexfactor117_ascension{b1.2.3} [Ascension] (Ascension-b1.2.3.jar) 
    UCHIJAAAA    AssassinCraft{r130f} [AssassinCraft] (AssassinCraft-r130f-1.7.10.jar) 
    UCHIJAAAA    atum{0.6} [Atum] (Atum-1.7.10-0.6.77.jar) 
    UCHIJAAAA    BiomesOPlenty{2.1.0} [Biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.1067-universal.jar) 
    UCHIJAAAA    speedytoolsmod{2.0.0} [Build Faster Mod] (Build-Faster-Mod-1.7.10.zip) 
    UCHIJAAAA    teamod{1.1.0} [Richard's Coffee & Tea Mod] (CoffeeAndTeaMod-1.1.0.jar) 
    UCHIJAAAA    customnpcs{1.7.10d} [CustomNpcs] (CustomNPCs_1.7.10d.jar) 
    UCHIJAAAA    flansmod{4.10.0} [Flan's Mod] (Flans Mod-1.7.10-4.10.0.jar) 
    UCHIJAAAA    HardcoreDarkness{1.5} [Hardcore Darkness] (HardcoreDarkness-1.5.jar) 
    UCHIJAAAA    lom{1.7.10-3.2.2} [LotsOMobs] (lom-1.7.10-3.2.2.jar) 
    UCHIJAAAA    lycanitesmobs{1.13.0.5 - MC 1.7.10} [Lycanites Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    arcticmobs{1.13.0.5 - MC 1.7.10} [Lycanites Arctic Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    demonmobs{1.13.0.5 - MC 1.7.10} [Lycanites Demon Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    desertmobs{1.13.0.5 - MC 1.7.10} [Lycanites Desert Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    forestmobs{1.13.0.5 - MC 1.7.10} [Lycanites Forest Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    freshwatermobs{1.13.0.5 - MC 1.7.10} [Lycanites Freshwater Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    infernomobs{1.13.0.5 - MC 1.7.10} [Lycanites Inferno Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    junglemobs{1.13.0.5 - MC 1.7.10} [Lycanites Jungle Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    mountainmobs{1.13.0.5 - MC 1.7.10} [Lycanites Mountain Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    plainsmobs{1.13.0.5 - MC 1.7.10} [Lycanites Plains Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    saltwatermobs{1.13.0.5 - MC 1.7.10} [Lycanites Saltwater Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    shadowmobs{1.13.0.5 - MC 1.7.10} [Lycanites Shadow Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    swampmobs{1.13.0.5 - MC 1.7.10} [Lycanites Swamp Mobs] (LycanitesMobsComplete 1.13.0.5 [1.7.10].jar) 
    UCHIJAAAA    me{1.3.2.1} [More Enchantments] (MoreEnchantments-1.7.10-1.3.2.1.jar) 
    UCHIJAAAA    AencEx{0.0.1} [AencEx] (MoreEnchantments-1.7.10-1.3.2.1.jar) 
    UCHIJAAAA    NBTEdit{1.7.2.2} [In-game NBTEdit] (NBTEdit_1.7.10.jar) 
    UCHIJAAAA    ParkourMod{1.0} [Parkour Mod (Assassin's Creed Style)] (ParkourMod-1.7.10-1.0.1.jar) 
    UCHIJAAAA    Roguelike{1.4.4} [Roguelike Dungeons] (roguelike-1.7.10-1.4.4.jar) 
    UCHIJAAAA    RopesPlus{1.6.4} [Ropes+] (RopePlus-1.7.10.jar) 
    UCHIJAAAA    secretroomsmod{4.7.1} [The SecretRoomsMod] (secretroomsmod-1.7.10-4.7.1.413.jar) 
    UCHIJAAAA    XaeroMinimap{1.8.1.1} [Xaero's Minimap] (Xaeros_Minimap_1.8.1.1_Forge_1.7.10.jar) 
    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['LanceGaming'/423, l='Dune Quest!', x=-234.36, y=63.00, z=-273.32]]
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fml,forge'

 

 

0

Share this post


Link to post
Share on other sites

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.

Edited by Kittychanley
0

Share this post


Link to post
Share on other sites

Hello! I experience the same difficulties when using CustomNPC in conjunction with TFC. Has anyone solved this problem?

P.S. I found a neighboring topic where the same problem is discussed in more detail.

 

Edited by momai
0

Share this post


Link to post
Share on other sites