Class FoliosSourceData

java.lang.Object
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<com.google.gson.JsonElement>
net.ixdarklord.folios.internal.FoliosSourceData
All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener

public final class FoliosSourceData extends net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<com.google.gson.JsonElement>
The rows of FoliosSources: on the server, those data packs add (data/<namespace>/folios/sources/*.json) and the sending of every server source to players; on the client, what the server sent.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier, net.minecraft.server.packs.resources.PreparableReloadListener.SharedState, net.minecraft.server.packs.resources.PreparableReloadListener.StateKey<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final FoliosSourceData
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    apply(Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement> files, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler)
     
    static void
    Forgets what a server sent, as the client leaves it.
    static boolean
    hasReceived(net.minecraft.resources.Identifier source)
     
    static List<String>
    packRemoved(net.minecraft.resources.Identifier source)
    The ids data packs took out of a source.
    packRows(net.minecraft.resources.Identifier source)
    The rows data packs give a source.
    static List<net.minecraft.resources.Identifier>
     
    static void
    A source the server sent: kept, and books written again if its rows changed.
    received(net.minecraft.resources.Identifier source)
     
    static List<String>
    removed(net.minecraft.resources.Identifier source)
    The ids the server's data packs took out of a source, to take out of the client's rows too.
    static void
    send(net.minecraft.server.MinecraftServer server, net.minecraft.resources.Identifier source)
    Sends a server source to every player.
    static void
    sendAll(net.minecraft.server.level.ServerPlayer player)
    Sends every server source to a player, as they join.
    static void
    tick(net.minecraft.server.MinecraftServer server)
    At the end of a tick: after data packs reloaded, every source is sent again.

    Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener

    prepare, scanDirectory, scanDirectory

    Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener

    reload

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    getName, prepareSharedState
  • Field Details

  • Method Details

    • apply

      protected void apply(Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement> files, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler)
      Specified by:
      apply in class net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement>>
    • packRows

      public static List<FoliosSources.Row> packRows(net.minecraft.resources.Identifier source)
      The rows data packs give a source.
    • packRemoved

      public static List<String> packRemoved(net.minecraft.resources.Identifier source)
      The ids data packs took out of a source.
    • packSources

      public static List<net.minecraft.resources.Identifier> packSources()
    • sendAll

      public static void sendAll(net.minecraft.server.level.ServerPlayer player)
      Sends every server source to a player, as they join.
    • send

      public static void send(net.minecraft.server.MinecraftServer server, net.minecraft.resources.Identifier source)
      Sends a server source to every player.
    • tick

      public static void tick(net.minecraft.server.MinecraftServer server)
      At the end of a tick: after data packs reloaded, every source is sent again.
    • receive

      public static void receive(FoliosPayloads.Source payload)
      A source the server sent: kept, and books written again if its rows changed.
    • received

      public static List<FoliosSources.Row> received(net.minecraft.resources.Identifier source)
    • removed

      public static List<String> removed(net.minecraft.resources.Identifier source)
      The ids the server's data packs took out of a source, to take out of the client's rows too.
    • hasReceived

      public static boolean hasReceived(net.minecraft.resources.Identifier source)
    • forget

      public static void forget()
      Forgets what a server sent, as the client leaves it.