perf: class initializer may be static

This commit is contained in:
Breno A. 2024-06-09 09:39:46 -03:00
parent 4f1ad7b576
commit e4123f47d6

View File

@ -25,7 +25,7 @@ import lombok.val;
public class InventorySystem extends BaseGameSystem {
private static final Int2IntMap weaponRefundMaterials = new Int2IntArrayMap();
{
static {
// Use a sorted map, use exp as key to sort by exp
// We want to have weaponRefundMaterials as (id, exp) in descending exp order
var temp = new Int2IntRBTreeMap(Collections.reverseOrder());