Record Class FabricReloadListener

java.lang.Object
java.lang.Record
foundry.veil.fabric.util.FabricReloadListener
All Implemented Interfaces:
net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener, net.minecraft.server.packs.resources.PreparableReloadListener

public record FabricReloadListener(net.minecraft.resources.ResourceLocation id, net.minecraft.server.packs.resources.PreparableReloadListener listener) extends Record implements net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
  • Nested Class Summary

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

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
  • Constructor Summary

    Constructors
    Constructor
    Description
    FabricReloadListener(net.minecraft.resources.ResourceLocation id, net.minecraft.server.packs.resources.PreparableReloadListener listener)
    Creates an instance of a FabricReloadListener record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.resources.ResourceLocation
     
     
    int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    id()
    Returns the value of the id record component.
    net.minecraft.server.packs.resources.PreparableReloadListener
    Returns the value of the listener record component.
    reload(net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier barrier, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler, net.minecraft.util.profiling.ProfilerFiller profiler2, Executor executor, Executor executor2)
     
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener

    getFabricDependencies
  • Constructor Details

    • FabricReloadListener

      public FabricReloadListener(net.minecraft.resources.ResourceLocation id, net.minecraft.server.packs.resources.PreparableReloadListener listener)
      Creates an instance of a FabricReloadListener record class.
      Parameters:
      id - the value for the id record component
      listener - the value for the listener record component
  • Method Details

    • getFabricId

      public net.minecraft.resources.ResourceLocation getFabricId()
      Specified by:
      getFabricId in interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
    • reload

      public CompletableFuture<Void> reload(net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier barrier, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler, net.minecraft.util.profiling.ProfilerFiller profiler2, Executor executor, Executor executor2)
      Specified by:
      reload in interface net.minecraft.server.packs.resources.PreparableReloadListener
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • getName

      public String getName()
      Specified by:
      getName in interface net.minecraft.server.packs.resources.PreparableReloadListener
    • id

      public net.minecraft.resources.ResourceLocation id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • listener

      public net.minecraft.server.packs.resources.PreparableReloadListener listener()
      Returns the value of the listener record component.
      Returns:
      the value of the listener record component