mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 03:59:45 +00:00
Use generics for Chromosome type, begin unifying code
This commit is contained in:
1 parent
a8270ef365
commit
43e41034f6
217 files changed
+3148
-2417
No files matched your search
@@ -15,7 +15,6 @@ import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
@@ -69,7 +68,7 @@ public class MailAddress implements INbtWritable, IMailAddress {
|
||||
gameProfile = invalidGameProfile;
|
||||
} else if (nbt.hasKey("profile")) {
|
||||
NBTTagCompound profileTag = nbt.getCompoundTag("profile");
|
||||
gameProfile = NBTUtil.readGameProfileFromNBT(profileTag);
|
||||
gameProfile = PlayerUtil.readGameProfileFromNBT(profileTag);
|
||||
}
|
||||
|
||||
this.type = type;
|
||||
@@ -136,12 +135,12 @@ public class MailAddress implements INbtWritable, IMailAddress {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
public void writeToNBT(@Nonnull NBTTagCompound nbttagcompound) {
|
||||
nbttagcompound.setString("TP", type.toString());
|
||||
|
||||
if (gameProfile != null) {
|
||||
NBTTagCompound profileNbt = new NBTTagCompound();
|
||||
NBTUtil.writeGameProfile(profileNbt, gameProfile);
|
||||
PlayerUtil.writeGameProfile(profileNbt, gameProfile);
|
||||
nbttagcompound.setTag("profile", profileNbt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user