diff --git a/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java b/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java index 2f9a0212da..b420f619d5 100644 --- a/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java +++ b/src/main/java/dan200/computercraft/client/proxy/ComputerCraftProxyClient.java @@ -8,11 +8,7 @@ import dan200.computercraft.ComputerCraft; import dan200.computercraft.client.gui.*; -import dan200.computercraft.client.render.ItemPocketRenderer; -import dan200.computercraft.client.render.ItemPrintoutRenderer; -import dan200.computercraft.client.render.RenderOverlayCable; -import dan200.computercraft.client.render.TileEntityCableRenderer; -import dan200.computercraft.client.render.TileEntityMonitorRenderer; +import dan200.computercraft.client.render.*; import dan200.computercraft.shared.command.ContainerViewComputer; import dan200.computercraft.shared.computer.blocks.ComputerState; import dan200.computercraft.shared.computer.blocks.TileComputer; @@ -35,7 +31,7 @@ import dan200.computercraft.shared.turtle.blocks.TileTurtle; import dan200.computercraft.shared.turtle.entity.TurtleVisionCamera; import dan200.computercraft.shared.util.Colour; -import gnu.trove.map.hash.TIntIntHashMap; +import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiNewChat; @@ -75,7 +71,7 @@ public class ComputerCraftProxyClient extends ComputerCraftProxyCommon { - private static TIntIntHashMap lastCounts = new TIntIntHashMap(); + private static Int2IntOpenHashMap lastCounts = new Int2IntOpenHashMap(); private long m_tick; private long m_renderFrame; diff --git a/src/main/java/dan200/computercraft/core/tracking/ComputerTracker.java b/src/main/java/dan200/computercraft/core/tracking/ComputerTracker.java index 1ea5179ad3..8a11c0e1aa 100644 --- a/src/main/java/dan200/computercraft/core/tracking/ComputerTracker.java +++ b/src/main/java/dan200/computercraft/core/tracking/ComputerTracker.java @@ -1,7 +1,7 @@ package dan200.computercraft.core.tracking; import dan200.computercraft.core.computer.Computer; -import gnu.trove.map.hash.TObjectLongHashMap; +import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap; import javax.annotation.Nullable; import java.lang.ref.WeakReference; @@ -18,13 +18,13 @@ public class ComputerTracker private long serverCount; private long serverTime; - private final TObjectLongHashMap fields; + private final Object2LongOpenHashMap fields; public ComputerTracker( Computer computer ) { this.computer = new WeakReference<>( computer ); this.computerId = computer.getID(); - this.fields = new TObjectLongHashMap<>(); + this.fields = new Object2LongOpenHashMap<>(); } ComputerTracker( ComputerTracker timings ) @@ -39,7 +39,7 @@ public ComputerTracker( Computer computer ) this.serverCount = timings.serverCount; this.serverTime = timings.serverTime; - this.fields = new TObjectLongHashMap<>( timings.fields ); + this.fields = new Object2LongOpenHashMap<>( timings.fields ); } @Nullable @@ -90,7 +90,7 @@ void addValue( TrackingField field, long change ) { synchronized( fields ) { - fields.adjustOrPutValue( field, change, change ); + fields.addTo( field, change ); } }