DelegateItemContainer

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 T delegate

getDelegate

public T getDelegate ()

Method getDelegate.

readAction

protected V readAction (final Supplier action)

Method readAction.

Parameters:
final Supplier action

writeAction

protected V writeAction (final Supplier action)

Method writeAction.

Parameters:
final Supplier action

internal_clear

protected ClearTransaction internal_clear ()

Method internal_clear.

internal_getSlot

protected ItemStack internal_getSlot (final short slot)

Method internal_getSlot.

Parameters:
final short slot

internal_setSlot

protected ItemStack internal_setSlot (final short slot, final ItemStack itemStack)

Method internal_setSlot.

Parameters:
final short slot
final ItemStack itemStack

internal_removeSlot

protected ItemStack internal_removeSlot (final short slot)

Method internal_removeSlot.

Parameters:
final short slot

cantAddToSlot

protected boolean cantAddToSlot (final short slot, final ItemStack itemStack, final ItemStack slotItemStack)

Method cantAddToSlot.

Parameters:
final short slot
final ItemStack itemStack
final ItemStack slotItemStack

cantRemoveFromSlot

protected boolean cantRemoveFromSlot (final short slot)

Method cantRemoveFromSlot.

Parameters:
final short slot

cantDropFromSlot

protected boolean cantDropFromSlot (final short slot)

Method cantDropFromSlot.

Parameters:
final short slot

cantMoveToSlot

protected boolean cantMoveToSlot (final ItemContainer fromContainer, final short slotFrom)

Method cantMoveToSlot.

Parameters:
final ItemContainer fromContainer
final short slotFrom

testFilter

private boolean testFilter (final FilterActionType actionType, final short slot, final ItemStack itemStack)

Method testFilter.

Parameters:
final FilterActionType actionType
final short slot
final ItemStack itemStack

getCapacity

public short getCapacity ()

Method getCapacity.

clear

public ClearTransaction clear ()

Method clear.

clone

public DelegateItemContainer clone ()

Method clone.

isEmpty

public boolean isEmpty ()

Method isEmpty.

setGlobalFilter

public void setGlobalFilter (@Nonnull final FilterType globalFilter)

Method setGlobalFilter.

Parameters:
@Nonnull final FilterType globalFilter

setSlotFilter

public void setSlotFilter (final FilterActionType actionType, final short slot, @Nullable final SlotFilter filter)

Method setSlotFilter.

Parameters:
final FilterActionType actionType
final short slot
@Nullable final SlotFilter filter

Int2ObjectConcurrentHashMap

public new Int2ObjectConcurrentHashMap ()

Method Int2ObjectConcurrentHashMap.

registerChangeEvent

public EventRegistration registerChangeEvent (final short priority, @Nonnull final Consumer consumer)

Method registerChangeEvent.

Parameters:
final short priority
@Nonnull final Consumer consumer

ItemContainerChangeEvent

public new ItemContainerChangeEvent (this, event.transaction()

Method ItemContainerChangeEvent.

Parameters:
this this
event.transaction( event.transaction(

sendUpdate

protected void sendUpdate (@Nonnull final Transaction transaction)

Method sendUpdate.

Parameters:
@Nonnull final Transaction transaction

equals

public boolean equals (@Nullable final Object o)

Method equals.

Parameters:
@Nullable final Object o

if

public else if (that.delegate == null)

Method if.

Parameters:
that.delegate == null

hashCode

public int hashCode ()

Method hashCode.