src/main/java/brokenlib/common/notification/ServerNotificationManager.java
/**
     * Used to data persistence. It loads all the notifications from a NBTTagCompound.
     * @param nbt The serialized manager
     */
Used to data persistence. It loads all the notifications from a NBTTagCompound.
@param nbt The serialized manager
Used to data persistence . It loads all the notifications from a NBTTagCompound . @param nbt The serialized manager
public void loadFromNBT(NBTTagCompound nbt) {
        this.notifications.clear();
        this.ids.clear();
        NBTTagList list = nbt.getTagList("notifications", Constants.NBT.TAG_COMPOUND);
        for (int i = 0; i < list.tagCount(); i++) {
            NBTTagCompound n = list.getCompoundTagAt(i);
            LinkedNotification notification = new LinkedNotification(n);
            if (!notification.hasToBeRemoved)
                this.notifications.put(getNextAvailableId(), notification);
        }
    }
public void loadFromNBT ( NBTTagCompound nbt ) { this . notifications . clear ( ) ; this . ids . clear ( ) ; NBTTagList list = nbt . getTagList ( "notifications" , Constants . NBT . TAG_COMPOUND ) ; for ( int i = 0 ; i < list . tagCount ( ) ; i ++ ) { NBTTagCompound n = list . getCompoundTagAt ( i ) ; LinkedNotification notification = new LinkedNotification ( n ) ; if ( ! notification . hasToBeRemoved ) this . notifications . put ( getNextAvailableId ( ) , notification ) ; } }
Used to data persistence.
Used to data persistence .