Skip to content

Commit

Permalink
Switches from trove to fastutil. (#3584)
Browse files Browse the repository at this point in the history
This is mainly to prepare for forge potentially stop shipping trove.
  • Loading branch information
yueh authored and fscan committed Jul 8, 2018
1 parent bde76d1 commit 96af371
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

import gnu.trove.map.TObjectByteMap;
import gnu.trove.map.hash.TObjectByteHashMap;
import it.unimi.dsi.fastutil.objects.Object2ByteMap;
import it.unimi.dsi.fastutil.objects.Object2ByteOpenHashMap;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;

Expand Down Expand Up @@ -60,7 +60,7 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
* <p/>
* The cache will be updated from the server.
*/
private final TObjectByteMap<IPart> cache = new TObjectByteHashMap<>();
private final Object2ByteMap<IPart> cache = new Object2ByteOpenHashMap<>();

/**
* Adds the used and max channel to the tool tip
Expand Down Expand Up @@ -105,7 +105,7 @@ public List<String> getWailaBody( final IPart part, final List<String> currentTo
*
* @return used channels on the cable
*/
private byte getUsedChannels( final IPart part, final NBTTagCompound tag, final TObjectByteMap<IPart> cache )
private byte getUsedChannels( final IPart part, final NBTTagCompound tag, final Object2ByteMap<IPart> cache )
{
final byte usedChannels;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

import gnu.trove.map.TObjectLongMap;
import gnu.trove.map.hash.TObjectLongHashMap;
import it.unimi.dsi.fastutil.objects.Object2LongMap;
import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap;
import mcp.mobius.waila.api.ITaggedList;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
Expand Down Expand Up @@ -62,7 +62,7 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
* <p/>
* The cache will be updated from the server.
*/
private final TObjectLongMap<TileEntity> cache = new TObjectLongHashMap<>();
private final Object2LongMap<TileEntity> cache = new Object2LongOpenHashMap<>();

/**
* Adds the current and max power to the tool tip
Expand Down

0 comments on commit 96af371

Please sign in to comment.