Use the var keyword in KeyMappings.java
This commit is contained in:
parent
a65f536304
commit
d342c020b8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue