Class Property

java.lang.Object
net.minecraft.screen.Property

public abstract class Property
extends Object
An integer property that is stored in a ScreenHandler.

Property instances are used for tracking integer properties in property delegates and other sources of integer properties, and sending needed content updates to listeners.

See Also:
ScreenHandler.addProperty(net.minecraft.screen.Property)
  • Field Summary

    Fields
    Modifier and Type Field Description
    private int oldValue  
  • Constructor Summary

    Constructors
    Constructor Description
    Property()  
  • Method Summary

    Modifier and Type Method Description
    static Property create()
    Creates a new property that is not attached to any other objects.
    static Property create​(int[] array, int index)
    Creates a new property that accesses the index of the array.
    static Property create​(PropertyDelegate delegate, int index)
    Creates a new property that accesses the index of the delegate.
    abstract int get()  
    boolean hasChanged()
    Returns true if the value of this property has changed since the last call to hasChanged().
    abstract void set​(int value)  

    Methods inherited from class java.lang.Object

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

    • oldValue

      private int oldValue
  • Constructor Details

    • Property

      public Property()
  • Method Details

    • create

      public static Property create​(PropertyDelegate delegate, int index)
      Creates a new property that accesses the index of the delegate.
    • create

      public static Property create​(int[] array, int index)
      Creates a new property that accesses the index of the array.
    • create

      public static Property create()
      Creates a new property that is not attached to any other objects.
    • get

      public abstract int get()
    • set

      public abstract void set​(int value)
    • hasChanged

      public boolean hasChanged()
      Returns true if the value of this property has changed since the last call to hasChanged().