Doggy Talents

Doggy Talents

27M Downloads

Crash when clicking on wolf with empty hand (1.7.10)

Stalkstalks opened this issue ยท 1 comments

commented
  • Minecraft Version: 1.7.10
  • Forge Version: (i.e. 10.13.4.1614)
  • Doggy Talents Version: (i.e. 1.14.2.308)

Hey, I was trying out the newest version of the mod (surprised and delighted that you decided to update it for 1.7, btw) , and I was surprised that as soon as I went to get a wolf to test with, the game crashed with a null pointer exception.

If I click on a wolf with an empty hand, it crashes the game.

It looks like it's caused by:
doggytalents/handler/EntityInteract.java, line 25.

There is no check for whether the item the wolf is clicked on is valid, so clicking on one with an empty hand tries to get the item type of a null stack. Branching away if the player's held item is null should avoid this. I'd do it myself and put in a pull request, but I haven't gotten the code to build and I don't like PR'ing code I didn't test first.

commented

This is a very obvious bug i'm surprised no one else reported it. Forgot to re-add these checks when I was downgrading from MC 1.11. I will release a fix in the next hour or so that you can download.