public final class ViewType
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ViewType |
ANVIL |
static ViewType |
BEACON |
static ViewType |
BLAST_FURNACE |
static ViewType |
BREWING_STAND |
static ViewType |
CHEST |
static ViewType |
CRAFTING_TABLE |
static ViewType |
DISPENSER |
static ViewType |
DROPPER |
static ViewType |
FURNACE |
static ViewType |
HOPPER |
static ViewType |
PLAYER |
static ViewType |
SHULKER_BOX |
static ViewType |
SMOKER |
static ViewType |
VILLAGER_TRADING |
| Constructor and Description |
|---|
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns) |
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns,
boolean extendable) |
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns,
boolean extendable,
int[] resultSlots) |
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns,
boolean extendable,
int[] resultSlots,
boolean aligned) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPlayerInteractOn(int slot) |
boolean |
equals(java.lang.Object o) |
int |
getColumns() |
java.lang.String |
getIdentifier() |
int |
getMaxSize() |
int[] |
getResultSlots() |
int |
getRows() |
int |
hashCode() |
boolean |
isAligned() |
boolean |
isExtendable() |
boolean |
isResultSlot(int slot) |
int |
normalize(int size)
Normalizes the specified parameter to conform to container constraints and does not exceed or
fail in an attempt to set the container size, e.g.: if player provides inventory rows count
instead of the full inventory size, it will return the inventory size.
|
java.lang.String |
toString() |
public static final ViewType CHEST
public static final ViewType HOPPER
public static final ViewType DROPPER
public static final ViewType DISPENSER
public static final ViewType FURNACE
public static final ViewType BLAST_FURNACE
public static final ViewType CRAFTING_TABLE
public static final ViewType BREWING_STAND
public static final ViewType BEACON
public static final ViewType ANVIL
public static final ViewType SHULKER_BOX
public static final ViewType SMOKER
public static final ViewType VILLAGER_TRADING
public static final ViewType PLAYER
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns)
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns,
boolean extendable)
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns,
boolean extendable,
int[] resultSlots)
ViewType(java.lang.String identifier,
int maxSize,
int rows,
int columns,
boolean extendable,
int[] resultSlots,
boolean aligned)
public java.lang.String getIdentifier()
public int getMaxSize()
public int getRows()
public int getColumns()
public boolean isExtendable()
public int[] getResultSlots()
public boolean isResultSlot(int slot)
public boolean isAligned()
public boolean canPlayerInteractOn(int slot)
public int normalize(int size)
size - The expected size of the container.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object