| 1 | package net.minecraft.client.data.models.model;
|
| 2 |
|
| 3 | import java.util.Optional;
|
| 4 | import java.util.stream.IntStream;
|
| 5 | import net.fabricmc.api.EnvType;
|
| 6 | import net.fabricmc.api.Environment;
|
| 7 | import net.minecraft.resources.Identifier;
|
| 8 |
|
| 9 | @Environment(EnvType.CLIENT)
|
| 10 | public class ModelTemplates {
|
| 11 | public static final ModelTemplate CUBE = create(
|
| 12 | "cube", TextureSlot.PARTICLE, TextureSlot.NORTH, TextureSlot.SOUTH, TextureSlot.EAST, TextureSlot.WEST, TextureSlot.UP, TextureSlot.DOWN
|
| 13 | );
|
| 14 | public static final ModelTemplate CUBE_DIRECTIONAL = create(
|
| 15 | "cube_directional", TextureSlot.PARTICLE, TextureSlot.NORTH, TextureSlot.SOUTH, TextureSlot.EAST, TextureSlot.WEST, TextureSlot.UP, TextureSlot.DOWN
|
| 16 | );
|
| 17 | public static final ModelTemplate CUBE_ALL = create("cube_all", TextureSlot.ALL);
|
| 18 | public static final ModelTemplate CUBE_ALL_INNER_FACES = create("cube_all_inner_faces", TextureSlot.ALL);
|
| 19 | public static final ModelTemplate CUBE_MIRRORED_ALL = create("cube_mirrored_all", "_mirrored", TextureSlot.ALL);
|
| 20 | public static final ModelTemplate CUBE_NORTH_WEST_MIRRORED_ALL = create("cube_north_west_mirrored_all", "_north_west_mirrored", TextureSlot.ALL);
|
| 21 | public static final ModelTemplate CUBE_COLUMN_UV_LOCKED_X = create("cube_column_uv_locked_x", "_x", TextureSlot.END, TextureSlot.SIDE);
|
| 22 | public static final ModelTemplate CUBE_COLUMN_UV_LOCKED_Y = create("cube_column_uv_locked_y", "_y", TextureSlot.END, TextureSlot.SIDE);
|
| 23 | public static final ModelTemplate CUBE_COLUMN_UV_LOCKED_Z = create("cube_column_uv_locked_z", "_z", TextureSlot.END, TextureSlot.SIDE);
|
| 24 | public static final ModelTemplate CUBE_COLUMN = create("cube_column", TextureSlot.END, TextureSlot.SIDE);
|
| 25 | public static final ModelTemplate CUBE_COLUMN_HORIZONTAL = create("cube_column_horizontal", "_horizontal", TextureSlot.END, TextureSlot.SIDE);
|
| 26 | public static final ModelTemplate CUBE_COLUMN_MIRRORED = create("cube_column_mirrored", "_mirrored", TextureSlot.END, TextureSlot.SIDE);
|
| 27 | public static final ModelTemplate CUBE_TOP = create("cube_top", TextureSlot.TOP, TextureSlot.SIDE);
|
| 28 | public static final ModelTemplate CUBE_BOTTOM_TOP = create("cube_bottom_top", TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE);
|
| 29 | public static final ModelTemplate CUBE_BOTTOM_TOP_INDENTED = create("template_cube_bottom_top_indented", TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE);
|
| 30 | public static final ModelTemplate CUBE_BOTTOM_TOP_INNER_FACES = create("cube_bottom_top_inner_faces", TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE);
|
| 31 | public static final ModelTemplate CUBE_ORIENTABLE = create("orientable", TextureSlot.TOP, TextureSlot.FRONT, TextureSlot.SIDE);
|
| 32 | public static final ModelTemplate CUBE_ORIENTABLE_TOP_BOTTOM = create(
|
| 33 | "orientable_with_bottom", TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE, TextureSlot.FRONT
|
| 34 | );
|
| 35 | public static final ModelTemplate CUBE_ORIENTABLE_VERTICAL = create("orientable_vertical", "_vertical", TextureSlot.FRONT, TextureSlot.SIDE);
|
| 36 | public static final ModelTemplate BUTTON = create("button", TextureSlot.TEXTURE);
|
| 37 | public static final ModelTemplate BUTTON_PRESSED = create("button_pressed", "_pressed", TextureSlot.TEXTURE);
|
| 38 | public static final ModelTemplate BUTTON_INVENTORY = create("button_inventory", "_inventory", TextureSlot.TEXTURE);
|
| 39 | public static final ModelTemplate SIGN_ROT_0 = create("template_sign_rot_0", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 40 | public static final ModelTemplate SIGN_ROT_1 = create("template_sign_rot_1", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 41 | public static final ModelTemplate SIGN_ROT_2 = create("template_sign_rot_2", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 42 | public static final ModelTemplate SIGN_ROT_3 = create("template_sign_rot_3", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 43 | public static final ModelTemplate WALL_SIGN = create("template_wall_sign", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 44 | public static final ModelTemplate HANGING_SIGN_ROT_0 = create("template_hanging_sign_rot_0", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 45 | public static final ModelTemplate HANGING_SIGN_ROT_1 = create("template_hanging_sign_rot_1", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 46 | public static final ModelTemplate HANGING_SIGN_ROT_2 = create("template_hanging_sign_rot_2", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 47 | public static final ModelTemplate HANGING_SIGN_ROT_3 = create("template_hanging_sign_rot_3", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 48 | public static final ModelTemplate ATTACHED_HANGING_SIGN_ROT_0 = create("template_attached_hanging_sign_rot_0", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 49 | public static final ModelTemplate ATTACHED_HANGING_SIGN_ROT_1 = create("template_attached_hanging_sign_rot_1", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 50 | public static final ModelTemplate ATTACHED_HANGING_SIGN_ROT_2 = create("template_attached_hanging_sign_rot_2", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 51 | public static final ModelTemplate ATTACHED_HANGING_SIGN_ROT_3 = create("template_attached_hanging_sign_rot_3", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 52 | public static final ModelTemplate WALL_HANGING_SIGN = create("template_wall_hanging_sign", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 53 | public static final ModelTemplate DOOR_BOTTOM_LEFT = create("door_bottom_left", "_bottom_left", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 54 | public static final ModelTemplate DOOR_BOTTOM_LEFT_OPEN = create("door_bottom_left_open", "_bottom_left_open", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 55 | public static final ModelTemplate DOOR_BOTTOM_RIGHT = create("door_bottom_right", "_bottom_right", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 56 | public static final ModelTemplate DOOR_BOTTOM_RIGHT_OPEN = create("door_bottom_right_open", "_bottom_right_open", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 57 | public static final ModelTemplate DOOR_TOP_LEFT = create("door_top_left", "_top_left", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 58 | public static final ModelTemplate DOOR_TOP_LEFT_OPEN = create("door_top_left_open", "_top_left_open", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 59 | public static final ModelTemplate DOOR_TOP_RIGHT = create("door_top_right", "_top_right", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 60 | public static final ModelTemplate DOOR_TOP_RIGHT_OPEN = create("door_top_right_open", "_top_right_open", TextureSlot.TOP, TextureSlot.BOTTOM);
|
| 61 | public static final ModelTemplate CUSTOM_FENCE_POST = create("custom_fence_post", "_post", TextureSlot.TEXTURE, TextureSlot.PARTICLE);
|
| 62 | public static final ModelTemplate CUSTOM_FENCE_SIDE_NORTH = create("custom_fence_side_north", "_side_north", TextureSlot.TEXTURE);
|
| 63 | public static final ModelTemplate CUSTOM_FENCE_SIDE_EAST = create("custom_fence_side_east", "_side_east", TextureSlot.TEXTURE);
|
| 64 | public static final ModelTemplate CUSTOM_FENCE_SIDE_SOUTH = create("custom_fence_side_south", "_side_south", TextureSlot.TEXTURE);
|
| 65 | public static final ModelTemplate CUSTOM_FENCE_SIDE_WEST = create("custom_fence_side_west", "_side_west", TextureSlot.TEXTURE);
|
| 66 | public static final ModelTemplate CUSTOM_FENCE_INVENTORY = create("custom_fence_inventory", "_inventory", TextureSlot.TEXTURE);
|
| 67 | public static final ModelTemplate FENCE_POST = create("fence_post", "_post", TextureSlot.TEXTURE);
|
| 68 | public static final ModelTemplate FENCE_SIDE = create("fence_side", "_side", TextureSlot.TEXTURE);
|
| 69 | public static final ModelTemplate FENCE_INVENTORY = create("fence_inventory", "_inventory", TextureSlot.TEXTURE);
|
| 70 | public static final ModelTemplate WALL_POST = create("template_wall_post", "_post", TextureSlot.WALL);
|
| 71 | public static final ModelTemplate WALL_LOW_SIDE = create("template_wall_side", "_side", TextureSlot.WALL);
|
| 72 | public static final ModelTemplate WALL_TALL_SIDE = create("template_wall_side_tall", "_side_tall", TextureSlot.WALL);
|
| 73 | public static final ModelTemplate WALL_INVENTORY = create("wall_inventory", "_inventory", TextureSlot.WALL);
|
| 74 | public static final ModelTemplate CUSTOM_FENCE_GATE_CLOSED = create("template_custom_fence_gate", TextureSlot.TEXTURE, TextureSlot.PARTICLE);
|
| 75 | public static final ModelTemplate CUSTOM_FENCE_GATE_OPEN = create("template_custom_fence_gate_open", "_open", TextureSlot.TEXTURE, TextureSlot.PARTICLE);
|
| 76 | public static final ModelTemplate CUSTOM_FENCE_GATE_WALL_CLOSED = create("template_custom_fence_gate_wall", "_wall", TextureSlot.TEXTURE, TextureSlot.PARTICLE);
|
| 77 | public static final ModelTemplate CUSTOM_FENCE_GATE_WALL_OPEN = create(
|
| 78 | "template_custom_fence_gate_wall_open", "_wall_open", TextureSlot.TEXTURE, TextureSlot.PARTICLE
|
| 79 | );
|
| 80 | public static final ModelTemplate FENCE_GATE_CLOSED = create("template_fence_gate", TextureSlot.TEXTURE);
|
| 81 | public static final ModelTemplate FENCE_GATE_OPEN = create("template_fence_gate_open", "_open", TextureSlot.TEXTURE);
|
| 82 | public static final ModelTemplate FENCE_GATE_WALL_CLOSED = create("template_fence_gate_wall", "_wall", TextureSlot.TEXTURE);
|
| 83 | public static final ModelTemplate FENCE_GATE_WALL_OPEN = create("template_fence_gate_wall_open", "_wall_open", TextureSlot.TEXTURE);
|
| 84 | public static final ModelTemplate PRESSURE_PLATE_UP = create("pressure_plate_up", TextureSlot.TEXTURE);
|
| 85 | public static final ModelTemplate PRESSURE_PLATE_DOWN = create("pressure_plate_down", "_down", TextureSlot.TEXTURE);
|
| 86 | public static final ModelTemplate PARTICLE_ONLY = create(TextureSlot.PARTICLE);
|
| 87 | public static final ModelTemplate SLAB_BOTTOM = create("slab", TextureSlot.BOTTOM, TextureSlot.TOP, TextureSlot.SIDE);
|
| 88 | public static final ModelTemplate SLAB_TOP = create("slab_top", "_top", TextureSlot.BOTTOM, TextureSlot.TOP, TextureSlot.SIDE);
|
| 89 | public static final ModelTemplate LEAVES = create("leaves", TextureSlot.ALL);
|
| 90 | public static final ModelTemplate STAIRS_STRAIGHT = create("stairs", TextureSlot.BOTTOM, TextureSlot.TOP, TextureSlot.SIDE);
|
| 91 | public static final ModelTemplate STAIRS_INNER = create("inner_stairs", "_inner", TextureSlot.BOTTOM, TextureSlot.TOP, TextureSlot.SIDE);
|
| 92 | public static final ModelTemplate STAIRS_OUTER = create("outer_stairs", "_outer", TextureSlot.BOTTOM, TextureSlot.TOP, TextureSlot.SIDE);
|
| 93 | public static final ModelTemplate TRAPDOOR_TOP = create("template_trapdoor_top", "_top", TextureSlot.TEXTURE);
|
| 94 | public static final ModelTemplate TRAPDOOR_BOTTOM = create("template_trapdoor_bottom", "_bottom", TextureSlot.TEXTURE);
|
| 95 | public static final ModelTemplate TRAPDOOR_OPEN = create("template_trapdoor_open", "_open", TextureSlot.TEXTURE);
|
| 96 | public static final ModelTemplate BED_HEAD = create("template_bed_head", TextureSlot.UP, TextureSlot.EAST, TextureSlot.WEST);
|
| 97 | public static final ModelTemplate BED_FOOT = create("template_bed_foot", TextureSlot.UP, TextureSlot.EAST, TextureSlot.WEST, TextureSlot.SOUTH);
|
| 98 | public static final ModelTemplate ORIENTABLE_TRAPDOOR_TOP = create("template_orientable_trapdoor_top", "_top", TextureSlot.TEXTURE);
|
| 99 | public static final ModelTemplate ORIENTABLE_TRAPDOOR_BOTTOM = create("template_orientable_trapdoor_bottom", "_bottom", TextureSlot.TEXTURE);
|
| 100 | public static final ModelTemplate ORIENTABLE_TRAPDOOR_OPEN = create("template_orientable_trapdoor_open", "_open", TextureSlot.TEXTURE);
|
| 101 | public static final ModelTemplate POINTED_DRIPSTONE = create("pointed_dripstone", TextureSlot.CROSS);
|
| 102 | public static final ModelTemplate CROSS = create("cross", TextureSlot.CROSS);
|
| 103 | public static final ModelTemplate TINTED_CROSS = create("tinted_cross", TextureSlot.CROSS);
|
| 104 | public static final ModelTemplate CROSS_EMISSIVE = create("cross_emissive", TextureSlot.CROSS, TextureSlot.CROSS_EMISSIVE);
|
| 105 | public static final ModelTemplate FLOWER_POT_CROSS = create("flower_pot_cross", TextureSlot.PLANT);
|
| 106 | public static final ModelTemplate TINTED_FLOWER_POT_CROSS = create("tinted_flower_pot_cross", TextureSlot.PLANT);
|
| 107 | public static final ModelTemplate FLOWER_POT_CROSS_EMISSIVE = create("flower_pot_cross_emissive", TextureSlot.PLANT, TextureSlot.CROSS_EMISSIVE);
|
| 108 | public static final ModelTemplate RAIL_FLAT = create("rail_flat", TextureSlot.RAIL);
|
| 109 | public static final ModelTemplate RAIL_CURVED = create("rail_curved", "_corner", TextureSlot.RAIL);
|
| 110 | public static final ModelTemplate RAIL_RAISED_NE = create("template_rail_raised_ne", "_raised_ne", TextureSlot.RAIL);
|
| 111 | public static final ModelTemplate RAIL_RAISED_SW = create("template_rail_raised_sw", "_raised_sw", TextureSlot.RAIL);
|
| 112 | public static final ModelTemplate CARPET = create("carpet", TextureSlot.WOOL);
|
| 113 | public static final ModelTemplate MOSSY_CARPET_SIDE = create("mossy_carpet_side", TextureSlot.SIDE);
|
| 114 | public static final ModelTemplate FLOWERBED_1 = create("flowerbed_1", "_1", TextureSlot.FLOWERBED, TextureSlot.STEM);
|
| 115 | public static final ModelTemplate FLOWERBED_2 = create("flowerbed_2", "_2", TextureSlot.FLOWERBED, TextureSlot.STEM);
|
| 116 | public static final ModelTemplate FLOWERBED_3 = create("flowerbed_3", "_3", TextureSlot.FLOWERBED, TextureSlot.STEM);
|
| 117 | public static final ModelTemplate FLOWERBED_4 = create("flowerbed_4", "_4", TextureSlot.FLOWERBED, TextureSlot.STEM);
|
| 118 | public static final ModelTemplate LEAF_LITTER_1 = create("template_leaf_litter_1", "_1", TextureSlot.TEXTURE);
|
| 119 | public static final ModelTemplate LEAF_LITTER_2 = create("template_leaf_litter_2", "_2", TextureSlot.TEXTURE);
|
| 120 | public static final ModelTemplate LEAF_LITTER_3 = create("template_leaf_litter_3", "_3", TextureSlot.TEXTURE);
|
| 121 | public static final ModelTemplate LEAF_LITTER_4 = create("template_leaf_litter_4", "_4", TextureSlot.TEXTURE);
|
| 122 | public static final ModelTemplate CORAL_FAN = create("coral_fan", TextureSlot.FAN);
|
| 123 | public static final ModelTemplate CORAL_WALL_FAN = create("coral_wall_fan", TextureSlot.FAN);
|
| 124 | public static final ModelTemplate GLAZED_TERRACOTTA = create("template_glazed_terracotta", TextureSlot.PATTERN);
|
| 125 | public static final ModelTemplate CHORUS_FLOWER = create("template_chorus_flower", TextureSlot.TEXTURE);
|
| 126 | public static final ModelTemplate DAYLIGHT_DETECTOR = create("template_daylight_detector", TextureSlot.TOP, TextureSlot.SIDE);
|
| 127 | public static final ModelTemplate STAINED_GLASS_PANE_NOSIDE = create("template_glass_pane_noside", "_noside", TextureSlot.PANE);
|
| 128 | public static final ModelTemplate STAINED_GLASS_PANE_NOSIDE_ALT = create("template_glass_pane_noside_alt", "_noside_alt", TextureSlot.PANE);
|
| 129 | public static final ModelTemplate STAINED_GLASS_PANE_POST = create("template_glass_pane_post", "_post", TextureSlot.PANE, TextureSlot.EDGE);
|
| 130 | public static final ModelTemplate STAINED_GLASS_PANE_SIDE = create("template_glass_pane_side", "_side", TextureSlot.PANE, TextureSlot.EDGE);
|
| 131 | public static final ModelTemplate STAINED_GLASS_PANE_SIDE_ALT = create("template_glass_pane_side_alt", "_side_alt", TextureSlot.PANE, TextureSlot.EDGE);
|
| 132 | public static final ModelTemplate COMMAND_BLOCK = create("template_command_block", TextureSlot.FRONT, TextureSlot.BACK, TextureSlot.SIDE);
|
| 133 | public static final ModelTemplate CHISELED_BOOKSHELF_SLOT_TOP_LEFT = create("template_chiseled_bookshelf_slot_top_left", "_slot_top_left", TextureSlot.TEXTURE);
|
| 134 | public static final ModelTemplate CHISELED_BOOKSHELF_SLOT_TOP_MID = create("template_chiseled_bookshelf_slot_top_mid", "_slot_top_mid", TextureSlot.TEXTURE);
|
| 135 | public static final ModelTemplate CHISELED_BOOKSHELF_SLOT_TOP_RIGHT = create(
|
| 136 | "template_chiseled_bookshelf_slot_top_right", "_slot_top_right", TextureSlot.TEXTURE
|
| 137 | );
|
| 138 | public static final ModelTemplate CHISELED_BOOKSHELF_SLOT_BOTTOM_LEFT = create(
|
| 139 | "template_chiseled_bookshelf_slot_bottom_left", "_slot_bottom_left", TextureSlot.TEXTURE
|
| 140 | );
|
| 141 | public static final ModelTemplate CHISELED_BOOKSHELF_SLOT_BOTTOM_MID = create(
|
| 142 | "template_chiseled_bookshelf_slot_bottom_mid", "_slot_bottom_mid", TextureSlot.TEXTURE
|
| 143 | );
|
| 144 | public static final ModelTemplate CHISELED_BOOKSHELF_SLOT_BOTTOM_RIGHT = create(
|
| 145 | "template_chiseled_bookshelf_slot_bottom_right", "_slot_bottom_right", TextureSlot.TEXTURE
|
| 146 | );
|
| 147 | public static final ModelTemplate SHELF_BODY = create("template_shelf_body", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 148 | public static final ModelTemplate SHELF_INVENTORY = create("template_shelf_inventory", "_inventory", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 149 | public static final ModelTemplate SHELF_UNPOWERED = create("template_shelf_unpowered", "_unpowered", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 150 | public static final ModelTemplate SHELF_UNCONNECTED = create("template_shelf_unconnected", "_unconnected", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 151 | public static final ModelTemplate SHELF_LEFT = create("template_shelf_left", "_left", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 152 | public static final ModelTemplate SHELF_CENTER = create("template_shelf_center", "_center", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 153 | public static final ModelTemplate SHELF_RIGHT = create("template_shelf_right", "_right", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 154 | public static final ModelTemplate ANVIL = create("template_anvil", TextureSlot.TOP);
|
| 155 | public static final ModelTemplate[] STEMS = IntStream.range(0, 8)
|
| 156 | .mapToObj(i -> create("stem_growth" + i, "_stage" + i, TextureSlot.STEM))
|
| 157 | .toArray(ModelTemplate[]::new);
|
| 158 | public static final ModelTemplate ATTACHED_STEM = create("stem_fruit", TextureSlot.STEM, TextureSlot.UPPER_STEM);
|
| 159 | public static final ModelTemplate CROP = create("crop", TextureSlot.CROP);
|
| 160 | public static final ModelTemplate FIRE_FLOOR = create("template_fire_floor", TextureSlot.FIRE);
|
| 161 | public static final ModelTemplate FIRE_SIDE = create("template_fire_side", TextureSlot.FIRE);
|
| 162 | public static final ModelTemplate FIRE_SIDE_ALT = create("template_fire_side_alt", TextureSlot.FIRE);
|
| 163 | public static final ModelTemplate FIRE_UP = create("template_fire_up", TextureSlot.FIRE);
|
| 164 | public static final ModelTemplate FIRE_UP_ALT = create("template_fire_up_alt", TextureSlot.FIRE);
|
| 165 | public static final ModelTemplate CAMPFIRE = create("template_campfire", TextureSlot.FIRE, TextureSlot.LIT_LOG);
|
| 166 | public static final ModelTemplate LANTERN = create("template_lantern", TextureSlot.LANTERN);
|
| 167 | public static final ModelTemplate HANGING_LANTERN = create("template_hanging_lantern", "_hanging", TextureSlot.LANTERN);
|
| 168 | public static final ModelTemplate CHAIN = create("template_chain", TextureSlot.TEXTURE);
|
| 169 | public static final ModelTemplate BARS_CAP = create("template_bars_cap", "_cap", TextureSlot.BARS, TextureSlot.EDGE);
|
| 170 | public static final ModelTemplate BARS_CAP_ALT = create("template_bars_cap_alt", "_cap_alt", TextureSlot.BARS, TextureSlot.EDGE);
|
| 171 | public static final ModelTemplate BARS_POST = create("template_bars_post", "_post", TextureSlot.BARS, TextureSlot.EDGE);
|
| 172 | public static final ModelTemplate BARS_POST_ENDS = create("template_bars_post_ends", "_post_ends", TextureSlot.BARS, TextureSlot.EDGE);
|
| 173 | public static final ModelTemplate BARS_POST_SIDE = create("template_bars_side", "_side", TextureSlot.BARS, TextureSlot.EDGE);
|
| 174 | public static final ModelTemplate BARS_POST_SIDE_ALT = create("template_bars_side_alt", "_side_alt", TextureSlot.BARS, TextureSlot.EDGE);
|
| 175 | public static final ModelTemplate TORCH = create("template_torch", TextureSlot.TORCH);
|
| 176 | public static final ModelTemplate TORCH_UNLIT = create("template_torch_unlit", TextureSlot.TORCH);
|
| 177 | public static final ModelTemplate WALL_TORCH = create("template_torch_wall", TextureSlot.TORCH);
|
| 178 | public static final ModelTemplate WALL_TORCH_UNLIT = create("template_torch_wall_unlit", TextureSlot.TORCH);
|
| 179 | public static final ModelTemplate REDSTONE_TORCH = create("template_redstone_torch", TextureSlot.TORCH);
|
| 180 | public static final ModelTemplate REDSTONE_WALL_TORCH = create("template_redstone_torch_wall", TextureSlot.TORCH);
|
| 181 | public static final ModelTemplate PISTON = create("template_piston", TextureSlot.PLATFORM, TextureSlot.BOTTOM, TextureSlot.SIDE);
|
| 182 | public static final ModelTemplate PISTON_HEAD = create("template_piston_head", TextureSlot.PLATFORM, TextureSlot.SIDE, TextureSlot.UNSTICKY);
|
| 183 | public static final ModelTemplate PISTON_HEAD_SHORT = create("template_piston_head_short", TextureSlot.PLATFORM, TextureSlot.SIDE, TextureSlot.UNSTICKY);
|
| 184 | public static final ModelTemplate SEAGRASS = create("template_seagrass", TextureSlot.TEXTURE);
|
| 185 | public static final ModelTemplate TURTLE_EGG = create("template_turtle_egg", TextureSlot.ALL);
|
| 186 | public static final ModelTemplate DRIED_GHAST = create(
|
| 187 | "dried_ghast",
|
| 188 | TextureSlot.PARTICLE,
|
| 189 | TextureSlot.TOP,
|
| 190 | TextureSlot.BOTTOM,
|
| 191 | TextureSlot.NORTH,
|
| 192 | TextureSlot.SOUTH,
|
| 193 | TextureSlot.EAST,
|
| 194 | TextureSlot.WEST,
|
| 195 | TextureSlot.TENTACLES
|
| 196 | );
|
| 197 | public static final ModelTemplate TWO_TURTLE_EGGS = create("template_two_turtle_eggs", TextureSlot.ALL);
|
| 198 | public static final ModelTemplate THREE_TURTLE_EGGS = create("template_three_turtle_eggs", TextureSlot.ALL);
|
| 199 | public static final ModelTemplate FOUR_TURTLE_EGGS = create("template_four_turtle_eggs", TextureSlot.ALL);
|
| 200 | public static final ModelTemplate SINGLE_FACE = create("template_single_face", TextureSlot.TEXTURE);
|
| 201 | public static final ModelTemplate CAULDRON_LEVEL1 = create(
|
| 202 | "template_cauldron_level1", TextureSlot.CONTENT, TextureSlot.INSIDE, TextureSlot.PARTICLE, TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE
|
| 203 | );
|
| 204 | public static final ModelTemplate CAULDRON_LEVEL2 = create(
|
| 205 | "template_cauldron_level2", TextureSlot.CONTENT, TextureSlot.INSIDE, TextureSlot.PARTICLE, TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE
|
| 206 | );
|
| 207 | public static final ModelTemplate CAULDRON_FULL = create(
|
| 208 | "template_cauldron_full", TextureSlot.CONTENT, TextureSlot.INSIDE, TextureSlot.PARTICLE, TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE
|
| 209 | );
|
| 210 | public static final ModelTemplate AZALEA = create("template_azalea", TextureSlot.TOP, TextureSlot.SIDE);
|
| 211 | public static final ModelTemplate POTTED_AZALEA = create("template_potted_azalea_bush", TextureSlot.PLANT, TextureSlot.TOP, TextureSlot.SIDE);
|
| 212 | public static final ModelTemplate POTTED_FLOWERING_AZALEA = create("template_potted_azalea_bush", TextureSlot.PLANT, TextureSlot.TOP, TextureSlot.SIDE);
|
| 213 | public static final ModelTemplate SNIFFER_EGG = create(
|
| 214 | "sniffer_egg", TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.NORTH, TextureSlot.SOUTH, TextureSlot.EAST, TextureSlot.WEST
|
| 215 | );
|
| 216 | public static final ModelTemplate FLAT_ITEM = createItem("generated", TextureSlot.LAYER0);
|
| 217 | public static final ModelTemplate MUSIC_DISC = createItem("template_music_disc", TextureSlot.LAYER0);
|
| 218 | public static final ModelTemplate FLAT_HANDHELD_ITEM = createItem("handheld", TextureSlot.LAYER0);
|
| 219 | public static final ModelTemplate FLAT_HANDHELD_ROD_ITEM = createItem("handheld_rod", TextureSlot.LAYER0);
|
| 220 | public static final ModelTemplate TWO_LAYERED_ITEM = createItem("generated", TextureSlot.LAYER0, TextureSlot.LAYER1);
|
| 221 | public static final ModelTemplate THREE_LAYERED_ITEM = createItem("generated", TextureSlot.LAYER0, TextureSlot.LAYER1, TextureSlot.LAYER2);
|
| 222 | public static final ModelTemplate SHULKER_BOX_INVENTORY = createItem("template_shulker_box", TextureSlot.PARTICLE);
|
| 223 | public static final ModelTemplate CHEST_INVENTORY = createItem("template_chest", TextureSlot.PARTICLE);
|
| 224 | public static final ModelTemplate BUNDLE_OPEN_FRONT_INVENTORY = createItem("template_bundle_open_front", "_open_front", TextureSlot.LAYER0);
|
| 225 | public static final ModelTemplate BUNDLE_OPEN_BACK_INVENTORY = createItem("template_bundle_open_back", "_open_back", TextureSlot.LAYER0);
|
| 226 | public static final ModelTemplate BOW = createItem("bow", TextureSlot.LAYER0);
|
| 227 | public static final ModelTemplate CROSSBOW = createItem("crossbow", TextureSlot.LAYER0);
|
| 228 | public static final ModelTemplate SPEAR_IN_HAND = createItem("spear_in_hand", "_in_hand", TextureSlot.LAYER0);
|
| 229 | public static final ModelTemplate CANDLE = create("template_candle", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 230 | public static final ModelTemplate TWO_CANDLES = create("template_two_candles", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 231 | public static final ModelTemplate THREE_CANDLES = create("template_three_candles", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 232 | public static final ModelTemplate FOUR_CANDLES = create("template_four_candles", TextureSlot.ALL, TextureSlot.PARTICLE);
|
| 233 | public static final ModelTemplate CANDLE_CAKE = create(
|
| 234 | "template_cake_with_candle", TextureSlot.CANDLE, TextureSlot.BOTTOM, TextureSlot.SIDE, TextureSlot.TOP, TextureSlot.PARTICLE
|
| 235 | );
|
| 236 | public static final ModelTemplate SCULK_SHRIEKER = create(
|
| 237 | "template_sculk_shrieker", TextureSlot.BOTTOM, TextureSlot.SIDE, TextureSlot.TOP, TextureSlot.PARTICLE, TextureSlot.INNER_TOP
|
| 238 | );
|
| 239 | public static final ModelTemplate VAULT = create("template_vault", TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE, TextureSlot.FRONT);
|
| 240 | public static final ModelTemplate FLAT_HANDHELD_MACE_ITEM = createItem("handheld_mace", TextureSlot.LAYER0);
|
| 241 | public static final ModelTemplate LIGHTNING_ROD = create("template_lightning_rod", TextureSlot.TEXTURE);
|
| 242 |
|
| 243 | private static ModelTemplate create(final TextureSlot... slots) {
|
| 244 | return new ModelTemplate(Optional.empty(), Optional.empty(), slots);
|
| 245 | }
|
| 246 |
|
| 247 | private static ModelTemplate create(final String id, final TextureSlot... slots) {
|
| 248 | return new ModelTemplate(Optional.of(Identifier.withDefaultNamespace("block/" + id)), Optional.empty(), slots);
|
| 249 | }
|
| 250 |
|
| 251 | private static ModelTemplate createItem(final String id, final TextureSlot... slots) {
|
| 252 | return new ModelTemplate(Optional.of(Identifier.withDefaultNamespace("item/" + id)), Optional.empty(), slots);
|
| 253 | }
|
| 254 |
|
| 255 | private static ModelTemplate createItem(final String id, final String suffix, final TextureSlot... slots) {
|
| 256 | return new ModelTemplate(Optional.of(Identifier.withDefaultNamespace("item/" + id)), Optional.of(suffix), slots);
|
| 257 | }
|
| 258 |
|
| 259 | private static ModelTemplate create(final String id, final String suffix, final TextureSlot... slots) {
|
| 260 | return new ModelTemplate(Optional.of(Identifier.withDefaultNamespace("block/" + id)), Optional.of(suffix), slots);
|
| 261 | }
|
| 262 | }
|
| 263 |
|