mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-23 00:41:59 +01:00
Factor in range dispatch scaling when sorting predicate
This commit is contained in:
parent
e84f8a3543
commit
bcc791544b
1 changed files with 3 additions and 1 deletions
|
@ -771,7 +771,9 @@ public class ItemRegistryPopulator {
|
|||
.map(otherPredicate -> (RangeDispatchPredicate) otherPredicate)
|
||||
.findFirst();
|
||||
if (other.isPresent()) {
|
||||
return (int) (other.orElseThrow().threshold() - rangeDispatch.threshold());
|
||||
double otherScaledThreshold = other.get().threshold() / other.get().scale();
|
||||
double thisThreshold = rangeDispatch.threshold() / rangeDispatch.scale();
|
||||
return (int) (otherScaledThreshold - thisThreshold);
|
||||
}
|
||||
} // TODO not a fan of how this looks
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue