FluidSectionMarker

An invisible block (structure block) that exists purely to represent a pipe and prevent blocks from being placed on top of them. TODO: io.github.pylonmc.rebar.block.base.RebarEntityGroupCulledBlock

Constructors

Link copied to clipboard
constructor(block: Block, context: BlockCreateContext)
constructor(block: Block, pdc: PersistentDataContainer)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

A packet based ItemDisplay sent to players who have customBlockTextures enabled.

Link copied to clipboard
val defaultItem: <Error class: unknown class>
Link copied to clipboard

Set this to true if your block should not have a blockTextureEntity for custom models/textures.

Link copied to clipboard
open override val facadeDefaultBlockType: Material
Link copied to clipboard
@get:ApiStatus.NonExtendable
open val heldEntities: MutableMap<String, UUID>
Link copied to clipboard
Link copied to clipboard
val pipe: <Error class: unknown class>?
Link copied to clipboard
val pipeDisplay: <Error class: unknown class>
Link copied to clipboard

All the data needed to create or load the block.

Functions

Link copied to clipboard
open fun addEntity(name: String, entity: RebarEntity<*>)
open fun addEntity(name: String, entity: Entity)
Link copied to clipboard
@ApiStatus.NonExtendable
open fun areAllHeldEntitiesLoaded(): <Error class: unknown class>

Returns false if any entity is unloaded or does not exist.

Link copied to clipboard
open fun getBlockTextureItem(): <Error class: unknown class>?

Returns the item that should be used to display the block's texture.

Link copied to clipboard

Returns a map of custom block state properties to be used for the block texture item. These properties will be merged with the vanilla block state properties of the block.

Link copied to clipboard
open override fun getDropItem(context: BlockBreakContext): Nothing?

Returns the item that the block should drop.

Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntity(name: String): Entity?
@ApiStatus.NonExtendable
open fun <T : Entity> getHeldEntity(clazz: Class<T>, name: String): T?
Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntityOrThrow(name: String): Entity
@ApiStatus.NonExtendable
open fun <T : Entity> getHeldEntityOrThrow(clazz: Class<T>, name: String): T
Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntityUuid(name: String): UUID?
Link copied to clipboard
@ApiStatus.NonExtendable
open fun getHeldEntityUuidOrThrow(name: String): UUID
Link copied to clipboard
@ApiStatus.NonExtendable
open fun <T : RebarEntity<*>> getHeldRebarEntity(clazz: Class<T>, name: String): T?
Link copied to clipboard
@ApiStatus.NonExtendable
open fun <T : RebarEntity<*>> getHeldRebarEntityOrThrow(clazz: Class<T>, name: String): T
Link copied to clipboard
open override fun getPickItem(): <Error class: unknown class>

Returns the item that should be given when the block is middle clicked.

Link copied to clipboard

Returns settings associated with the block.

Link copied to clipboard
open override fun getWaila(player: Player): WailaDisplay?

WAILA is the text that shows up when looking at a block to tell you what the block is.

Link copied to clipboard
@ApiStatus.NonExtendable
open fun isHeldEntityPresent(name: String): Boolean

Returns false if the block holds no entity with the provided name, the entity is unloaded or does not physically exist.

Link copied to clipboard
open override fun onBreak(drops: MutableList<ItemStack>, context: BlockBreakContext)

In the case of a vanilla BlockBreakEvent this is called during the monitor priority

Link copied to clipboard
open override fun onInteract(event: PlayerInteractEvent, priority: EventPriority)

This may be called for both hands, so make sure you check which hand is used.

Link copied to clipboard
open fun postBreak(context: BlockBreakContext)

In the case of a vanilla BlockBreakEvent this is called during the monitor priority

Link copied to clipboard
open fun postInitialise()

Called after both the create constructor and the load constructor.

Link copied to clipboard
open fun preBreak(context: BlockBreakContext): Boolean

Called before the block is broken. Note this is not called for Deletions as those are not cancellable.

Link copied to clipboard

Call this method to refresh the block texture entity's item to be the result of getBlockTextureItem, or a barrier if that returns null.

Link copied to clipboard

Schedules the block texture item to be refreshed on the next server tick. See refreshBlockTextureItem.

Link copied to clipboard
Link copied to clipboard
open fun tryRemoveEntity(name: String)
Link copied to clipboard
@ApiStatus.NonExtendable
open fun whenHeldRebarEntityLoads(name: String, consumer: Consumer<RebarEntity<*>>)
@ApiStatus.NonExtendable
open fun <T : RebarEntity<*>> whenHeldRebarEntityLoads(clazz: Class<T>, name: String, consumer: Consumer<T>)
Link copied to clipboard

Called when the block is saved.

Link copied to clipboard

Called when debug info is requested for the block by someone using the DebugWaxedWeatheredCutCopperStairs. If there is any transient data that can be useful for debugging, you're encouraged to serialize it here.