Class ItemHolder

java.lang.Object
net.lcc.sollib.api.common.registry.SHolder<net.minecraft.world.item.Item>
net.lcc.sollib.api.common.registry.holder.ItemHolder
All Implemented Interfaces:
Supplier<net.minecraft.world.item.Item>

public class ItemHolder extends SHolder<net.minecraft.world.item.Item>
A holder class for item registry using a SolModContainer
  • Constructor Details

  • Method Details

    • getRegistry

      public net.minecraft.core.Registry<net.minecraft.world.item.Item> getRegistry()
      Overrides:
      getRegistry in class SHolder<net.minecraft.world.item.Item>
    • withFuel

      public ItemHolder withFuel(int fuelDuration)
      Registers the item as a fuel source
      Parameters:
      fuelDuration - the length in ticks this fuel source burns
    • isFuel

      public boolean isFuel()
    • getFuelDuration

      public int getFuelDuration()
    • withTags

      @SafeVarargs public final ItemHolder withTags(net.minecraft.tags.TagKey<net.minecraft.world.item.Item>... tags)
      Registers this item to the supplied tags
      Parameters:
      tags - the tag keys to register the item to
    • getTags

      public List<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>> getTags()
    • withModel

      public ItemHolder withModel(net.minecraft.data.models.model.ModelTemplate model)
      The model type of this item for datagen
    • hasModel

      public boolean hasModel()
    • getModel

      public net.minecraft.data.models.model.ModelTemplate getModel()