Package dev.jaxydog.astral.content.data
Class AstralJsonDataLoader
java.lang.Object
net.minecraft.resource.SinglePreparationResourceReloader<Map<net.minecraft.util.Identifier,com.google.gson.JsonElement>>
net.minecraft.resource.JsonDataLoader
dev.jaxydog.astral.content.data.AstralJsonDataLoader
- All Implemented Interfaces:
Registered,Registered.Common,net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener,net.minecraft.resource.ResourceReloader
- Direct Known Subclasses:
CurrencyLoader
public abstract class AstralJsonDataLoader
extends net.minecraft.resource.JsonDataLoader
implements net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener, Registered.Common
An extension of a
JsonDataLoader that provides additional functionality.
This type is automatically registered.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.jaxydog.astral.register.Registered
Registered.All, Registered.Client, Registered.Common, Registered.Generated, Registered.ServerNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
net.minecraft.resource.ResourceReloader.Synchronizer -
Constructor Summary
ConstructorsConstructorDescriptionAstralJsonDataLoader(com.google.gson.Gson gson, String folder) Creates a new JSON data loader.AstralJsonDataLoader(String folder) Creates a new JSON data loader. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.IdentifierReturns this value's associated registry identifier path.voidRegisters this value on both the client and server environments.Methods inherited from class net.minecraft.resource.JsonDataLoader
load, prepareMethods inherited from class net.minecraft.resource.SinglePreparationResourceReloader
apply, reloadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
getFabricDependenciesMethods inherited from interface dev.jaxydog.astral.register.Registered
getRegistryIdMethods inherited from interface net.minecraft.resource.ResourceReloader
getName, reload
-
Constructor Details
-
AstralJsonDataLoader
Creates a new JSON data loader.- Parameters:
gson- The GSON instance.folder- The folder name.- Since:
- 2.0.0
-
AstralJsonDataLoader
Creates a new JSON data loader.- Parameters:
folder- The folder name.- Since:
- 2.0.0
-
-
Method Details
-
getRegistryPath
Description copied from interface:RegisteredReturns this value's associated registry identifier path.This is by default used to determine the
Identifierprovided byRegistered.getRegistryId(). For example, returning"my_item"will cause the associated identifier to beastral:my_item.- Specified by:
getRegistryPathin interfaceRegistered- Returns:
- An identifier path.
-
getFabricId
public net.minecraft.util.Identifier getFabricId()- Specified by:
getFabricIdin interfacenet.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener
-
registerCommon
public void registerCommon()Description copied from interface:Registered.CommonRegisters this value on both the client and server environments.The contained code will run for both environments. If you only want one or the other, see its sister interfaces.
- Specified by:
registerCommonin interfaceRegistered.Common- See Also:
-