Package net.minecraft.screen
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.
-
Field Summary
Fields Modifier and Type Field Description private intoldValue -
Constructor Summary
Constructors Constructor Description Property() -
Method Summary
Modifier and Type Method Description static Propertycreate()Creates a new property that is not attached to any other objects.static Propertycreate(int[] array, int index)Creates a new property that accesses theindexof thearray.static Propertycreate(PropertyDelegate delegate, int index)Creates a new property that accesses theindexof thedelegate.abstract intget()booleanhasChanged()Returns true if the value of this property has changed since the last call tohasChanged().abstract voidset(int value)
-
Field Details
-
oldValue
private int oldValue
-
-
Constructor Details
-
Property
public Property()
-
-
Method Details
-
create
Creates a new property that accesses theindexof thedelegate. -
create
Creates a new property that accesses theindexof thearray. -
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 tohasChanged().
-