mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-25 14:34:37 +00:00
Clear data array on start
Use names instead of class in the data gathering.
This commit is contained in:
1 parent
f87ac13152
commit
c9ca27b86d
2 files changed
+3
-1
No files matched your search
@@ -2,6 +2,7 @@ package mcp.mobius.opis.commands;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import mcp.mobius.opis.modOpis;
|
||||
import mcp.mobius.opis.data.EntityManager;
|
||||
import mcp.mobius.opis.data.TileEntityManager;
|
||||
import mcp.mobius.opis.server.OpisServerTickHandler;
|
||||
import net.minecraft.command.CommandBase;
|
||||
@@ -32,6 +33,7 @@ public class CommandStart extends CommandBase {
|
||||
OpisServerTickHandler.instance.profilerRunningTicks = 0;
|
||||
TileEntityManager.references.clear();
|
||||
TileEntityManager.stats.clear();
|
||||
EntityManager.stats.clear();
|
||||
|
||||
PacketDispatcher.sendPacketToAllPlayers(new Packet3Chat(ChatMessageComponent.createFromText(String.format("\u00A7oOpis started with a tick delay %s.", modOpis.profilerDelay))));
|
||||
//notifyAdmins(icommandsender, "Opis started with a tick delay %s.", new Object[] {modOpis.profilerDelay});
|
||||
|
||||
@@ -24,7 +24,7 @@ public class EntityManager {
|
||||
public static void addEntity(Entity ent, long timing){
|
||||
int entID = ent.entityId;
|
||||
String entName;
|
||||
entName = ent.getClass().getName();
|
||||
entName = getEntityName(ent); //ent.getClass().getName();
|
||||
|
||||
if (!(stats.containsKey(entID)))
|
||||
stats.put(entID, new EntityStats(entID, entName, ent.dimension, ent.posX, ent.posY, ent.posZ));
|
||||
|
||||
Reference in new issue
Block a user