ChestFile constructor

ChestFile(
  1. bool hasRecipes,
  2. String? recipeSource,
  3. String? recipeResultSource,
  4. Item? placeholder,
  5. Item? guiModel,
  6. bool useBarrel,
)

Implementation

ChestFile(
  this.hasRecipes,
  this.recipeSource,
  this.recipeResultSource,
  this.placeholder,
  this.guiModel,
  this.useBarrel,
) {
  if (placeholder != null && placeholder!.tag == null) {
    placeholder = placeholder!.copyWith(nbt: {});
  }
  if (guiModel != null) {
    guiModel = guiModel!.copyWith(
      nbt: guiModel!.tag ?? {},
      slot: guiModel!.slot ?? Slot.chest(3, 5),
    );
  }
}