mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Java 7 and 8 cleanup
Diamond operator <> Lambdas and method references
This commit is contained in:
1 parent
3db03edbc9
commit
b72d6efab3
234 files changed
+1614
-2253
No files matched your search
@@ -25,7 +25,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class SoundHandler
|
||||
{
|
||||
public static Map<String, Map<String, IResettableSound>> soundMaps = new HashMap<String, Map<String, IResettableSound>>();
|
||||
public static Map<String, Map<String, IResettableSound>> soundMaps = new HashMap<>();
|
||||
|
||||
public static Map<ISound, String> invPlayingSounds;
|
||||
|
||||
@@ -105,13 +105,7 @@ public class SoundHandler
|
||||
|
||||
public static Map<String, IResettableSound> getMap(String name)
|
||||
{
|
||||
Map<String, IResettableSound> map = soundMaps.get(name);
|
||||
|
||||
if(map == null)
|
||||
{
|
||||
map = new HashMap<String, IResettableSound>();
|
||||
soundMaps.put(name, map);
|
||||
}
|
||||
Map<String, IResettableSound> map = soundMaps.computeIfAbsent(name, k -> new HashMap<>());
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user