Server Crash: Cannot invoke "ttv.migami.jeg.common.Gun.getProjectile()" because "this.modifiedGun" is null
ByThePowerOfScience opened this issue ยท 1 comments
Went ahead and remapped the stacktrace for you. It probably just needs a null check wrapping it, but I'm submitting this issue before making any PR in case this is something that shouldn't ever happen.
net.minecraft.ReportedException: Ticking entity
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:897) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:283) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:814) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:661) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "ttv.migami.jeg.common.Gun.getProjectile()" because "this.modifiedGun" is null
at ttv.migami.jeg.entity.projectile.ProjectileEntity.onHitEntity(ProjectileEntity.java:565) ~[JustEnoughGuns-0.3.1-1.20.1.jar%23464!/:0.3.1-1.20.1]
at ttv.migami.jeg.entity.projectile.ProjectileEntity.onHit(ProjectileEntity.java:503) ~[JustEnoughGuns-0.3.1-1.20.1.jar%23464!/:0.3.1-1.20.1]
at ttv.migami.jeg.entity.projectile.ProjectileEntity.tick(ProjectileEntity.java:256) ~[JustEnoughGuns-0.3.1-1.20.1.jar%23464!/:0.3.1-1.20.1]
at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:693) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.entity.TickOptimizer.handleGuardEntityTick(TickOptimizer.java:62) ~[NoSeeNoTick-2.0.0-1.20.1.jar%23494!/:2.0.0-build.9999]
at net.minecraft.entity.TickOptimizer.entityTicking(TickOptimizer.java:42) ~[NoSeeNoTick-2.0.0-1.20.1.jar%23494!/:2.0.0-build.9999]
at net.minecraft.world.level.Level.guardEntityTick(Level.java:6041) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:343) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:54) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:323) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:893) ~[server-1.20.1-20230612.114412-srg.jar%23589!/:?]
-- Entity being ticked --
Details:
Entity Type: jeg:projectile (ttv.migami.jeg.entity.projectile.ProjectileEntity)
Entity ID: 17143
Entity Name: entity.jeg.projectile
Entity's Exact location: 2041.15, 65.81, 347.52
Entity's Block location: World: (2041,65,347), Section: (at 9,1,11 in 127,4,21; chunk contains blocks 2032,-64,336 to 2047,319,351), Region: (3,0; contains chunks 96,0 to 127,31, blocks 1536,-64,0 to 2047,319,511)
Entity's Momentum: 0.00, -3.00, -4.46
Entity's Passengers: []
Entity's Vehicle: null
Entity NBT: {Air:300s,BalmData:{},CanUpdate:1b,FallDistance:0.0f,Fire:-1s,ForgeData:{},General:{AlwaysSpread:1b,BurstAmount:0,FireMode:"jeg:semi_automatic",FireTimer:0,GripType:"jeg:two_handed",ProjectileAmount:1,Rate:28,RecoilAdsReduction:0.2f,RecoilAngle:4.0f,RecoilDurationOffset:0.0f,RecoilKick:0.25f,Spread:0.25f},Invulnerable:0b,MaxLife:60,ModifiedGravity:-0.04d,Motion:[0.0d,-3.0000000000000018d,-4.455547571182251d],OnGround:0b,PortalCooldown:0,Pos:[2041.1464926702965d,65.80606493949884d,347.5238919792305d],Projectile:{Advantage:"jeg:very_heavy",Damage:21.0f,DamageReduceOverLife:0b,EjectsCasing:1b,Gravity:1b,Item:"jeg:rifle_ammo",Life:60,Size:0.05f,Speed:24.0d,TrailColor:16765577,TrailLengthMultiplier:2.0d,Visible:0b},Rotation:[180.0f,-33.953094f],UUID:[I;-44276355,-871675732,-1644069429,434296029],"nucleus:facets":{}}