Use newer Java features in places where it makes sense and more (#1009)

This commit is contained in:
altrisi authored and GitHub committed 2021-08-03 07:32:40 -03:00
1 parent 28cb136c6b
commit 7fb5e47da5
34 files changed
+338 -399

No files matched your search

+2 -10
View File
@@ -50,19 +50,11 @@ public class CarpetProfiler
TILEENTITY
}
public static class ProfilerToken
public static record ProfilerToken(TYPE type, Object section, long start, World world)
{
public final TYPE type;
public final Object section;
public final long start;
public final World world;
public ProfilerToken(TYPE type, Object section, World world)
{
this.type = type;
this.section = section;
this.start = System.nanoTime();
this.world = world;
this(type, section, System.nanoTime(), world);
}
}