Package software.bluelib.entity.variant
Class VariantLoader
java.lang.Object
software.bluelib.entity.variant.VariantLoader
- All Implemented Interfaces:
IVariantEntityBase
A
public class that implements the IVariantEntityBase interface that manages the loading and storage of entity variants.
The class handles loading and merging of JSON Data by utilizing the JSONLoader and JSONMerger classes.
To load the Variants it loops through all resources in a folder and merges them into a single JsonObject.
The merged JSON data is then parsed into {} instances and stored in AllVariants.
loadVariants(String, MinecraftServer, String)- Loads and merges variant data by looping thru all resources in a folder.
- Since:
- 1.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidloadVariants(String pFolderPath, net.minecraft.server.MinecraftServer pServer, String pEntityName) Apublic static voidthat loads and merges variant data from JSON resources in the specified folder path.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.bluelib.interfaces.variant.base.IVariantEntityBase
getEntityVariants, getTextureLocation
-
Field Details
-
AllVariants
Apublic staticMapthat stores all variants of an entity.The field is used to store all variants of an entity and is accessed by the
ParameterUtilsclass.
We don't recommend using this field directly unless you know what you are doing.- Since:
- 1.3.0
-
-
Constructor Details
-
VariantLoader
public VariantLoader()
-
-
Method Details
-
loadVariants
public static void loadVariants(String pFolderPath, net.minecraft.server.MinecraftServer pServer, String pEntityName) Apublic static voidthat loads and merges variant data from JSON resources in the specified folder path.The method loops through all resources in the folder and merges them into a single
JsonObject.
The merged JSON data is then parsed intoJsonObjectinstances and stored inAllVariants.
-