13
0
geforkt von Mirrors/Paper

Fix operator precedence bug (#8756)

Dieser Commit ist enthalten in:
Hannes Greule 2023-01-03 14:42:58 +01:00
Ursprung 9473cd8981
Commit 850adc4885
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -740,8 +740,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
}
// Add a little performance juice to active entities. Skip 1/4 if not immune.
- } else if ( !entity.defaultActivationState && entity.tickCount + entity.getId() + 1 % 4 == 0 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check
+ } else if ( entity.tickCount + entity.getId() + 1 % 4 == 0 && ActivationRange.checkEntityImmunities( entity ) < 0 ) // Paper
- } else if ( !entity.defaultActivationState && (entity.tickCount + entity.getId()) % 4 == 3 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check
+ } else if ( (entity.tickCount + entity.getId()) % 4 == 3 && ActivationRange.checkEntityImmunities( entity ) < 0 ) // Paper
{
isActive = false;
}

Datei anzeigen

@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
// Add a little performance juice to active entities. Skip 1/4 if not immune.
- } else if ( !entity.defaultActivationState && entity.tickCount % 4 == 0 && !ActivationRange.checkEntityImmunities( entity ) )
+ } else if ( !entity.defaultActivationState && entity.tickCount + entity.getId() + 1 % 4 == 0 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check
+ } else if ( !entity.defaultActivationState && (entity.tickCount + entity.getId()) % 4 == 3 && !ActivationRange.checkEntityImmunities( entity ) ) // Paper - Ensure checking item movement is offset from Spigot's entity activation range check
{
isActive = false;
}