Use List.of in EquipmentInventory
`Arrays.asList` isn't immutable, and `List.of` can be optimized slightly better, is more readable and also removes an import
This commit is contained in:
1 parent
a3762584f3
commit
6b9e7aff3e
1 file changed
+1
-2
@@ -1,6 +1,5 @@
|
||||
package carpet.script.utils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.world.Container;
|
||||
@@ -11,7 +10,7 @@ import net.minecraft.world.item.ItemStack;
|
||||
|
||||
public class EquipmentInventory implements Container
|
||||
{
|
||||
private static final List<EquipmentSlot> slotToSlot = Arrays.asList(
|
||||
private static final List<EquipmentSlot> slotToSlot = List.of(
|
||||
EquipmentSlot.MAINHAND,
|
||||
EquipmentSlot.FEET, EquipmentSlot.LEGS, EquipmentSlot.CHEST, EquipmentSlot.HEAD,
|
||||
EquipmentSlot.OFFHAND
|
||||
|
||||
Reference in new issue
Block a user