Interface CamouflageableBlockEntity

All Known Implementing Classes:
AdvancedPressureTubeBlockEntity, ChargingStationBlockEntity, ElevatorBaseBlockEntity, ElevatorCallerBlockEntity, HeatPipeBlockEntity, PneumaticDoorBaseBlockEntity, PressureTubeBlockEntity, ReinforcedPressureTubeBlockEntity

public interface CamouflageableBlockEntity
Implement this interface in tile entities which should store a camouflaged state. The corresponding block should be a subclass of AbstractCamouflageBlock
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.level.block.state.BlockState
    Get the camouflage state; the blockstate which will be used to render this block entity's block.
    static net.minecraft.world.item.ItemStack
    getStackForState(net.minecraft.world.level.block.state.BlockState state)
    Convenience method: get the itemstack for the given block state.
    static net.minecraft.world.level.block.state.BlockState
    readCamo(net.minecraft.nbt.CompoundTag tag)
     
    void
    setCamouflage(net.minecraft.world.level.block.state.BlockState state)
    Set the camouflage for the block entity.
    static void
    Convenience method: sync camo state to client
    static void
    writeCamo(net.minecraft.nbt.CompoundTag tag, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Details

    • getCamouflage

      net.minecraft.world.level.block.state.BlockState getCamouflage()
      Get the camouflage state; the blockstate which will be used to render this block entity's block.
      Returns:
      the camouflage state, or null if the block should not be camouflaged
    • setCamouflage

      void setCamouflage(net.minecraft.world.level.block.state.BlockState state)
      Set the camouflage for the block entity. The block entity should sync this state to the client, and do any necessary re-rendering of the block when the synced state changes.
      Parameters:
      state - the camo block state
    • getStackForState

      static net.minecraft.world.item.ItemStack getStackForState(net.minecraft.world.level.block.state.BlockState state)
      Convenience method: get the itemstack for the given block state.
      Parameters:
      state - the block state
      Returns:
      an item for that block state
    • syncToClient

      static void syncToClient(AbstractPneumaticCraftBlockEntity te)
      Convenience method: sync camo state to client
      Parameters:
      te - the block entity
    • readCamo

      static net.minecraft.world.level.block.state.BlockState readCamo(net.minecraft.nbt.CompoundTag tag)
    • writeCamo

      static void writeCamo(net.minecraft.nbt.CompoundTag tag, net.minecraft.world.level.block.state.BlockState state)