mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-21 20:52:14 +00:00
Directory structure for ForgeGradle
This commit is contained in:
1 parent
3d8319dc6b
commit
04764c83c9
214 files changed
+104
-6
No files matched your search
@@ -0,0 +1,38 @@
|
||||
package mcp.mobius.opis.data.profilers;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import mcp.mobius.opis.data.holders.basetypes.CoordinatesBlock;
|
||||
import mcp.mobius.opis.data.profilers.Clock.IClock;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
|
||||
|
||||
public class ProfilerRenderBlock extends ProfilerAbstract {
|
||||
|
||||
private IClock clock = Clock.getNewClock();
|
||||
public HashMap<CoordinatesBlock, DescriptiveStatistics> data = new HashMap<CoordinatesBlock, DescriptiveStatistics>();
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Object key1, Object key2, Object key3, Object key4) {
|
||||
CoordinatesBlock coord = new CoordinatesBlock(Minecraft.getMinecraft().theWorld.provider.dimensionId, (Integer)key2, (Integer)key3, (Integer)key4);
|
||||
|
||||
if (!data.containsKey(coord))
|
||||
data.put(coord, new DescriptiveStatistics());
|
||||
clock.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(Object key1, Object key2, Object key3, Object key4) {
|
||||
CoordinatesBlock coord = new CoordinatesBlock(Minecraft.getMinecraft().theWorld.provider.dimensionId, (Integer)key2, (Integer)key3, (Integer)key4);
|
||||
|
||||
clock.stop();
|
||||
data.get(coord).addValue((double)clock.getDelta());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user