amulet.api.chunk.entity_list module

class amulet.api.chunk.entity_list.EntityList(entities=())[source]

Bases: ChunkList

A custom implementation of the list class.

It can only store Entity instances.

__init__(entities=())[source]

Construct an EntityList.

Parameters

entities (Iterable[Entity]) – An Iterable of Entity objects.

copy()[source]

Create a shallow copy of the entity container.

Return type

EntityList

append(value)[source]

Append value to the end of the list.

Return type

None

clear() None -- remove all items from S[source]
count(value) integer -- return number of occurrences of value[source]
extend(iterable)[source]

Extend list by appending elements from the iterable.

index(value[, start[, stop]]) integer -- return first index of value.[source]

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(index, value)[source]

Insert value before index.

pop([index]) item -- remove and return item at index (default last).[source]

Raise IndexError if list is empty or index is out of range.

remove(item)[source]

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

reverse()[source]

S.reverse() – reverse IN PLACE