World Item Importer "Import All Items From Entities" aspect crashes IndexOutOfBounds when targeting entity "-1" to select random target
GreyMario opened this issue ยท 1 comments
Issue type:
- ๐ Bug
Short description:
The Import All Items From Entities
aspect throws IndexOutOfBoundsException
when the target entity is set to -1
(as suggested for targeting a random entity from the targeted block space)
Steps to reproduce the problem:
- Using a World Item Importer, try to import any item from a random entity in the targeted block space.
- Realize that you're now staring at the desktop instead of zombies getting stripped of their armor.
Expected behaviour:
Disarmed zombies and skeletons, just the way they should be. (Or victim players, if that's more your style...)
Versions:
- Minecraft:
1.12.2
- Forge:
14.23.5.2768
- InDynamics:
1.0.0
- InTunnels:
1.6.0
- InCrafting:
1.0.0
- InTerminals:
1.0.0
- CyclopsCore:
1.0.0
- CommonCapabilities:
2.0.0
Stack trace:
java.lang.IndexOutOfBoundsException: position (-1) must not be negative
at com.google.common.collect.Iterators.checkNonnegative(Iterators.java:781)
at com.google.common.collect.Iterables.get(Iterables.java:796)
at org.cyclops.integratedtunnels.part.aspect.TunnelAspectWriteBuilders$World$Item.lambda$static$3(TunnelAspectWriteBuilders.java:1220)
at org.cyclops.integrateddynamics.core.part.aspect.build.AspectBuilder$BuiltWriter.write(AspectBuilder.java:428)
at org.cyclops.integrateddynamics.part.aspect.write.AspectWriteBase.update(AspectWriteBase.java:57)
at org.cyclops.integrateddynamics.core.part.aspect.build.AspectBuilder$BuiltWriter.update(AspectBuilder.java:451)
at org.cyclops.integrateddynamics.core.part.write.PartTypeWriteBase.update(PartTypeWriteBase.java:96)
at org.cyclops.integrateddynamics.core.part.write.PartTypeWriteBase.update(PartTypeWriteBase.java:48)
at org.cyclops.integrateddynamics.core.network.PartNetworkElement.update(PartNetworkElement.java:134)
at org.cyclops.integrateddynamics.core.network.Network.update(Network.java:408)
at org.cyclops.integrateddynamics.core.TickHandler.onTick(TickHandler.java:65)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_55_TickHandler_onTick_TickEvent.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.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:266)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:712)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Unknown Source)