接口 LocationInventoryViewBuilder<V extends InventoryView>

类型参数:
V - the type of InventoryView created from this builder
所有超级接口:
InventoryViewBuilder<V>

@Experimental public interface LocationInventoryViewBuilder<V extends InventoryView> extends InventoryViewBuilder<V>
An InventoryViewBuilder that can be bound by location within the world
  • 方法详细资料

    • copy

      从接口复制的说明: InventoryViewBuilder
      Makes a copy of this builder
      指定者:
      copy 在接口中 InventoryViewBuilder<V extends InventoryView>
      返回:
      a copy of this builder
    • title

      从接口复制的说明: InventoryViewBuilder
      Sets the title of the builder
      指定者:
      title 在接口中 InventoryViewBuilder<V extends InventoryView>
      参数:
      title - the title
      返回:
      this builder
    • checkReachable

      @NotNull @NotNull LocationInventoryViewBuilder<V> checkReachable(boolean checkReachable)
      Determines whether or not the server should check if the player can reach the location.

      Not providing a location but setting checkReachable to true will automatically close the view when opened.

      If checkReachable is set to false and a location is set on the builder if the target block exists and this builder is the correct menu for that block, e.g. MenuType.GENERIC_9X3 builder and target block set to chest, if that block is destroyed the view would persist.

      参数:
      checkReachable - whether or not to check if the view is "reachable"
      返回:
      this builder
    • location

      Binds a location to this builder.

      By binding a location in an unloaded chunk to this builder it is likely that the given chunk the location is will load. That means that when, building this view it may come with the costs associated with chunk loading.

      Providing a location of a tile entity with a non matching menu comes with extra costs associated with ensuring that the correct view is created.

      参数:
      location - the location to bind to this view
      返回:
      this builder