try to avoid creating an nbt tag where its only going to be read

This commit is contained in:
Thiakil authored and Dave Smith committed 2019-02-26 06:43:19 -07:00
1 parent 4f7db32e6f
commit da0497b8f1
4 files changed
+24 -4

No files matched your search

+3 -1
View File
@@ -15,6 +15,8 @@ import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.Constants.NBT;
import javax.annotation.Nullable;
public enum Upgrade
{
SPEED("speed", 8, EnumColor.RED),
@@ -127,7 +129,7 @@ public enum Upgrade
return ret;
}
public static Map<Upgrade, Integer> buildMap(NBTTagCompound nbtTags)
public static Map<Upgrade, Integer> buildMap(@Nullable NBTTagCompound nbtTags)
{
Map<Upgrade, Integer> upgrades = new HashMap<>();