Use newer Java features in places where it makes sense and more (#1009)
This commit is contained in:
1 parent
28cb136c6b
commit
7fb5e47da5
34 files changed
+338
-399
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
package carpet.utils;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
|
||||
Reference in new issue
Block a user