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 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 theindex
of thearray
.static Property
create(PropertyDelegate delegate, int index)
Creates a new property that accesses theindex
of thedelegate
.abstract int
get()
boolean
hasChanged()
Returns true if the value of this property has changed since the last call tohasChanged()
.abstract void
set(int value)
-
Field Details
-
oldValue
private int oldValue
-
-
Constructor Details
-
Property
public Property()
-
-
Method Details
-
create
Creates a new property that accesses theindex
of thedelegate
. -
create
Creates a new property that accesses theindex
of 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()
.
-