Switches from trove to fastutil. (#3584)
This is mainly to prepare for forge potentially stop shipping trove.
This commit is contained in:
@@ -27,8 +27,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import gnu.trove.map.TObjectByteMap;
|
import it.unimi.dsi.fastutil.objects.Object2ByteMap;
|
||||||
import gnu.trove.map.hash.TObjectByteHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2ByteOpenHashMap;
|
||||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
* <p/>
|
* <p/>
|
||||||
* The cache will be updated from the server.
|
* 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
|
* Adds the used and max channel to the tool tip
|
||||||
@@ -105,7 +105,7 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
*
|
*
|
||||||
* @return used channels on the cable
|
* @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;
|
final byte usedChannels;
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -28,8 +28,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import gnu.trove.map.TObjectLongMap;
|
import it.unimi.dsi.fastutil.objects.Object2LongMap;
|
||||||
import gnu.trove.map.hash.TObjectLongHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap;
|
||||||
import mcp.mobius.waila.api.ITaggedList;
|
import mcp.mobius.waila.api.ITaggedList;
|
||||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||||
@@ -62,7 +62,7 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
|||||||
* <p/>
|
* <p/>
|
||||||
* The cache will be updated from the server.
|
* 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
|
* Adds the current and max power to the tool tip
|
||||||
|
|||||||
Reference in New Issue
Block a user