Class ExpandContainerSingleItem

java.lang.Object
com.blamejared.crafttweaker.natives.world.ExpandContainerSingleItem

@ZenRegister public class ExpandContainerSingleItem extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.ItemStack
    getTheItem(net.minecraft.world.ticks.ContainerSingleItem internal)
    Gets the only item held by the container.
    static net.minecraft.world.item.ItemStack
    removeTheItem(net.minecraft.world.ticks.ContainerSingleItem internal)
    Removes the item stored by the container.
    static void
    setTheItem(net.minecraft.world.ticks.ContainerSingleItem internal, net.minecraft.world.item.ItemStack stack)
    Sets the only item held by the container.
    static net.minecraft.world.item.ItemStack
    splitTheItem(net.minecraft.world.ticks.ContainerSingleItem internal, int amount)
    Removes up to the specified amount of the contained item.

    Methods inherited from class java.lang.Object

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

    • ExpandContainerSingleItem

      public ExpandContainerSingleItem()
  • Method Details

    • getTheItem

      public static net.minecraft.world.item.ItemStack getTheItem(net.minecraft.world.ticks.ContainerSingleItem internal)
      Gets the only item held by the container.
      Returns:
      The item held by the container.
    • setTheItem

      public static void setTheItem(net.minecraft.world.ticks.ContainerSingleItem internal, net.minecraft.world.item.ItemStack stack)
      Sets the only item held by the container.
      Parameters:
      stack - The new item for te container to hold.
    • splitTheItem

      public static net.minecraft.world.item.ItemStack splitTheItem(net.minecraft.world.ticks.ContainerSingleItem internal, int amount)
      Removes up to the specified amount of the contained item.
      Parameters:
      amount - The maximum amount of the item to split off from the contained item.
      Returns:
      The item that was split from the contained item.
    • removeTheItem

      public static net.minecraft.world.item.ItemStack removeTheItem(net.minecraft.world.ticks.ContainerSingleItem internal)
      Removes the item stored by the container.
      Returns:
      The new copy of the removed item.