Use the var keyword in KeyMappings.java

This commit is contained in:
Username404-59 2021-05-14 12:31:01 +02:00
parent a65f536304
commit d342c020b8
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 4 deletions

View File

@ -15,8 +15,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.io.File;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@Mixin(Options.class)
@ -27,8 +25,8 @@ abstract class KeyMappings {
@Inject(method = "<init>*", at = @At("RETURN"))
private void onSettingsConstructed(Minecraft minecraft, File file, CallbackInfo ci) {
Map<String, Integer> categoryMap = KeysAccessor.getSortedCategoryMap();
List<KeyMapping> newKeys = Lists.newArrayList(keyMappings);
var categoryMap = KeysAccessor.getSortedCategoryMap();
var newKeys = Lists.newArrayList(keyMappings);
for (KeyMapping key : keysToAdd) {
if (!categoryMap.containsKey(key.getCategory())) {
Optional<Integer> biggest = categoryMap.values().stream().max(Integer::compareTo);