
Guard Villagers and Crossbowverhaul crash (IndexOutOfBoundsException: Index 0 out of bounds for length 0)
deadlymango opened this issue ยท 3 comments
General Information
To check a checkbox: Insert a X between the square brackets, you need to remove the space though.
- I play...
- With a large modpack
- Only with Crossbowverhaul and it's dependencies
- The issue occurs in...
- Singleplayer
- Multiplayer (dedicated server)
- I have searched for this or a similar issue before reporting and it was either (1) not previously reported, or (2) previously fixed and I'm having the same problem.
- I am using the latest version of the mod (all versions can be found on github under releases) (using version 1.2.3, but 1.2.4 only mentions a cosmetic fix)
- I reproduced the bug without any other mod's except forge, crossbowverhaul and it's dependencies
- The game crashes because of this bug
Describe the bug
The Guard Villagers from the Guard Villagers mod may use a crossbow. When they attempt to use the crossbow from this mod, the game crashes.
To Reproduce
Steps to reproduce the behavior:
- Launch server with my custom mod pack.
- Go to a generated village with Guard villagers.
- Spawn a zombie (in my case, creeper) and watch the guard villagers attack it.
- The ones with swords are fine. The ones with crossbows?
- Crash the game
Versions (Note that 'latest' is NOT a valid version!)
Crossbowverhaul: 1.2.3
Forge: 39.0.76
Minecraft: 1.18.1
Other mods (necessary to reproduce the bug): Guard Villagers
(possible conflating factors): ImprovedMobs
PillagersMod
Log File
Please use a paste site to upload the log file (for example https://gist.github.com/) and provide the link to the file here.
https://gist.github.com/deadlymango/d1ce8d5868865d48d66bf4ca929f4eeb
I doubt this is my problem, it works fine with pillagers and piglins, please report it to guard villagers too
Same issue here:
[22:36:07] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking entity
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:872) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:328) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:808) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:668) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at de.dertoaster.crossbowverhaul.item.IModifiedCrossbowMethod.modifiedPerformShooting(IModifiedCrossbowMethod.java:55) ~[crossbowverhaul-1.18.1-1.2.4-universal.jar%2366!/:1.2.4]
at net.minecraft.world.item.CrossbowItem.handler$zcl000$performShooting(CrossbowItem.java:543) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.item.CrossbowItem.m_40887_(CrossbowItem.java) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.monster.CrossbowAttackMob.m_32336_(CrossbowAttackMob.java:30) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.monster.Pillager.m_6504_(Pillager.java:199) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.ai.goal.RangedCrossbowAttackGoal.m_8037_(RangedCrossbowAttackGoal.java:119) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.ai.goal.WrappedGoal.m_8037_(WrappedGoal.java:65) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.ai.goal.GoalSelector.m_186081_(GoalSelector.java:119) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.Mob.m_6140_(Mob.java:691) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.LivingEntity.m_8107_(LivingEntity.java:2501) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.Mob.m_8107_(Mob.java:495) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.monster.Monster.m_8107_(Monster.java:43) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.raid.Raider.m_8107_(Raider.java:114) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.LivingEntity.m_8119_(LivingEntity.java:2248) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.entity.Mob.m_8119_(Mob.java:307) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:649) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.level.Level.m_46653_(Level.java:487) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:316) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:296) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:868) ~[server-1.18.1-20211210.034407-srg.jar%23126!/:?]
... 5 more