src/main/java/brokenlib/common/notification/Notification.java
/**
     * Serializes the notifications in order to send it to the other side.
     * @param side The side this method is called on
     * @return the serialized notification
     */
Serializes the notifications in order to send it to the other side.
@param side The side this method is called on
@return the serialized notification
Serializes the notifications in order to send it to the other side . @param side The side this method is called on @return the serialized notification
public NBTTagCompound toNBT(Side side) {
        NBTTagCompound nbt = new NBTTagCompound();
        if(side.isClient()) {
            this.parameters.stream().filter(NotifParameter::canBeOverride).forEach(param -> param.writeToNBT(nbt));
        } else {
            this.parameters.stream().filter(NotifParameter::shouldBeSent).forEach(param -> param.writeToNBT(nbt));
        }
        return nbt;
    }
public NBTTagCompound toNBT ( Side side ) { NBTTagCompound nbt = new NBTTagCompound ( ) ; if ( side . isClient ( ) ) { this . parameters . stream ( ) . filter ( NotifParameter :: canBeOverride ) . forEach ( param -> param . writeToNBT ( nbt ) ) ; } else { this . parameters . stream ( ) . filter ( NotifParameter :: shouldBeSent ) . forEach ( param -> param . writeToNBT ( nbt ) ) ; } return nbt ; }
Serializes the notifications in order to send it to the other side.
Serializes the notifications in order to send it to the other side .