Interface CreakingHeart
- All Superinterfaces:
BlockState, Metadatable, PersistentDataHolder, PersistentDataViewHolder, TileState
Represents a captured state of a creaking heart.
-
Method Summary
Modifier and TypeMethodDescriptionGets the creaking protecting this creaking heart.voidsetCreaking(@Nullable Creaking creaking) Sets the creaking protecting this creaking heart.Attempts to spawn a creaking to protect this creaking heart.Attempts to spread resin to adjacent blocks.Methods inherited from interface BlockState
copy, copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, isSuffocating, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface TileState
getPersistentDataContainer, isSnapshot
-
Method Details
-
getCreaking
-
setCreaking
Sets the creaking protecting this creaking heart.- Parameters:
creaking- the creaking, ornullto remove any existing creaking.- Throws:
IllegalArgumentException- if the creaking is in another world.IllegalStateException- if this block state is not placed.
-
spawnCreaking
Attempts to spawn a creaking to protect this creaking heart.- Returns:
- the
Creakingthat was spawned to protect this heart, ornullif it failed. - Throws:
IllegalStateException- if this block state is not placed.
-
spreadResin
Attempts to spread resin to adjacent blocks.- Returns:
- the location resin was spread to, or
nullif it failed to spread. - Throws:
IllegalStateException- if this block state is not placed.- API Note:
- This method triggers events related to a block being modified.
-