Class OverrideBuilder

java.lang.Object
io.github.vampirestudios.vampirelib.api.datagen.OverrideBuilder

public class OverrideBuilder extends Object
Instantiate this class in order to provide an optional set of overrides for a given item model JSON.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OverrideBuilder(net.minecraft.resources.ResourceLocation overrideModel)
    Create a new override builder with a given model ID to switch to for this item.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gson.JsonObject
     
    predicate(net.minecraft.resources.ResourceLocation key, float value)
    Adds a new predicate set to dictate when to switch to the provided item model.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OverrideBuilder

      public OverrideBuilder(net.minecraft.resources.ResourceLocation overrideModel)
      Create a new override builder with a given model ID to switch to for this item.
      Parameters:
      overrideModel - The ID of the model to be overridden by.
  • Method Details

    • predicate

      public OverrideBuilder predicate(net.minecraft.resources.ResourceLocation key, float value)
      Adds a new predicate set to dictate when to switch to the provided item model.
      Parameters:
      key - The ID of an item property to check for.
      value - The value of the property for which the override should be carried out.
      Returns:
      The current newly-modified OverrideBuilder instance.
    • build

      public com.google.gson.JsonObject build()