CombinedItemContainer

public class CombinedItemContainer extends ItemContainer

Class CombinedItemContainer. Provides combineditemcontainer functionality for the Hytale server.

java.lang.Object > ItemContainer > CombinedItemContainer

Field Summary

capacity

final short capacity

Field capacity.

itemStacks

final ItemStack[] itemStacks

Field itemStacks.

clear

final ClearTransaction clear

Field clear.

items

final ItemStack[] items

Field items.

cantMoveToSlot

final boolean cantMoveToSlot

Field cantMoveToSlot.

thisRegistration

final EventRegistration thisRegistration

Field thisRegistration.

containerRegistrations

final EventRegistration[] containerRegistrations

Field containerRegistrations.

container

final ItemContainer container

Field container.

finalStart

final short finalStart

Field finalStart.

containerTransaction

final Transaction containerTransaction

Field containerTransaction.

itemStack

final ItemStack itemStack

Field itemStack.

Method Detail

CombinedItemContainer

public public CombinedItemContainer (final ItemContainer... containers)

Method CombinedItemContainer.

Parameters:
final ItemContainer... containers

getContainer

public ItemContainer getContainer (final int index)

Method getContainer.

Parameters:
final int index

getContainersSize

public int getContainersSize ()

Method getContainersSize.

getContainerForSlot

public ItemContainer getContainerForSlot (short slot)

Method getContainerForSlot.

Parameters:
short slot

readAction

protected V readAction (@Nonnull final Supplier action)

Method readAction.

Parameters:
@Nonnull final Supplier action

readAction0

private V readAction0 (final int i, @Nonnull final Supplier action)

Method readAction0.

Parameters:
final int i
@Nonnull final Supplier action

writeAction

protected V writeAction (@Nonnull final Supplier action)

Method writeAction.

Parameters:
@Nonnull final Supplier action

writeAction0

private V writeAction0 (final int i, @Nonnull final Supplier action)

Method writeAction0.

Parameters:
final int i
@Nonnull final Supplier action

internal_clear

protected ClearTransaction internal_clear ()

Method internal_clear.

ClearTransaction

public new ClearTransaction (true, (short)

Method ClearTransaction.

Parameters:
true true
(short (short

internal_getSlot

protected ItemStack internal_getSlot (short slot)

Method internal_getSlot.

Parameters:
short slot

internal_setSlot

protected ItemStack internal_setSlot (short slot, final ItemStack itemStack)

Method internal_setSlot.

Parameters:
short slot
final ItemStack itemStack

internal_removeSlot

protected ItemStack internal_removeSlot (short slot)

Method internal_removeSlot.

Parameters:
short slot

cantAddToSlot

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

Method cantAddToSlot.

Parameters:
short slot
final ItemStack itemStack
final ItemStack slotItemStack

cantRemoveFromSlot

protected boolean cantRemoveFromSlot (short slot)

Method cantRemoveFromSlot.

Parameters:
short slot

cantDropFromSlot

protected boolean cantDropFromSlot (short slot)

Method cantDropFromSlot.

Parameters:
short slot

cantMoveToSlot

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

Method cantMoveToSlot.

Parameters:
final ItemContainer fromContainer
final short slotFrom

getCapacity

public short getCapacity ()

Method getCapacity.

clone

public CombinedItemContainer clone ()

Method clone.

UnsupportedOperationException

public new UnsupportedOperationException ("clone()

Method UnsupportedOperationException.

Parameters:
"clone( "clone(

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

containsContainer

public boolean containsContainer (final ItemContainer itemContainer)

Method containsContainer.

Parameters:
final ItemContainer itemContainer

equals

public boolean equals (final Object o)

Method equals.

Parameters:
final Object o

hashCode

public int hashCode ()

Method hashCode.

setGlobalFilter

public void setGlobalFilter (final FilterType globalFilter)

Method setGlobalFilter.

Parameters:
final FilterType globalFilter

setSlotFilter

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

Method setSlotFilter.

Parameters:
final FilterActionType actionType
short slot
final SlotFilter filter