| 1 | package net.minecraft.data;
|
| 2 |
|
| 3 | import com.google.common.collect.Maps;
|
| 4 | import java.util.Map;
|
| 5 | import java.util.stream.Stream;
|
| 6 | import net.minecraft.core.registries.BuiltInRegistries;
|
| 7 | import net.minecraft.world.level.block.Block;
|
| 8 | import net.minecraft.world.level.block.Blocks;
|
| 9 | import net.minecraft.world.level.block.ColorCollection;
|
| 10 | import net.minecraft.world.level.block.WeatheringCopperCollection;
|
| 11 | import org.jspecify.annotations.Nullable;
|
| 12 |
|
| 13 | /**
|
| 14 | * Access widened by fabric-data-generation-api-v1 to accessible
|
| 15 | */
|
| 16 | public class BlockFamilies {
|
| 17 | private static final Map<Block, BlockFamily> MAP = Maps.newHashMap();
|
| 18 | private static final String RECIPE_GROUP_PREFIX_WOODEN = "wooden";
|
| 19 | private static final String RECIPE_GROUP_PREFIX_WOOLEN = "woolen";
|
| 20 | private static final String RECIPE_UNLOCKED_BY_HAS_PLANKS = "has_planks";
|
| 21 | public static final BlockFamily ACACIA_PLANKS = familyBuilder(Blocks.ACACIA_PLANKS)
|
| 22 | .log(Blocks.ACACIA_LOG)
|
| 23 | .strippedLog(Blocks.STRIPPED_ACACIA_LOG)
|
| 24 | .button(Blocks.ACACIA_BUTTON)
|
| 25 | .fence(Blocks.ACACIA_FENCE)
|
| 26 | .fenceGate(Blocks.ACACIA_FENCE_GATE)
|
| 27 | .hangingSign(Blocks.ACACIA_HANGING_SIGN, Blocks.ACACIA_WALL_HANGING_SIGN)
|
| 28 | .pressurePlate(Blocks.ACACIA_PRESSURE_PLATE)
|
| 29 | .sign(Blocks.ACACIA_SIGN, Blocks.ACACIA_WALL_SIGN)
|
| 30 | .slab(Blocks.ACACIA_SLAB)
|
| 31 | .stairs(Blocks.ACACIA_STAIRS)
|
| 32 | .door(Blocks.ACACIA_DOOR)
|
| 33 | .trapdoor(Blocks.ACACIA_TRAPDOOR)
|
| 34 | .recipeGroupPrefix("wooden")
|
| 35 | .recipeUnlockedBy("has_planks")
|
| 36 | .getFamily();
|
| 37 | public static final BlockFamily CHERRY_PLANKS = familyBuilder(Blocks.CHERRY_PLANKS)
|
| 38 | .log(Blocks.CHERRY_LOG)
|
| 39 | .strippedLog(Blocks.STRIPPED_CHERRY_LOG)
|
| 40 | .button(Blocks.CHERRY_BUTTON)
|
| 41 | .fence(Blocks.CHERRY_FENCE)
|
| 42 | .fenceGate(Blocks.CHERRY_FENCE_GATE)
|
| 43 | .hangingSign(Blocks.CHERRY_HANGING_SIGN, Blocks.CHERRY_WALL_HANGING_SIGN)
|
| 44 | .pressurePlate(Blocks.CHERRY_PRESSURE_PLATE)
|
| 45 | .sign(Blocks.CHERRY_SIGN, Blocks.CHERRY_WALL_SIGN)
|
| 46 | .slab(Blocks.CHERRY_SLAB)
|
| 47 | .stairs(Blocks.CHERRY_STAIRS)
|
| 48 | .door(Blocks.CHERRY_DOOR)
|
| 49 | .trapdoor(Blocks.CHERRY_TRAPDOOR)
|
| 50 | .recipeGroupPrefix("wooden")
|
| 51 | .recipeUnlockedBy("has_planks")
|
| 52 | .getFamily();
|
| 53 | public static final BlockFamily BIRCH_PLANKS = familyBuilder(Blocks.BIRCH_PLANKS)
|
| 54 | .log(Blocks.BIRCH_LOG)
|
| 55 | .strippedLog(Blocks.STRIPPED_BIRCH_LOG)
|
| 56 | .button(Blocks.BIRCH_BUTTON)
|
| 57 | .fence(Blocks.BIRCH_FENCE)
|
| 58 | .fenceGate(Blocks.BIRCH_FENCE_GATE)
|
| 59 | .hangingSign(Blocks.BIRCH_HANGING_SIGN, Blocks.BIRCH_WALL_HANGING_SIGN)
|
| 60 | .pressurePlate(Blocks.BIRCH_PRESSURE_PLATE)
|
| 61 | .sign(Blocks.BIRCH_SIGN, Blocks.BIRCH_WALL_SIGN)
|
| 62 | .slab(Blocks.BIRCH_SLAB)
|
| 63 | .stairs(Blocks.BIRCH_STAIRS)
|
| 64 | .door(Blocks.BIRCH_DOOR)
|
| 65 | .trapdoor(Blocks.BIRCH_TRAPDOOR)
|
| 66 | .recipeGroupPrefix("wooden")
|
| 67 | .recipeUnlockedBy("has_planks")
|
| 68 | .getFamily();
|
| 69 | public static final BlockFamily CRIMSON_PLANKS = familyBuilder(Blocks.CRIMSON_PLANKS)
|
| 70 | .log(Blocks.CRIMSON_STEM)
|
| 71 | .strippedLog(Blocks.STRIPPED_CRIMSON_STEM)
|
| 72 | .button(Blocks.CRIMSON_BUTTON)
|
| 73 | .fence(Blocks.CRIMSON_FENCE)
|
| 74 | .fenceGate(Blocks.CRIMSON_FENCE_GATE)
|
| 75 | .hangingSign(Blocks.CRIMSON_HANGING_SIGN, Blocks.CRIMSON_WALL_HANGING_SIGN)
|
| 76 | .pressurePlate(Blocks.CRIMSON_PRESSURE_PLATE)
|
| 77 | .sign(Blocks.CRIMSON_SIGN, Blocks.CRIMSON_WALL_SIGN)
|
| 78 | .slab(Blocks.CRIMSON_SLAB)
|
| 79 | .stairs(Blocks.CRIMSON_STAIRS)
|
| 80 | .door(Blocks.CRIMSON_DOOR)
|
| 81 | .trapdoor(Blocks.CRIMSON_TRAPDOOR)
|
| 82 | .recipeGroupPrefix("wooden")
|
| 83 | .recipeUnlockedBy("has_planks")
|
| 84 | .getFamily();
|
| 85 | public static final BlockFamily JUNGLE_PLANKS = familyBuilder(Blocks.JUNGLE_PLANKS)
|
| 86 | .log(Blocks.JUNGLE_LOG)
|
| 87 | .strippedLog(Blocks.STRIPPED_JUNGLE_LOG)
|
| 88 | .button(Blocks.JUNGLE_BUTTON)
|
| 89 | .fence(Blocks.JUNGLE_FENCE)
|
| 90 | .fenceGate(Blocks.JUNGLE_FENCE_GATE)
|
| 91 | .hangingSign(Blocks.JUNGLE_HANGING_SIGN, Blocks.JUNGLE_WALL_HANGING_SIGN)
|
| 92 | .pressurePlate(Blocks.JUNGLE_PRESSURE_PLATE)
|
| 93 | .sign(Blocks.JUNGLE_SIGN, Blocks.JUNGLE_WALL_SIGN)
|
| 94 | .slab(Blocks.JUNGLE_SLAB)
|
| 95 | .stairs(Blocks.JUNGLE_STAIRS)
|
| 96 | .door(Blocks.JUNGLE_DOOR)
|
| 97 | .trapdoor(Blocks.JUNGLE_TRAPDOOR)
|
| 98 | .recipeGroupPrefix("wooden")
|
| 99 | .recipeUnlockedBy("has_planks")
|
| 100 | .getFamily();
|
| 101 | public static final BlockFamily OAK_PLANKS = familyBuilder(Blocks.OAK_PLANKS)
|
| 102 | .log(Blocks.OAK_LOG)
|
| 103 | .strippedLog(Blocks.STRIPPED_OAK_LOG)
|
| 104 | .button(Blocks.OAK_BUTTON)
|
| 105 | .fence(Blocks.OAK_FENCE)
|
| 106 | .fenceGate(Blocks.OAK_FENCE_GATE)
|
| 107 | .hangingSign(Blocks.OAK_HANGING_SIGN, Blocks.OAK_WALL_HANGING_SIGN)
|
| 108 | .pressurePlate(Blocks.OAK_PRESSURE_PLATE)
|
| 109 | .sign(Blocks.OAK_SIGN, Blocks.OAK_WALL_SIGN)
|
| 110 | .slab(Blocks.OAK_SLAB)
|
| 111 | .stairs(Blocks.OAK_STAIRS)
|
| 112 | .door(Blocks.OAK_DOOR)
|
| 113 | .trapdoor(Blocks.OAK_TRAPDOOR)
|
| 114 | .recipeGroupPrefix("wooden")
|
| 115 | .recipeUnlockedBy("has_planks")
|
| 116 | .getFamily();
|
| 117 | public static final BlockFamily DARK_OAK_PLANKS = familyBuilder(Blocks.DARK_OAK_PLANKS)
|
| 118 | .log(Blocks.DARK_OAK_LOG)
|
| 119 | .strippedLog(Blocks.STRIPPED_DARK_OAK_LOG)
|
| 120 | .button(Blocks.DARK_OAK_BUTTON)
|
| 121 | .fence(Blocks.DARK_OAK_FENCE)
|
| 122 | .fenceGate(Blocks.DARK_OAK_FENCE_GATE)
|
| 123 | .hangingSign(Blocks.DARK_OAK_HANGING_SIGN, Blocks.DARK_OAK_WALL_HANGING_SIGN)
|
| 124 | .pressurePlate(Blocks.DARK_OAK_PRESSURE_PLATE)
|
| 125 | .sign(Blocks.DARK_OAK_SIGN, Blocks.DARK_OAK_WALL_SIGN)
|
| 126 | .slab(Blocks.DARK_OAK_SLAB)
|
| 127 | .stairs(Blocks.DARK_OAK_STAIRS)
|
| 128 | .door(Blocks.DARK_OAK_DOOR)
|
| 129 | .trapdoor(Blocks.DARK_OAK_TRAPDOOR)
|
| 130 | .recipeGroupPrefix("wooden")
|
| 131 | .recipeUnlockedBy("has_planks")
|
| 132 | .getFamily();
|
| 133 | public static final BlockFamily PALE_OAK_PLANKS = familyBuilder(Blocks.PALE_OAK_PLANKS)
|
| 134 | .log(Blocks.PALE_OAK_LOG)
|
| 135 | .strippedLog(Blocks.STRIPPED_PALE_OAK_LOG)
|
| 136 | .button(Blocks.PALE_OAK_BUTTON)
|
| 137 | .fence(Blocks.PALE_OAK_FENCE)
|
| 138 | .fenceGate(Blocks.PALE_OAK_FENCE_GATE)
|
| 139 | .hangingSign(Blocks.PALE_OAK_HANGING_SIGN, Blocks.PALE_OAK_WALL_HANGING_SIGN)
|
| 140 | .pressurePlate(Blocks.PALE_OAK_PRESSURE_PLATE)
|
| 141 | .sign(Blocks.PALE_OAK_SIGN, Blocks.PALE_OAK_WALL_SIGN)
|
| 142 | .slab(Blocks.PALE_OAK_SLAB)
|
| 143 | .stairs(Blocks.PALE_OAK_STAIRS)
|
| 144 | .door(Blocks.PALE_OAK_DOOR)
|
| 145 | .trapdoor(Blocks.PALE_OAK_TRAPDOOR)
|
| 146 | .recipeGroupPrefix("wooden")
|
| 147 | .recipeUnlockedBy("has_planks")
|
| 148 | .getFamily();
|
| 149 | public static final BlockFamily POPLAR_PLANKS = familyBuilder(Blocks.POPLAR_PLANKS)
|
| 150 | .log(Blocks.POPLAR_LOG)
|
| 151 | .strippedLog(Blocks.STRIPPED_POPLAR_LOG)
|
| 152 | .button(Blocks.POPLAR_BUTTON)
|
| 153 | .fence(Blocks.POPLAR_FENCE)
|
| 154 | .fenceGate(Blocks.POPLAR_FENCE_GATE)
|
| 155 | .pressurePlate(Blocks.POPLAR_PRESSURE_PLATE)
|
| 156 | .hangingSign(Blocks.POPLAR_HANGING_SIGN, Blocks.POPLAR_WALL_HANGING_SIGN)
|
| 157 | .sign(Blocks.POPLAR_SIGN, Blocks.POPLAR_WALL_SIGN)
|
| 158 | .slab(Blocks.POPLAR_SLAB)
|
| 159 | .stairs(Blocks.POPLAR_STAIRS)
|
| 160 | .door(Blocks.POPLAR_DOOR)
|
| 161 | .trapdoor(Blocks.POPLAR_TRAPDOOR)
|
| 162 | .recipeGroupPrefix("wooden")
|
| 163 | .recipeUnlockedBy("has_planks")
|
| 164 | .getFamily();
|
| 165 | public static final BlockFamily SPRUCE_PLANKS = familyBuilder(Blocks.SPRUCE_PLANKS)
|
| 166 | .log(Blocks.SPRUCE_LOG)
|
| 167 | .strippedLog(Blocks.STRIPPED_SPRUCE_LOG)
|
| 168 | .button(Blocks.SPRUCE_BUTTON)
|
| 169 | .fence(Blocks.SPRUCE_FENCE)
|
| 170 | .fenceGate(Blocks.SPRUCE_FENCE_GATE)
|
| 171 | .hangingSign(Blocks.SPRUCE_HANGING_SIGN, Blocks.SPRUCE_WALL_HANGING_SIGN)
|
| 172 | .pressurePlate(Blocks.SPRUCE_PRESSURE_PLATE)
|
| 173 | .sign(Blocks.SPRUCE_SIGN, Blocks.SPRUCE_WALL_SIGN)
|
| 174 | .slab(Blocks.SPRUCE_SLAB)
|
| 175 | .stairs(Blocks.SPRUCE_STAIRS)
|
| 176 | .door(Blocks.SPRUCE_DOOR)
|
| 177 | .trapdoor(Blocks.SPRUCE_TRAPDOOR)
|
| 178 | .recipeGroupPrefix("wooden")
|
| 179 | .recipeUnlockedBy("has_planks")
|
| 180 | .getFamily();
|
| 181 | public static final BlockFamily WARPED_PLANKS = familyBuilder(Blocks.WARPED_PLANKS)
|
| 182 | .log(Blocks.WARPED_STEM)
|
| 183 | .strippedLog(Blocks.STRIPPED_WARPED_STEM)
|
| 184 | .button(Blocks.WARPED_BUTTON)
|
| 185 | .fence(Blocks.WARPED_FENCE)
|
| 186 | .fenceGate(Blocks.WARPED_FENCE_GATE)
|
| 187 | .hangingSign(Blocks.WARPED_HANGING_SIGN, Blocks.WARPED_WALL_HANGING_SIGN)
|
| 188 | .pressurePlate(Blocks.WARPED_PRESSURE_PLATE)
|
| 189 | .sign(Blocks.WARPED_SIGN, Blocks.WARPED_WALL_SIGN)
|
| 190 | .slab(Blocks.WARPED_SLAB)
|
| 191 | .stairs(Blocks.WARPED_STAIRS)
|
| 192 | .door(Blocks.WARPED_DOOR)
|
| 193 | .trapdoor(Blocks.WARPED_TRAPDOOR)
|
| 194 | .recipeGroupPrefix("wooden")
|
| 195 | .recipeUnlockedBy("has_planks")
|
| 196 | .getFamily();
|
| 197 | public static final BlockFamily MANGROVE_PLANKS = familyBuilder(Blocks.MANGROVE_PLANKS)
|
| 198 | .log(Blocks.MANGROVE_LOG)
|
| 199 | .strippedLog(Blocks.STRIPPED_MANGROVE_LOG)
|
| 200 | .button(Blocks.MANGROVE_BUTTON)
|
| 201 | .slab(Blocks.MANGROVE_SLAB)
|
| 202 | .stairs(Blocks.MANGROVE_STAIRS)
|
| 203 | .fence(Blocks.MANGROVE_FENCE)
|
| 204 | .fenceGate(Blocks.MANGROVE_FENCE_GATE)
|
| 205 | .hangingSign(Blocks.MANGROVE_HANGING_SIGN, Blocks.MANGROVE_WALL_HANGING_SIGN)
|
| 206 | .pressurePlate(Blocks.MANGROVE_PRESSURE_PLATE)
|
| 207 | .sign(Blocks.MANGROVE_SIGN, Blocks.MANGROVE_WALL_SIGN)
|
| 208 | .door(Blocks.MANGROVE_DOOR)
|
| 209 | .trapdoor(Blocks.MANGROVE_TRAPDOOR)
|
| 210 | .recipeGroupPrefix("wooden")
|
| 211 | .recipeUnlockedBy("has_planks")
|
| 212 | .getFamily();
|
| 213 | public static final BlockFamily BAMBOO_PLANKS = familyBuilder(Blocks.BAMBOO_PLANKS)
|
| 214 | .log(Blocks.BAMBOO_BLOCK)
|
| 215 | .strippedLog(Blocks.STRIPPED_BAMBOO_BLOCK)
|
| 216 | .button(Blocks.BAMBOO_BUTTON)
|
| 217 | .slab(Blocks.BAMBOO_SLAB)
|
| 218 | .stairs(Blocks.BAMBOO_STAIRS)
|
| 219 | .customFence(Blocks.BAMBOO_FENCE)
|
| 220 | .customFenceGate(Blocks.BAMBOO_FENCE_GATE)
|
| 221 | .customHangingSign(Blocks.BAMBOO_HANGING_SIGN, Blocks.BAMBOO_WALL_HANGING_SIGN)
|
| 222 | .pressurePlate(Blocks.BAMBOO_PRESSURE_PLATE)
|
| 223 | .sign(Blocks.BAMBOO_SIGN, Blocks.BAMBOO_WALL_SIGN)
|
| 224 | .door(Blocks.BAMBOO_DOOR)
|
| 225 | .trapdoor(Blocks.BAMBOO_TRAPDOOR)
|
| 226 | .mosaic(Blocks.BAMBOO_MOSAIC)
|
| 227 | .recipeGroupPrefix("wooden")
|
| 228 | .recipeUnlockedBy("has_planks")
|
| 229 | .getFamily();
|
| 230 | public static final BlockFamily BAMBOO_MOSAIC = familyBuilder(Blocks.BAMBOO_MOSAIC)
|
| 231 | .slab(Blocks.BAMBOO_MOSAIC_SLAB)
|
| 232 | .stairs(Blocks.BAMBOO_MOSAIC_STAIRS)
|
| 233 | .getFamily();
|
| 234 | public static final BlockFamily MUD_BRICKS = familyBuilder(Blocks.MUD_BRICKS)
|
| 235 | .wall(Blocks.MUD_BRICK_WALL)
|
| 236 | .stairs(Blocks.MUD_BRICK_STAIRS)
|
| 237 | .slab(Blocks.MUD_BRICK_SLAB)
|
| 238 | .generateStonecutterRecipe()
|
| 239 | .getFamily();
|
| 240 | public static final BlockFamily ANDESITE = familyBuilder(Blocks.ANDESITE)
|
| 241 | .wall(Blocks.ANDESITE_WALL)
|
| 242 | .stairs(Blocks.ANDESITE_STAIRS)
|
| 243 | .slab(Blocks.ANDESITE_SLAB)
|
| 244 | .polished(Blocks.POLISHED_ANDESITE)
|
| 245 | .generateStonecutterRecipe()
|
| 246 | .getFamily();
|
| 247 | public static final BlockFamily POLISHED_ANDESITE = familyBuilder(Blocks.POLISHED_ANDESITE)
|
| 248 | .stairs(Blocks.POLISHED_ANDESITE_STAIRS)
|
| 249 | .slab(Blocks.POLISHED_ANDESITE_SLAB)
|
| 250 | .generateStonecutterRecipe()
|
| 251 | .getFamily();
|
| 252 | public static final BlockFamily BLACKSTONE = familyBuilder(Blocks.BLACKSTONE)
|
| 253 | .wall(Blocks.BLACKSTONE_WALL)
|
| 254 | .stairs(Blocks.BLACKSTONE_STAIRS)
|
| 255 | .slab(Blocks.BLACKSTONE_SLAB)
|
| 256 | .polished(Blocks.POLISHED_BLACKSTONE)
|
| 257 | .generateStonecutterRecipe()
|
| 258 | .getFamily();
|
| 259 | public static final BlockFamily POLISHED_BLACKSTONE = familyBuilder(Blocks.POLISHED_BLACKSTONE)
|
| 260 | .wall(Blocks.POLISHED_BLACKSTONE_WALL)
|
| 261 | .pressurePlate(Blocks.POLISHED_BLACKSTONE_PRESSURE_PLATE)
|
| 262 | .button(Blocks.POLISHED_BLACKSTONE_BUTTON)
|
| 263 | .stairs(Blocks.POLISHED_BLACKSTONE_STAIRS)
|
| 264 | .slab(Blocks.POLISHED_BLACKSTONE_SLAB)
|
| 265 | .bricks(Blocks.POLISHED_BLACKSTONE_BRICKS)
|
| 266 | .chiseled(Blocks.CHISELED_POLISHED_BLACKSTONE)
|
| 267 | .generateStonecutterRecipe()
|
| 268 | .getFamily();
|
| 269 | public static final BlockFamily POLISHED_BLACKSTONE_BRICKS = familyBuilder(Blocks.POLISHED_BLACKSTONE_BRICKS)
|
| 270 | .wall(Blocks.POLISHED_BLACKSTONE_BRICK_WALL)
|
| 271 | .stairs(Blocks.POLISHED_BLACKSTONE_BRICK_STAIRS)
|
| 272 | .slab(Blocks.POLISHED_BLACKSTONE_BRICK_SLAB)
|
| 273 | .cracked(Blocks.CRACKED_POLISHED_BLACKSTONE_BRICKS)
|
| 274 | .generateStonecutterRecipe()
|
| 275 | .getFamily();
|
| 276 | public static final BlockFamily BRICKS = familyBuilder(Blocks.BRICKS)
|
| 277 | .wall(Blocks.BRICK_WALL)
|
| 278 | .stairs(Blocks.BRICK_STAIRS)
|
| 279 | .slab(Blocks.BRICK_SLAB)
|
| 280 | .generateStonecutterRecipe()
|
| 281 | .getFamily();
|
| 282 | public static final BlockFamily END_STONE = familyBuilder(Blocks.END_STONE).bricks(Blocks.END_STONE_BRICKS).generateStonecutterRecipe().getFamily();
|
| 283 | public static final BlockFamily END_STONE_BRICKS = familyBuilder(Blocks.END_STONE_BRICKS)
|
| 284 | .wall(Blocks.END_STONE_BRICK_WALL)
|
| 285 | .stairs(Blocks.END_STONE_BRICK_STAIRS)
|
| 286 | .slab(Blocks.END_STONE_BRICK_SLAB)
|
| 287 | .generateStonecutterRecipe()
|
| 288 | .getFamily();
|
| 289 | public static final BlockFamily MOSSY_STONE_BRICKS = familyBuilder(Blocks.MOSSY_STONE_BRICKS)
|
| 290 | .wall(Blocks.MOSSY_STONE_BRICK_WALL)
|
| 291 | .stairs(Blocks.MOSSY_STONE_BRICK_STAIRS)
|
| 292 | .slab(Blocks.MOSSY_STONE_BRICK_SLAB)
|
| 293 | .generateStonecutterRecipe()
|
| 294 | .getFamily();
|
| 295 | public static final WeatheringCopperCollection<BlockFamily> CUT_COPPER = WeatheringCopperCollection.createFamily(
|
| 296 | (prefix, state) -> familyBuilder(Blocks.CUT_COPPER.waxed().pick(state))
|
| 297 | .slab(Blocks.CUT_COPPER_SLAB.waxed().pick(state))
|
| 298 | .stairs(Blocks.CUT_COPPER_STAIRS.waxed().pick(state))
|
| 299 | .recipeGroupPrefix(prefix + "cut_copper")
|
| 300 | .dontGenerateModel()
|
| 301 | .generateStonecutterRecipe()
|
| 302 | .getFamily(),
|
| 303 | (var0, state) -> familyBuilder(Blocks.CUT_COPPER.weathering().pick(state))
|
| 304 | .slab(Blocks.CUT_COPPER_SLAB.weathering().pick(state))
|
| 305 | .stairs(Blocks.CUT_COPPER_STAIRS.weathering().pick(state))
|
| 306 | .chiseled(Blocks.CHISELED_COPPER.weathering().pick(state))
|
| 307 | .dontGenerateModel()
|
| 308 | .generateStonecutterRecipe()
|
| 309 | .getFamily()
|
| 310 | );
|
| 311 | public static final WeatheringCopperCollection<BlockFamily> COPPER_BLOCK = WeatheringCopperCollection.createFamily(
|
| 312 | (prefix, state) -> familyBuilder(Blocks.COPPER_BLOCK.waxed().pick(state))
|
| 313 | .cut(Blocks.CUT_COPPER.waxed().pick(state))
|
| 314 | .recipeGroupPrefix(prefix + "cut_copper")
|
| 315 | .dontGenerateModel()
|
| 316 | .getFamily(),
|
| 317 | (var0, state) -> familyBuilder(Blocks.COPPER_BLOCK.weathering().pick(state)).cut(Blocks.CUT_COPPER.weathering().pick(state)).dontGenerateModel().getFamily()
|
| 318 | );
|
| 319 | public static final BlockFamily COBBLESTONE = familyBuilder(Blocks.COBBLESTONE)
|
| 320 | .wall(Blocks.COBBLESTONE_WALL)
|
| 321 | .stairs(Blocks.COBBLESTONE_STAIRS)
|
| 322 | .slab(Blocks.COBBLESTONE_SLAB)
|
| 323 | .generateStonecutterRecipe()
|
| 324 | .getFamily();
|
| 325 | public static final BlockFamily MOSSY_COBBLESTONE = familyBuilder(Blocks.MOSSY_COBBLESTONE)
|
| 326 | .wall(Blocks.MOSSY_COBBLESTONE_WALL)
|
| 327 | .stairs(Blocks.MOSSY_COBBLESTONE_STAIRS)
|
| 328 | .slab(Blocks.MOSSY_COBBLESTONE_SLAB)
|
| 329 | .generateStonecutterRecipe()
|
| 330 | .getFamily();
|
| 331 | public static final BlockFamily DIORITE = familyBuilder(Blocks.DIORITE)
|
| 332 | .wall(Blocks.DIORITE_WALL)
|
| 333 | .stairs(Blocks.DIORITE_STAIRS)
|
| 334 | .slab(Blocks.DIORITE_SLAB)
|
| 335 | .polished(Blocks.POLISHED_DIORITE)
|
| 336 | .generateStonecutterRecipe()
|
| 337 | .getFamily();
|
| 338 | public static final BlockFamily POLISHED_DIORITE = familyBuilder(Blocks.POLISHED_DIORITE)
|
| 339 | .stairs(Blocks.POLISHED_DIORITE_STAIRS)
|
| 340 | .slab(Blocks.POLISHED_DIORITE_SLAB)
|
| 341 | .generateStonecutterRecipe()
|
| 342 | .getFamily();
|
| 343 | public static final BlockFamily GRANITE = familyBuilder(Blocks.GRANITE)
|
| 344 | .wall(Blocks.GRANITE_WALL)
|
| 345 | .stairs(Blocks.GRANITE_STAIRS)
|
| 346 | .slab(Blocks.GRANITE_SLAB)
|
| 347 | .polished(Blocks.POLISHED_GRANITE)
|
| 348 | .generateStonecutterRecipe()
|
| 349 | .getFamily();
|
| 350 | public static final BlockFamily SULFUR = familyBuilder(Blocks.SULFUR)
|
| 351 | .wall(Blocks.SULFUR_WALL)
|
| 352 | .stairs(Blocks.SULFUR_STAIRS)
|
| 353 | .slab(Blocks.SULFUR_SLAB)
|
| 354 | .chiseled(Blocks.CHISELED_SULFUR)
|
| 355 | .polished(Blocks.POLISHED_SULFUR)
|
| 356 | .generateStonecutterRecipe()
|
| 357 | .getFamily();
|
| 358 | public static final BlockFamily POLISHED_SULFUR = familyBuilder(Blocks.POLISHED_SULFUR)
|
| 359 | .wall(Blocks.POLISHED_SULFUR_WALL)
|
| 360 | .stairs(Blocks.POLISHED_SULFUR_STAIRS)
|
| 361 | .slab(Blocks.POLISHED_SULFUR_SLAB)
|
| 362 | .bricks(Blocks.SULFUR_BRICKS)
|
| 363 | .generateStonecutterRecipe()
|
| 364 | .getFamily();
|
| 365 | public static final BlockFamily SULFUR_BRICKS = familyBuilder(Blocks.SULFUR_BRICKS)
|
| 366 | .wall(Blocks.SULFUR_BRICK_WALL)
|
| 367 | .stairs(Blocks.SULFUR_BRICK_STAIRS)
|
| 368 | .slab(Blocks.SULFUR_BRICK_SLAB)
|
| 369 | .generateStonecutterRecipe()
|
| 370 | .getFamily();
|
| 371 | public static final BlockFamily CINNABAR = familyBuilder(Blocks.CINNABAR)
|
| 372 | .wall(Blocks.CINNABAR_WALL)
|
| 373 | .stairs(Blocks.CINNABAR_STAIRS)
|
| 374 | .slab(Blocks.CINNABAR_SLAB)
|
| 375 | .chiseled(Blocks.CHISELED_CINNABAR)
|
| 376 | .polished(Blocks.POLISHED_CINNABAR)
|
| 377 | .generateStonecutterRecipe()
|
| 378 | .getFamily();
|
| 379 | public static final BlockFamily POLISHED_CINNABAR = familyBuilder(Blocks.POLISHED_CINNABAR)
|
| 380 | .wall(Blocks.POLISHED_CINNABAR_WALL)
|
| 381 | .stairs(Blocks.POLISHED_CINNABAR_STAIRS)
|
| 382 | .slab(Blocks.POLISHED_CINNABAR_SLAB)
|
| 383 | .bricks(Blocks.CINNABAR_BRICKS)
|
| 384 | .generateStonecutterRecipe()
|
| 385 | .getFamily();
|
| 386 | public static final BlockFamily CINNABAR_BRICKS = familyBuilder(Blocks.CINNABAR_BRICKS)
|
| 387 | .wall(Blocks.CINNABAR_BRICK_WALL)
|
| 388 | .stairs(Blocks.CINNABAR_BRICK_STAIRS)
|
| 389 | .slab(Blocks.CINNABAR_BRICK_SLAB)
|
| 390 | .generateStonecutterRecipe()
|
| 391 | .getFamily();
|
| 392 | public static final BlockFamily POLISHED_GRANITE = familyBuilder(Blocks.POLISHED_GRANITE)
|
| 393 | .stairs(Blocks.POLISHED_GRANITE_STAIRS)
|
| 394 | .slab(Blocks.POLISHED_GRANITE_SLAB)
|
| 395 | .generateStonecutterRecipe()
|
| 396 | .getFamily();
|
| 397 | public static final BlockFamily TUFF = familyBuilder(Blocks.TUFF)
|
| 398 | .wall(Blocks.TUFF_WALL)
|
| 399 | .stairs(Blocks.TUFF_STAIRS)
|
| 400 | .slab(Blocks.TUFF_SLAB)
|
| 401 | .chiseled(Blocks.CHISELED_TUFF)
|
| 402 | .polished(Blocks.POLISHED_TUFF)
|
| 403 | .generateStonecutterRecipe()
|
| 404 | .getFamily();
|
| 405 | public static final BlockFamily POLISHED_TUFF = familyBuilder(Blocks.POLISHED_TUFF)
|
| 406 | .wall(Blocks.POLISHED_TUFF_WALL)
|
| 407 | .stairs(Blocks.POLISHED_TUFF_STAIRS)
|
| 408 | .slab(Blocks.POLISHED_TUFF_SLAB)
|
| 409 | .bricks(Blocks.TUFF_BRICKS)
|
| 410 | .generateStonecutterRecipe()
|
| 411 | .getFamily();
|
| 412 | public static final BlockFamily TUFF_BRICKS = familyBuilder(Blocks.TUFF_BRICKS)
|
| 413 | .wall(Blocks.TUFF_BRICK_WALL)
|
| 414 | .stairs(Blocks.TUFF_BRICK_STAIRS)
|
| 415 | .slab(Blocks.TUFF_BRICK_SLAB)
|
| 416 | .chiseled(Blocks.CHISELED_TUFF_BRICKS)
|
| 417 | .generateStonecutterRecipe()
|
| 418 | .getFamily();
|
| 419 | public static final BlockFamily RESIN_BRICKS = familyBuilder(Blocks.RESIN_BRICKS)
|
| 420 | .wall(Blocks.RESIN_BRICK_WALL)
|
| 421 | .stairs(Blocks.RESIN_BRICK_STAIRS)
|
| 422 | .slab(Blocks.RESIN_BRICK_SLAB)
|
| 423 | .chiseled(Blocks.CHISELED_RESIN_BRICKS)
|
| 424 | .generateStonecutterRecipe()
|
| 425 | .getFamily();
|
| 426 | public static final BlockFamily NETHER_BRICKS = familyBuilder(Blocks.NETHER_BRICKS)
|
| 427 | .fence(Blocks.NETHER_BRICK_FENCE)
|
| 428 | .wall(Blocks.NETHER_BRICK_WALL)
|
| 429 | .stairs(Blocks.NETHER_BRICK_STAIRS)
|
| 430 | .slab(Blocks.NETHER_BRICK_SLAB)
|
| 431 | .chiseled(Blocks.CHISELED_NETHER_BRICKS)
|
| 432 | .cracked(Blocks.CRACKED_NETHER_BRICKS)
|
| 433 | .generateStonecutterRecipe()
|
| 434 | .getFamily();
|
| 435 | public static final BlockFamily RED_NETHER_BRICKS = familyBuilder(Blocks.RED_NETHER_BRICKS)
|
| 436 | .slab(Blocks.RED_NETHER_BRICK_SLAB)
|
| 437 | .stairs(Blocks.RED_NETHER_BRICK_STAIRS)
|
| 438 | .wall(Blocks.RED_NETHER_BRICK_WALL)
|
| 439 | .generateStonecutterRecipe()
|
| 440 | .getFamily();
|
| 441 | public static final BlockFamily PRISMARINE = familyBuilder(Blocks.PRISMARINE)
|
| 442 | .wall(Blocks.PRISMARINE_WALL)
|
| 443 | .stairs(Blocks.PRISMARINE_STAIRS)
|
| 444 | .slab(Blocks.PRISMARINE_SLAB)
|
| 445 | .generateStonecutterRecipe()
|
| 446 | .getFamily();
|
| 447 | public static final BlockFamily PRISMARINE_BRICKS = familyBuilder(Blocks.PRISMARINE_BRICKS)
|
| 448 | .stairs(Blocks.PRISMARINE_BRICK_STAIRS)
|
| 449 | .slab(Blocks.PRISMARINE_BRICK_SLAB)
|
| 450 | .generateStonecutterRecipe()
|
| 451 | .getFamily();
|
| 452 | public static final BlockFamily DARK_PRISMARINE = familyBuilder(Blocks.DARK_PRISMARINE)
|
| 453 | .stairs(Blocks.DARK_PRISMARINE_STAIRS)
|
| 454 | .slab(Blocks.DARK_PRISMARINE_SLAB)
|
| 455 | .generateStonecutterRecipe()
|
| 456 | .getFamily();
|
| 457 | public static final BlockFamily PURPUR = familyBuilder(Blocks.PURPUR_BLOCK)
|
| 458 | .stairs(Blocks.PURPUR_STAIRS)
|
| 459 | .slab(Blocks.PURPUR_SLAB)
|
| 460 | .pillar(Blocks.PURPUR_PILLAR)
|
| 461 | .dontGenerateCraftingRecipe()
|
| 462 | .generateStonecutterRecipe()
|
| 463 | .getFamily();
|
| 464 | public static final BlockFamily QUARTZ = familyBuilder(Blocks.QUARTZ_BLOCK)
|
| 465 | .stairs(Blocks.QUARTZ_STAIRS)
|
| 466 | .slab(Blocks.QUARTZ_SLAB)
|
| 467 | .chiseled(Blocks.CHISELED_QUARTZ_BLOCK)
|
| 468 | .bricks(Blocks.QUARTZ_BRICKS)
|
| 469 | .pillar(Blocks.QUARTZ_PILLAR)
|
| 470 | .dontGenerateCraftingRecipe()
|
| 471 | .generateStonecutterRecipe()
|
| 472 | .getFamily();
|
| 473 | public static final BlockFamily SMOOTH_QUARTZ = familyBuilder(Blocks.SMOOTH_QUARTZ)
|
| 474 | .stairs(Blocks.SMOOTH_QUARTZ_STAIRS)
|
| 475 | .slab(Blocks.SMOOTH_QUARTZ_SLAB)
|
| 476 | .generateStonecutterRecipe()
|
| 477 | .getFamily();
|
| 478 | public static final BlockFamily SANDSTONE = familyBuilder(Blocks.SANDSTONE)
|
| 479 | .wall(Blocks.SANDSTONE_WALL)
|
| 480 | .stairs(Blocks.SANDSTONE_STAIRS)
|
| 481 | .slab(Blocks.SANDSTONE_SLAB)
|
| 482 | .chiseled(Blocks.CHISELED_SANDSTONE)
|
| 483 | .cut(Blocks.CUT_SANDSTONE)
|
| 484 | .dontGenerateCraftingRecipe()
|
| 485 | .generateStonecutterRecipe()
|
| 486 | .getFamily();
|
| 487 | public static final BlockFamily CUT_SANDSTONE = familyBuilder(Blocks.CUT_SANDSTONE).slab(Blocks.CUT_SANDSTONE_SLAB).generateStonecutterRecipe().getFamily();
|
| 488 | public static final BlockFamily SMOOTH_SANDSTONE = familyBuilder(Blocks.SMOOTH_SANDSTONE)
|
| 489 | .slab(Blocks.SMOOTH_SANDSTONE_SLAB)
|
| 490 | .stairs(Blocks.SMOOTH_SANDSTONE_STAIRS)
|
| 491 | .generateStonecutterRecipe()
|
| 492 | .getFamily();
|
| 493 | public static final BlockFamily RED_SANDSTONE = familyBuilder(Blocks.RED_SANDSTONE)
|
| 494 | .wall(Blocks.RED_SANDSTONE_WALL)
|
| 495 | .stairs(Blocks.RED_SANDSTONE_STAIRS)
|
| 496 | .slab(Blocks.RED_SANDSTONE_SLAB)
|
| 497 | .chiseled(Blocks.CHISELED_RED_SANDSTONE)
|
| 498 | .cut(Blocks.CUT_RED_SANDSTONE)
|
| 499 | .dontGenerateCraftingRecipe()
|
| 500 | .generateStonecutterRecipe()
|
| 501 | .getFamily();
|
| 502 | public static final BlockFamily CUT_RED_SANDSTONE = familyBuilder(Blocks.CUT_RED_SANDSTONE)
|
| 503 | .slab(Blocks.CUT_RED_SANDSTONE_SLAB)
|
| 504 | .generateStonecutterRecipe()
|
| 505 | .getFamily();
|
| 506 | public static final BlockFamily SMOOTH_RED_SANDSTONE = familyBuilder(Blocks.SMOOTH_RED_SANDSTONE)
|
| 507 | .slab(Blocks.SMOOTH_RED_SANDSTONE_SLAB)
|
| 508 | .stairs(Blocks.SMOOTH_RED_SANDSTONE_STAIRS)
|
| 509 | .generateStonecutterRecipe()
|
| 510 | .getFamily();
|
| 511 | public static final BlockFamily STONE = familyBuilder(Blocks.STONE)
|
| 512 | .slab(Blocks.STONE_SLAB)
|
| 513 | .pressurePlate(Blocks.STONE_PRESSURE_PLATE)
|
| 514 | .button(Blocks.STONE_BUTTON)
|
| 515 | .stairs(Blocks.STONE_STAIRS)
|
| 516 | .bricks(Blocks.STONE_BRICKS)
|
| 517 | .cobbled(Blocks.COBBLESTONE)
|
| 518 | .generateStonecutterRecipe()
|
| 519 | .getFamily();
|
| 520 | public static final BlockFamily STONE_BRICK = familyBuilder(Blocks.STONE_BRICKS)
|
| 521 | .wall(Blocks.STONE_BRICK_WALL)
|
| 522 | .stairs(Blocks.STONE_BRICK_STAIRS)
|
| 523 | .slab(Blocks.STONE_BRICK_SLAB)
|
| 524 | .chiseled(Blocks.CHISELED_STONE_BRICKS)
|
| 525 | .cracked(Blocks.CRACKED_STONE_BRICKS)
|
| 526 | .dontGenerateCraftingRecipe()
|
| 527 | .generateStonecutterRecipe()
|
| 528 | .getFamily();
|
| 529 | public static final BlockFamily DEEPSLATE = familyBuilder(Blocks.DEEPSLATE).cobbled(Blocks.COBBLED_DEEPSLATE).generateStonecutterRecipe().getFamily();
|
| 530 | public static final BlockFamily COBBLED_DEEPSLATE = familyBuilder(Blocks.COBBLED_DEEPSLATE)
|
| 531 | .slab(Blocks.COBBLED_DEEPSLATE_SLAB)
|
| 532 | .stairs(Blocks.COBBLED_DEEPSLATE_STAIRS)
|
| 533 | .wall(Blocks.COBBLED_DEEPSLATE_WALL)
|
| 534 | .chiseled(Blocks.CHISELED_DEEPSLATE)
|
| 535 | .polished(Blocks.POLISHED_DEEPSLATE)
|
| 536 | .generateStonecutterRecipe()
|
| 537 | .getFamily();
|
| 538 | public static final BlockFamily POLISHED_DEEPSLATE = familyBuilder(Blocks.POLISHED_DEEPSLATE)
|
| 539 | .slab(Blocks.POLISHED_DEEPSLATE_SLAB)
|
| 540 | .stairs(Blocks.POLISHED_DEEPSLATE_STAIRS)
|
| 541 | .wall(Blocks.POLISHED_DEEPSLATE_WALL)
|
| 542 | .bricks(Blocks.DEEPSLATE_BRICKS)
|
| 543 | .generateStonecutterRecipe()
|
| 544 | .getFamily();
|
| 545 | public static final BlockFamily DEEPSLATE_BRICKS = familyBuilder(Blocks.DEEPSLATE_BRICKS)
|
| 546 | .slab(Blocks.DEEPSLATE_BRICK_SLAB)
|
| 547 | .stairs(Blocks.DEEPSLATE_BRICK_STAIRS)
|
| 548 | .wall(Blocks.DEEPSLATE_BRICK_WALL)
|
| 549 | .cracked(Blocks.CRACKED_DEEPSLATE_BRICKS)
|
| 550 | .tiles(Blocks.DEEPSLATE_TILES)
|
| 551 | .generateStonecutterRecipe()
|
| 552 | .getFamily();
|
| 553 | public static final BlockFamily DEEPSLATE_TILES = familyBuilder(Blocks.DEEPSLATE_TILES)
|
| 554 | .slab(Blocks.DEEPSLATE_TILE_SLAB)
|
| 555 | .stairs(Blocks.DEEPSLATE_TILE_STAIRS)
|
| 556 | .wall(Blocks.DEEPSLATE_TILE_WALL)
|
| 557 | .cracked(Blocks.CRACKED_DEEPSLATE_TILES)
|
| 558 | .generateStonecutterRecipe()
|
| 559 | .getFamily();
|
| 560 | public static final ColorCollection<BlockFamily> WOOL = ColorCollection.VALUES
|
| 561 | .map(
|
| 562 | color -> familyBuilder(Blocks.WOOL.pick(color))
|
| 563 | .carpet(Blocks.CARPET.pick(color))
|
| 564 | .stairs(Blocks.WOOL_STAIRS.pick(color))
|
| 565 | .slab(Blocks.WOOL_SLAB.pick(color))
|
| 566 | .recipeGroupPrefix("woolen")
|
| 567 | .getFamily()
|
| 568 | );
|
| 569 | public static final ColorCollection<BlockFamily> CONCRETE = ColorCollection.VALUES
|
| 570 | .map(
|
| 571 | color -> familyBuilder(Blocks.CONCRETE.pick(color))
|
| 572 | .stairs(Blocks.CONCRETE_STAIRS.pick(color))
|
| 573 | .slab(Blocks.CONCRETE_SLAB.pick(color))
|
| 574 | .recipeGroupPrefix("concrete")
|
| 575 | .generateStonecutterRecipe()
|
| 576 | .getFamily()
|
| 577 | );
|
| 578 |
|
| 579 | /**
|
| 580 | * Access widened by fabric-data-generation-api-v1 to accessible
|
| 581 | */
|
| 582 | public static BlockFamily.Builder familyBuilder(final Block base) {
|
| 583 | BlockFamily.Builder builder = new BlockFamily.Builder(base);
|
| 584 | BlockFamily blockFamily = MAP.put(base, builder.getFamily());
|
| 585 | if (blockFamily != null) {
|
| 586 | throw new IllegalStateException("Duplicate family definition for " + BuiltInRegistries.BLOCK.getKey(base));
|
| 587 | } else {
|
| 588 | return builder;
|
| 589 | }
|
| 590 | }
|
| 591 |
|
| 592 | public static Stream<BlockFamily> getAllFamilies() {
|
| 593 | return MAP.values().stream();
|
| 594 | }
|
| 595 |
|
| 596 | public static @Nullable BlockFamily getFamily(final Block base) {
|
| 597 | return MAP.get(base);
|
| 598 | }
|
| 599 | }
|
| 600 |
|