mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-25 02:27:38 +01:00
Avoid unnecessary/unsafe field lookups
This commit is contained in:
parent
cc0c7e00b2
commit
d08635dbc3
@ -57,7 +57,8 @@ public interface Palette extends Writeable {
|
||||
* Returns the maximum number of entries in this palette.
|
||||
*/
|
||||
default int maxSize() {
|
||||
return dimension() * dimension() * dimension();
|
||||
final int dimension = dimension();
|
||||
return dimension * dimension * dimension;
|
||||
}
|
||||
|
||||
@NotNull Palette clone();
|
||||
|
Loading…
Reference in New Issue
Block a user