Package foundry.veil.fabric.util
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
ConstructorsConstructorDescriptionFabricReloadListener(net.minecraft.resources.ResourceLocation id, net.minecraft.server.packs.resources.PreparableReloadListener listener) Creates an instance of aFabricReloadListenerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationgetName()inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.net.minecraft.server.packs.resources.PreparableReloadListenerlistener()Returns the value of thelistenerrecord 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) toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aFabricReloadListenerrecord class.- Parameters:
id- the value for theidrecord componentlistener- the value for thelistenerrecord component
-
-
Method Details
-
getFabricId
public net.minecraft.resources.ResourceLocation getFabricId()- Specified by:
getFabricIdin interfacenet.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:
reloadin interfacenet.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. -
equals
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 withObjects::equals(Object,Object). -
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. -
getName
- Specified by:
getNamein interfacenet.minecraft.server.packs.resources.PreparableReloadListener
-
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
listener
public net.minecraft.server.packs.resources.PreparableReloadListener listener()Returns the value of thelistenerrecord component.- Returns:
- the value of the
listenerrecord component
-