Team-Resourceful / ResourcefulBees

Minecraft Mod for creating highly customized bees
https://www.resourcefulbees.com
GNU Lesser General Public License v3.0
75 stars 31 forks source link

Activating Beehive Tier1 with a Scraper causes the server to crash. #56

Closed bbf closed 4 years ago

bbf commented 4 years ago

Describe the bug The server crashed and crashes after restarting with the following log:

[20:28:30] [Server thread/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 94662e96-476e-4a93-b15c-9d3296c4392a                                                                                                    
[20:28:30] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
net.minecraft.crash.ReportedException: Ticking block entity
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:851) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}                                                                  
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:283) ~[?:?] {re:classloading,pl:accesstransformer:B}                                                                                
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:783) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}                                                                  
        at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:638) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}                                                                
        at net.minecraft.server.MinecraftServer.lambda$func_240784_a_$0(MinecraftServer.java:229) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}                                                       
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] {}
Caused by: java.lang.IllegalArgumentException: bound must be positive
        at java.util.Random.nextInt(Random.java:388) ~[?:1.8.0_212] {}
        at com.resourcefulbees.resourcefulbees.block.TieredBeehiveBlock.func_226881_b_(TieredBeehiveBlock.java:153) ~[?:1.16.3-0.5.3b] {re:classloading}                                                                        
        at com.resourcefulbees.resourcefulbees.block.TieredBeehiveBlock.func_225533_a_(TieredBeehiveBlock.java:134) ~[?:1.16.3-0.5.3b] {re:classloading}                                                                        
        at net.minecraft.block.AbstractBlock$AbstractBlockState.func_227031_a_(AbstractBlock.java:638) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs.mixins.json:AbstractBlockStateMixin,pl:mixin:A,pl:runtimedistcleaner:A}
        at me.desht.modularrouters.logic.compiled.CompiledActivatorModule.doActivateBlock(CompiledActivatorModule.java:264) ~[?:1.16.3-7.1.0-35] {re:classloading}                                                              
        at me.desht.modularrouters.logic.compiled.CompiledActivatorModule.execute(CompiledActivatorModule.java:120) ~[?:1.16.3-7.1.0-35] {re:classloading}                                                                      
        at me.desht.modularrouters.block.tile.TileEntityItemRouter.executeModules(TileEntityItemRouter.java:311) ~[?:1.16.3-7.1.0-35] {re:classloading}                                                                         
        at me.desht.modularrouters.block.tile.TileEntityItemRouter.func_73660_a(TileEntityItemRouter.java:283) ~[?:1.16.3-7.1.0-35] {re:classloading}                                                                           
        at net.minecraft.world.World.func_217391_K(World.java:491) ~[?:?] {re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:366) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:immersiveengineering:IE block update callback,pl:runtimedistcleaner:A}
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:847) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}                                                                  
        ... 5 more

To Reproduce Steps to reproduce the behavior: I don't know exactly why it crashed, since it happened after the setup was already running for a few minutes. I have a @ModularRouters Item Router with an Activation Module which is using a "Scraper" every other tick.

please complete the following information:

Additional context If you need me to inspect the world save and look up any NBT values, I can do that. Just let me know what you would like to know more about.

ThatGravyBoat commented 4 years ago

Fixed in a7f3b3d. It was an oversight by me that I checked for a fake player in the wrong location. Thanks for the report.