DecoratedPotBlockEntity

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.block.entity.type.DecoratedPotBlockEntity;

Extends

DecoratedPotBlockEntity extends BlockEntity.

Implements

DecoratedPotBlockEntity implements the following interfaces:

RandomizableContainer,BlockContainerSingleItem,IAttachmentHolder,Container,Clearable,ContainerSingleItem

Undocumented Interfaces

IBlockEntityExtension

Members

Getter
Gets the BlockPos of the block entity.
script.zs
// DecoratedPotBlockEntity.blockPos as BlockPos
myDecoratedPotBlockEntity.blockPos

Return Type: BlockPos

blockPos() as BlockPos
Gets the BlockPos of the block entity.

Returns: The BlockPos of the block entity.

script.zs
// DecoratedPotBlockEntity.blockPos() as BlockPos;
myDecoratedPotBlockEntity.blockPos();

Return Type: BlockPos

Getter
Gets the BlockState of the block entity.
script.zs
// DecoratedPotBlockEntity.blockState as BlockState
myDecoratedPotBlockEntity.blockState

Return Type: BlockState

blockState() as BlockState
Gets the BlockState of the block entity.

Returns: The BlockState of the block entity.

script.zs
// DecoratedPotBlockEntity.blockState() as BlockState;
myDecoratedPotBlockEntity.blockState();

Return Type: BlockState

canPlaceItem(index as int, stack as ItemStack) as bool
script.zs
// DecoratedPotBlockEntity.canPlaceItem(index as int, stack as ItemStack) as bool;
myDecoratedPotBlockEntity.canPlaceItem(myInt, myItemStack);

Parameters:

index Type: int
stack Type: ItemStack

Return Type: bool

Getter
script.zs
// DecoratedPotBlockEntity.changed
myDecoratedPotBlockEntity.changed
changed()
script.zs
// DecoratedPotBlockEntity.changed();
myDecoratedPotBlockEntity.changed();
clearContent()
Clears the contents of this Clearable.
script.zs
// DecoratedPotBlockEntity.clearContent();
myDecoratedPotBlockEntity.clearContent();
Getter
Gets the size (how many slots) of this Container
script.zs
// DecoratedPotBlockEntity.containerSize as int
myDecoratedPotBlockEntity.containerSize

Return Type: int

containerSize() as int
Gets the size (how many slots) of this Container

Returns: The amount of slots this Container has.

script.zs
// DecoratedPotBlockEntity.containerSize() as int;
myDecoratedPotBlockEntity.containerSize();

Return Type: int

countItem(item as Item) as int
script.zs
// DecoratedPotBlockEntity.countItem(item as ItemDefinition) as int;
myDecoratedPotBlockEntity.countItem(myItem);

Parameters:

Return Type: int

countStack(item as IItemStack) as int
script.zs
// DecoratedPotBlockEntity.countStack(item as IItemStack) as int;
myDecoratedPotBlockEntity.countStack(myIItemStack);

Parameters:

item Type: IItemStack

Return Type: int

Getter
Gets the data of the block entity.
script.zs
// DecoratedPotBlockEntity.data as IData
myDecoratedPotBlockEntity.data

Return Type: IData

Setter
Sets the data of the block entity.
script.zs
// DecoratedPotBlockEntity.data = (data as IData);
myDecoratedPotBlockEntity.data = myIData;

Parameters:

data Type: IData - The data to set.
data(data as IData)
Sets the data of the block entity.
script.zs
// DecoratedPotBlockEntity.data(data as IData);
myDecoratedPotBlockEntity.data(myIData);

Parameters:

data Type: IData - The data to set.
Getter
Gets access to the decorations that make up the faces of the pot.
script.zs
// DecoratedPotBlockEntity.decorations as PotDecorations
myDecoratedPotBlockEntity.decorations

Return Type: PotDecorations

decorations() as PotDecorations
Gets access to the decorations that make up the faces of the pot.

Returns: The decorations used by the faces of the pot.

script.zs
// DecoratedPotBlockEntity.decorations() as PotDecorations;
myDecoratedPotBlockEntity.decorations();

Return Type: PotDecorations

getAttachmentData(type as AttachmentType<T>) as T
script.zs
// DecoratedPotBlockEntity.getAttachmentData<T>(type as AttachmentType<T>) as T;
myDecoratedPotBlockEntity.getAttachmentData<T>(myAttachmentType);

Parameters:

type Type: AttachmentType<T>

Return Type: T

getAttachmentData(type as Supplier<AttachmentType<T>>) as T
script.zs
// DecoratedPotBlockEntity.getAttachmentData<T>(type as Supplier<AttachmentType<T>>) as T;
myDecoratedPotBlockEntity.getAttachmentData<T>(mySupplier);

Parameters:

type Type: Supplier<AttachmentType<T>>

Return Type: T

getContainerBlockEntity() as BlockEntity
Gets the BlockEntity that holds the container.

Returns: The BlockEntity that holds the container.

script.zs
// DecoratedPotBlockEntity.getContainerBlockEntity() as BlockEntity;
myDecoratedPotBlockEntity.getContainerBlockEntity();

Return Type: BlockEntity

getItem(index as int) as ItemStack
Gets the ItemStack in the given slot.

Returns: the ItemStack in the given slot.

script.zs
// DecoratedPotBlockEntity.getItem(index as int) as ItemStack;
myDecoratedPotBlockEntity.getItem(myInt);

Parameters:

index Type: int - The slot index to get.

Return Type: ItemStack

getPotAsItem() as ItemStack
Creates a new decorated pot item with a copy of the pots decorations. Additional data like the pots contained item or loot table are not copied.

Returns: A new decorated pot item with a copy of the pots decorations.

script.zs
// DecoratedPotBlockEntity.getPotAsItem() as ItemStack;
myDecoratedPotBlockEntity.getPotAsItem();

Return Type: ItemStack

getTheItem() as ItemStack
Gets the only item held by the container.

Returns: The item held by the container.

script.zs
// DecoratedPotBlockEntity.getTheItem() as ItemStack;
myDecoratedPotBlockEntity.getTheItem();

Return Type: ItemStack

hasAnyOf(items as Set<Item>) as bool
script.zs
// DecoratedPotBlockEntity.hasAnyOf(items as Set<ItemDefinition>) as bool;
myDecoratedPotBlockEntity.hasAnyOf(mySet);

Parameters:

items Type: Set<ItemDefinition>

Return Type: bool

hasAttachmentData(type as AttachmentType<T>) as bool
script.zs
// DecoratedPotBlockEntity.hasAttachmentData<T>(type as AttachmentType<T>) as bool;
myDecoratedPotBlockEntity.hasAttachmentData<T>(myAttachmentType);

Parameters:

type Type: AttachmentType<T>

Return Type: bool

hasAttachmentData(type as Supplier<AttachmentType<T>>) as bool
script.zs
// DecoratedPotBlockEntity.hasAttachmentData<T>(type as Supplier<AttachmentType<T>>) as bool;
myDecoratedPotBlockEntity.hasAttachmentData<T>(mySupplier);

Parameters:

type Type: Supplier<AttachmentType<T>>

Return Type: bool

Getter
Checks if the block entity has a level.
script.zs
// DecoratedPotBlockEntity.hasLevel as bool
myDecoratedPotBlockEntity.hasLevel

Return Type: bool

hasLevel() as bool
Checks if the block entity has a level.

Returns: Whether the block entity has a level.

script.zs
// DecoratedPotBlockEntity.hasLevel() as bool;
myDecoratedPotBlockEntity.hasLevel();

Return Type: bool

Getter
Checks if this Container is empty.
script.zs
// DecoratedPotBlockEntity.isEmpty as bool
myDecoratedPotBlockEntity.isEmpty

Return Type: bool

isEmpty() as bool
Checks if this Container is empty.

Returns: True if empty. False otherwise.

script.zs
// DecoratedPotBlockEntity.isEmpty() as bool;
myDecoratedPotBlockEntity.isEmpty();

Return Type: bool

Getter
Gets the Level of the block entity.
script.zs
// DecoratedPotBlockEntity.level as Level
myDecoratedPotBlockEntity.level

Return Type: Level

level() as Level
Gets the Level of the block entity.

Returns: The Level of the block entity.

script.zs
// DecoratedPotBlockEntity.level() as Level;
myDecoratedPotBlockEntity.level();

Return Type: Level

Getter
Gets the seed used by the loot table.
script.zs
// DecoratedPotBlockEntity.lootSeed as long
myDecoratedPotBlockEntity.lootSeed

Return Type: long

Setter
Sets the seed used by the loot table.
script.zs
// DecoratedPotBlockEntity.lootSeed = (seed as long);
myDecoratedPotBlockEntity.lootSeed = myLong;

Parameters:

seed Type: long - The seed for the loot table to use.
lootSeed() as long
Gets the seed used by the loot table.

Returns: The seed used by the loot table.

script.zs
// DecoratedPotBlockEntity.lootSeed() as long;
myDecoratedPotBlockEntity.lootSeed();

Return Type: long

lootSeed(seed as long)
Sets the seed used by the loot table.
script.zs
// DecoratedPotBlockEntity.lootSeed(seed as long);
myDecoratedPotBlockEntity.lootSeed(myLong);

Parameters:

seed Type: long - The seed for the loot table to use.
Getter
Gets the loot table used by the container.
script.zs
// DecoratedPotBlockEntity.lootTable as ResourceKey<LootTable>
myDecoratedPotBlockEntity.lootTable

Return Type: ResourceKey<LootTable>

Setter
Sets the loot table used by the container.
script.zs
// DecoratedPotBlockEntity.lootTable = (lootTable as ResourceKey<LootTable>);
myDecoratedPotBlockEntity.lootTable = myResourceKey;

Parameters:

lootTable Type: ResourceKey<LootTable> - The new loot table for the container to use.
lootTable() as ResourceKey<LootTable>
Gets the loot table used by the container.

Returns: The loot table used by the container.

script.zs
// DecoratedPotBlockEntity.lootTable() as ResourceKey<LootTable>;
myDecoratedPotBlockEntity.lootTable();

Return Type: ResourceKey<LootTable>

lootTable(lootTable as ResourceKey<LootTable>)
Sets the loot table used by the container.
script.zs
// DecoratedPotBlockEntity.lootTable(lootTable as ResourceKey<LootTable>);
myDecoratedPotBlockEntity.lootTable(myResourceKey);

Parameters:

lootTable Type: ResourceKey<LootTable> - The new loot table for the container to use.
Getter
script.zs
// DecoratedPotBlockEntity.maxStackSize as int
myDecoratedPotBlockEntity.maxStackSize

Return Type: int

maxStackSize() as int
script.zs
// DecoratedPotBlockEntity.maxStackSize() as int;
myDecoratedPotBlockEntity.maxStackSize();

Return Type: int

Getter
Gets the ResourceLocation of the block entity type.
script.zs
// DecoratedPotBlockEntity.registryName as ResourceLocation
myDecoratedPotBlockEntity.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
Gets the ResourceLocation of the block entity type.

Returns: The ResourceLocation of the block entity type.

script.zs
// DecoratedPotBlockEntity.registryName() as ResourceLocation;
myDecoratedPotBlockEntity.registryName();

Return Type: ResourceLocation

removeItem(var1 as int, var2 as int) as ItemStack
script.zs
// DecoratedPotBlockEntity.removeItem(var1 as int, var2 as int) as ItemStack;
myDecoratedPotBlockEntity.removeItem(myInt, myInt);

Parameters:

var1 Type: int
var2 Type: int

Return Type: ItemStack

removeItemNoUpdate(index as int) as ItemStack
script.zs
// DecoratedPotBlockEntity.removeItemNoUpdate(index as int) as ItemStack;
myDecoratedPotBlockEntity.removeItemNoUpdate(myInt);

Parameters:

index Type: int

Return Type: ItemStack

setAttachmentData(type as AttachmentType<T>, data as T) as T?
script.zs
// DecoratedPotBlockEntity.setAttachmentData<T>(type as AttachmentType<T>, data as T) as T?;
myDecoratedPotBlockEntity.setAttachmentData<T>(myAttachmentType, myT);

Parameters:

type Type: AttachmentType<T>
data Type: T

Return Type: T?

setAttachmentData(type as Supplier<AttachmentType<T>>, data as T) as T?
script.zs
// DecoratedPotBlockEntity.setAttachmentData<T>(type as Supplier<AttachmentType<T>>, data as T) as T?;
myDecoratedPotBlockEntity.setAttachmentData<T>(mySupplier, myT);

Parameters:

type Type: Supplier<AttachmentType<T>>
data Type: T

Return Type: T?

setItem(index as int, stack as ItemStack)
script.zs
// DecoratedPotBlockEntity.setItem(index as int, stack as ItemStack);
myDecoratedPotBlockEntity.setItem(myInt, myItemStack);

Parameters:

index Type: int
stack Type: ItemStack
setLootTable(lootTable as ResourceKey<LootTable>, seed as long)
Sets the loot table used by the container.
script.zs
// DecoratedPotBlockEntity.setLootTable(lootTable as ResourceKey<LootTable>, seed as long);
myDecoratedPotBlockEntity.setLootTable(myResourceKey, myLong);

Parameters:

lootTable Type: ResourceKey<LootTable> - The new loot table for the container to use.
seed Type: long - The seed for the loot table to use.
setLootTable(lootTable as ResourceLocation)
Sets the loot table used by the container.
script.zs
// DecoratedPotBlockEntity.setLootTable(lootTable as ResourceLocation);
myDecoratedPotBlockEntity.setLootTable(myResourceLocation);

Parameters:

lootTable Type: ResourceLocation - The new loot table for the container to use.
setLootTable(lootTable as ResourceLocation, seed as long)
Sets the loot table used by the container.
script.zs
// DecoratedPotBlockEntity.setLootTable(lootTable as ResourceLocation, seed as long);
myDecoratedPotBlockEntity.setLootTable(myResourceLocation, myLong);

Parameters:

lootTable Type: ResourceLocation - The new loot table for the container to use.
seed Type: long - The seed for the loot table to use.
setTheItem(stack as ItemStack)
Sets the only item held by the container.
script.zs
// DecoratedPotBlockEntity.setTheItem(stack as ItemStack);
myDecoratedPotBlockEntity.setTheItem(myItemStack);

Parameters:

stack Type: ItemStack - The new item for te container to hold.
splitTheItem(amount as int) as ItemStack
Removes up to the specified amount of the contained item.

Returns: The item that was split from the contained item.

script.zs
// DecoratedPotBlockEntity.splitTheItem(amount as int) as ItemStack;
myDecoratedPotBlockEntity.splitTheItem(myInt);

Parameters:

amount Type: int - The maximum amount of the item to split off from the contained item.

Return Type: ItemStack

startOpen(player as Player)
script.zs
// DecoratedPotBlockEntity.startOpen(player as Player);
myDecoratedPotBlockEntity.startOpen(myPlayer);

Parameters:

player Type: Player
stillValid(player as Player) as bool
script.zs
// DecoratedPotBlockEntity.stillValid(player as Player) as bool;
myDecoratedPotBlockEntity.stillValid(myPlayer);

Parameters:

player Type: Player

Return Type: bool

stillValid(player as Player) as bool
Checks if the player container is still valid for a player to interact with.

Returns: Whether the player can still access the container.

script.zs
// DecoratedPotBlockEntity.stillValid(player as Player) as bool;
myDecoratedPotBlockEntity.stillValid(myPlayer);

Parameters:

player Type: Player - The player interacting with the container.

Return Type: bool

stopOpen(player as Player)
script.zs
// DecoratedPotBlockEntity.stopOpen(player as Player);
myDecoratedPotBlockEntity.stopOpen(myPlayer);

Parameters:

player Type: Player
updateData(data as IData)
Updates the data of the block entity, merging the provided data with the existing data.
script.zs
// DecoratedPotBlockEntity.updateData(data as IData);
myDecoratedPotBlockEntity.updateData(myIData);

Parameters:

data Type: IData - The data to update.