CheckArea constructor

CheckArea(
  1. Widget? onDestroy,
  2. TextComponent? displayName,
  3. bool isBarrel,
  4. bool invisible,
)

Implementation

CheckArea(this.onDestroy, this.displayName, bool isBarrel, this.invisible) {
  if (isBarrel) {
    _block = Blocks.barrel;
    invisible = false;
  }
  _setTable = SetBlock(
    Block.nbt(
      _block,
      states: invisible ? {'type': 'left'} : null,
      nbt: displayName != null ? {'CustomName': displayName!.toJson()} : null,
    ),
    location: Location.here(),
  );
}