Tiny Progressions

Tiny Progressions

35M Downloads

NullPointErrorException onPlayerUsingBucket

Raelzaryn opened this issue ยท 4 comments

commented

When you rightclick with a bucket in Hand and there is no fluid to take the game crashes with following error code:
java.lang.NullPointerException: Unexpected error at com.kashdeya.tinyprogressions.events.BucketUseEvent.onPlayerUsingBucket(BucketUseEvent.java:17) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1196_BucketUseEvent_onPlayerUsingBucket_FillBucketEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) at net.minecraftforge.event.ForgeEventFactory.onBucketUse(ForgeEventFactory.java:366) at net.minecraft.item.ItemBucket.func_77659_a(ItemBucket.java:40) at net.minecraft.item.ItemStack.func_77957_a(ItemStack.java:162) at net.minecraft.client.multiplayer.PlayerControllerMP.func_187101_a(PlayerControllerMP.java:495) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1544) at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:2184) at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:1961) at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1749) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1055) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:371) at net.minecraft.client.main.Main.main(SourceFile:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Please add a null check there.

commented

I was about to report this, downgrading to 1.0.19 fixes the crash

commented

Yeah ik. I just edited the file tho. added the null check :P

commented

this will be fixed in the next update.

@KurodaAkira if you make any changes please put in a PR so that we can have a look at it.

commented

There's no need for a pull request for adding a != null check x)