public class DelegateItemContainer
Class DelegateItemContainer. Provides delegateitemcontainer functionality for the Hytale server.
java.lang.Object > DelegateItemContainer
Field Summary
delegate
private
T
delegate
Field delegate.
globalFilter
private
FilterType
globalFilter
Field globalFilter.
map
final
Int2ObjectConcurrentHashMap
map
Field map.
filter
final
SlotFilter
filter
Field filter.
thisRegistration
final
EventRegistration
thisRegistration
Field thisRegistration.
delegateRegistration
final
EventRegistration[]
delegateRegistration
Field delegateRegistration.
that
final
DelegateItemContainer>
that
Field that.
Method Detail
DelegateItemContainer
public
public
DelegateItemContainer
(final T delegate)
Method DelegateItemContainer.
- Parameters:
final Tdelegate
getDelegate
public
T
getDelegate
()
Method getDelegate.
readAction
protected
V
readAction
(final Supplier action)
Method readAction.
- Parameters:
final Supplieraction
writeAction
protected
V
writeAction
(final Supplier action)
Method writeAction.
- Parameters:
final Supplieraction
internal_getSlot
Method internal_getSlot.
- Parameters:
final shortslot
internal_removeSlot
Method internal_removeSlot.
- Parameters:
final shortslot
cantAddToSlot
protected
boolean
cantAddToSlot
(final short slot, final ItemStack itemStack, final ItemStack slotItemStack)
Method cantAddToSlot.
- Parameters:
final shortslotfinal ItemStackitemStackfinal ItemStackslotItemStack
cantRemoveFromSlot
protected
boolean
cantRemoveFromSlot
(final short slot)
Method cantRemoveFromSlot.
- Parameters:
final shortslot
cantDropFromSlot
protected
boolean
cantDropFromSlot
(final short slot)
Method cantDropFromSlot.
- Parameters:
final shortslot
cantMoveToSlot
Method cantMoveToSlot.
- Parameters:
final ItemContainerfromContainerfinal shortslotFrom
testFilter
private
boolean
testFilter
(final FilterActionType actionType, final short slot, final ItemStack itemStack)
Method testFilter.
- Parameters:
final FilterActionTypeactionTypefinal shortslotfinal ItemStackitemStack
getCapacity
public
short
getCapacity
()
Method getCapacity.
isEmpty
public
boolean
isEmpty
()
Method isEmpty.
setSlotFilter
public
void
setSlotFilter
(final FilterActionType actionType, final short slot, @Nullable final SlotFilter filter)
Method setSlotFilter.
- Parameters:
final FilterActionTypeactionTypefinal shortslot@Nullable final SlotFilterfilter
Int2ObjectConcurrentHashMap
public
new
Int2ObjectConcurrentHashMap
()
Method Int2ObjectConcurrentHashMap.
registerChangeEvent
public
EventRegistration
registerChangeEvent
(final short priority, @Nonnull final Consumer consumer)
Method registerChangeEvent.
- Parameters:
final shortpriority@Nonnull final Consumerconsumer
ItemContainerChangeEvent
public
new
ItemContainerChangeEvent
(this, event.transaction()
Method ItemContainerChangeEvent.
- Parameters:
thisthisevent.transaction(event.transaction(
equals
public
boolean
equals
(@Nullable final Object o)
Method equals.
- Parameters:
@Nullable final Objecto
if
public
else
if
(that.delegate == null)
Method if.
- Parameters:
that.delegate ==null
hashCode
public
int
hashCode
()
Method hashCode.