Adding A Table - TeamAOF/Artis GitHub Wiki

There are two locations where tables can be added. One is in the config folder of an instance, and the other is in the static_data folder of an instance or a mod. In either case, the file must be named artis.json5 and be in the root directory of whichever folder it's in.

For adding a table with KubeJS, go here.

Structure

Below are examples of two tables, showcasing various things you can define. Scroll further down for more info on options for tables.

{
  "tables": {
    "artis:test_table": {
      "width": 4,
      "height": 3,
      "block_entity": true, // Gives your block a block entity, meaning that items will stay in the table after closing the GUI.
      "generate_assets": true, // Automatically generates assets for a table based on a default model.
      "color": "#7F76D1", // The GUI and table-top color (for default assets). When not included, uses default GUI colors.
      "settings": {
        "material": "wood",
        "non_opaque": true // This is important to not be able to see through the world at the base.
      }
    },
    "minecraft:fletching_table": {
      "type": "existing_block", // Sets the table to add Artis functionality to an existing block.
      "width": 3,
      "height": 3,
      "normal_recipes": true, // Adds supports for recipes for the vanilla crafting table. Otherwise it can only craft its own recipes.
      "catalyst_slot": 1 // Currently tables can only have one catalyst slot.
    }
  }
}

The elements are as follows:

  • tables: The JSON block that tables are entered in. If a tables block does not exist, the whole file will be treated as a tables block.

Table type

The key of a table type object must be a valid Identifier. It will be used as the ID for registering both the block and the table type itself. May not collide with other tables, or block or item IDs. Tables can have the following options:

  • width: How many columns the table will have. See note below. Required.
  • height: How many rows the table will have. See note below. Required.
  • generate_assets: Whether Artis should generate a blockstate and model for the table. Optional; defaults to false if not present.
  • color: The color to be used for the table's GUI, and to be displayed on the generated model. Optional; defaults to having a vanilla-colored GUI and no color overlay on the model.
  • block_entity: Whether or not a table should have a block entity. Currently all this means is whether or not an item will keep it's contents inside when closed.
  • catalyst_slot: The amount of catalyst slots this table has. Currently can be only 0 or 1. Optional; defaults to 0 if not present.
  • normal_recipes: Whether a table should support normal vanilla crafting recipes. Optional; defaults to false if not present.
  • settings: The block settings this table's block should have. See below (not yet written). Optional; defaults to a copy of the vanilla crafting table's settings if not present.
  • type: The type of table this should be. Can be "normal", "existing_block", or "existing_item". Optional; defaults to "normal". If the type is "existing_block", this table type will be injected onto the block matching the ID of this table type. If the type is "existing_item", this table type will be injected onto the item matching the ID of this table type.
  • bypass_check: This setting allows you to bypass the check that "existing_block" or "existing_item" type tables perform in order to confirm if the block or item you are setting as a table actually exists. This is useful if you are sure the block or item will exist, and Artis is loading before the mod that adds the block/item you are setting as a table. Optional; defaults to false if not present.

A note

The width and height parameters can technically be any number between 1 and 9. However, it is not recommended to have either a width or height above 5 slots. This can cause some issues with auto-sized guis, due to the gui simply being too large to fit on a standard screen. Artis auto-generates the placement and sizing for all of its guis, and multiple hours of work have not been able to rectify this situation. This issue has been declared as a wontfix, and it can lead to issues with the accessibility of your mod pack. If you don't want to have your table look like the image below, please restrict your table dimensions to 5x5 or lesser. Thank you for your concern.

A demonstration of a table greater than 5x5