mojira.dev
MC-303969

Redundant check for Wolves in source code

Not sure if it’s 100% a bug, but surely a mistake in the code. Class net.minecraft.world.entity.animal.wolf.Wolf, line 366/367 on tick()method. The IF condition does this redundant check:

else if ((this.isWet || this.isShaking) && 
      this.isShaking) {

Checking for “isWet” doesn’t make any sense at all; because IF “isShaking==true” it will pass anyway.

This has been there since wolves were added in Beta 1.4, but now that the client comes without obfuscation, it is 100% certain that this is a mistake in the code and not the decompiler going crazy.

Of course, this doesn’t impact gameplay in any way. But it’s weird.

Comments 2

Sorry, bug reports are not for code review

I’d like to clarify that the bug MAY have impact in gameplay, but it depends on what behaviour the developers were intending for. (wheter if it has to check for “isWet” or not?)

Hey @tryashtar , take a look at this:

Coding error at net.minecraft.world.entity.Entity.resetPos() - Minecraft: Java Edition - Jira Service Management

  • Was valid and got fixed.

Thanks for your patience.

ISRosillo14

(Unassigned)

Unconfirmed

(Unassigned)

25w45a

Retrieved