filename:
fabricdatagen/src/main/java/rearth/oritech/fabricgen/datagen/ModelGenerator.java
branch:
1.21
back to repo
package rearth.oritech.fabricgen.datagen;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.block.CropBlock;
import net.minecraft.block.enums.BlockFace;
import net.minecraft.data.client.*;
import net.minecraft.state.property.Properties;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.Direction;
import rearth.oritech.Oritech;
import rearth.oritech.init.BlockContent;
import rearth.oritech.init.ItemContent;
import rearth.oritech.init.ToolsContent;
public class ModelGenerator extends FabricModelProvider {
public ModelGenerator(FabricDataOutput output) {
super(output);
}
@Override
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
blockStateModelGenerator.registerSimpleState(BlockContent.MACHINE_FRAME_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.FLUID_PIPE);
blockStateModelGenerator.registerSimpleState(BlockContent.ENERGY_PIPE);
blockStateModelGenerator.registerSimpleState(BlockContent.SUPERCONDUCTOR);
blockStateModelGenerator.registerSimpleState(BlockContent.ITEM_PIPE);
blockStateModelGenerator.registerSimpleState(BlockContent.TRANSPARENT_ITEM_PIPE);
blockStateModelGenerator.registerSimpleState(BlockContent.FLUID_PIPE_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.ENERGY_PIPE_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.SUPERCONDUCTOR_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.ITEM_PIPE_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.TRANSPARENT_ITEM_PIPE_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_FLUID_PIPE);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_ENERGY_PIPE);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_SUPERCONDUCTOR);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_ITEM_PIPE);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_FLUID_PIPE_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_ENERGY_PIPE_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_SUPERCONDUCTOR_CONNECTION);
blockStateModelGenerator.registerSimpleState(BlockContent.FRAMED_ITEM_PIPE_CONNECTION);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.FLUID_PIPE_DUCT_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.ENERGY_PIPE_DUCT_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.SUPERCONDUCTOR_DUCT_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.ITEM_PIPE_DUCT_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.ITEM_FILTER_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.SIMPLE_AUGMENT_STATION);
blockStateModelGenerator.registerSimpleState(BlockContent.ADVANCED_AUGMENT_STATION);
blockStateModelGenerator.registerSimpleState(BlockContent.ARCANE_AUGMENT_STATION);
blockStateModelGenerator.registerSimpleState(BlockContent.SMALL_STORAGE_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.LARGE_STORAGE_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.CREATIVE_STORAGE_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.SMALL_TANK_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.CREATIVE_TANK_BLOCK);
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(BlockContent.PLACER_BLOCK);
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(BlockContent.DESTROYER_BLOCK);
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(BlockContent.FERTILIZER_BLOCK);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.PUMP_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerSimpleState(BlockContent.CHARGER_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.ADDON_INDICATOR_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.BLOCK_DESTROYER_HEAD);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.BLOCK_PLACER_HEAD);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.BLOCK_FERTILIZER_HEAD);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.PUMP_TRUNK_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.QUARRY_BEAM_INNER);
blockStateModelGenerator.registerSimpleState(BlockContent.QUARRY_BEAM_TARGET);
blockStateModelGenerator.registerSimpleState(BlockContent.QUARRY_BEAM_RING);
// reactor section
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(BlockContent.REACTOR_CONTROLLER);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_ENERGY_PORT);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_REDSTONE_PORT);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_FUEL_PORT);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_ABSORBER_PORT);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_ROD);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_DOUBLE_ROD);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_QUAD_ROD);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.REACTOR_WALL, Blocks.BRICKS); // this is overridden by athena
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_VENT);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_REFLECTOR);
blockStateModelGenerator.registerSimpleState(BlockContent.REACTOR_HEAT_PIPE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.REACTOR_CONDENSER);
blockStateModelGenerator.registerAmethyst(BlockContent.URANIUM_CRYSTAL);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.LOW_YIELD_NUKE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.NUKE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.REACTOR_COLD_INDICATOR_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.REACTOR_MEDIUM_INDICATOR_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.REACTOR_HOT_INDICATOR_BLOCK);
// these blocks all use geckolib to render/display, so the only thing this really adds are block particles (e.g. when breaking)
// the machine speed addon has a generic particle references that fits all machines well enough
blockStateModelGenerator.registerStateWithModelReference(BlockContent.PULVERIZER_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.FRAGMENT_FORGE_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.ASSEMBLER_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.FOUNDRY_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.COOLER_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.CENTRIFUGE_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.ATOMIC_FORGE_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.POWERED_FURNACE_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.AUGMENT_APPLICATION_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.LASER_ARM_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.BIO_GENERATOR_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.FUEL_GENERATOR_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.BASIC_GENERATOR_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.LAVA_GENERATOR_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.BIG_SOLAR_PANEL_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.DEEP_DRILL_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.DRONE_PORT_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.TECH_DOOR, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.TECH_DOOR_HINGE, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.TREEFELLER_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.STEAM_ENGINE_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.PIPE_BOOSTER_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.PARTICLE_COLLECTOR_BLOCK, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.REACTOR_EXPLOSION_SMALL, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.REACTOR_EXPLOSION_MEDIUM, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.REACTOR_EXPLOSION_LARGE, BlockContent.MACHINE_SPEED_ADDON);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_1);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_2);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_3);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_4);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_5);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_6);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_CORE_7);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.MACHINE_CORE_HIDDEN, Blocks.AIR); // never visible
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_EXTENDER);
//arcane
blockStateModelGenerator.registerSimpleState(BlockContent.SPAWNER_CAGE_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.SPAWNER_CONTROLLER_BLOCK);
blockStateModelGenerator.registerCrop(BlockContent.WITHER_CROP_BLOCK, CropBlock.AGE, 0, 0, 1, 2, 3, 3, 4, 5);
blockStateModelGenerator.registerStateWithModelReference(BlockContent.ENCHANTER_BLOCK, BlockContent.MACHINE_SPEED_ADDON); // uses geckolib
blockStateModelGenerator.registerStateWithModelReference(BlockContent.UNSTABLE_CONTAINER, BlockContent.MACHINE_SPEED_ADDON); // uses geckolib
blockStateModelGenerator.registerStateWithModelReference(BlockContent.ENCHANTMENT_CATALYST_BLOCK, BlockContent.MACHINE_SPEED_ADDON); // uses geckolib
// particle accelerator
blockStateModelGenerator.registerSimpleState(BlockContent.ACCELERATOR_RING);
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(BlockContent.ACCELERATOR_MOTOR);
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(BlockContent.ACCELERATOR_CONTROLLER);
blockStateModelGenerator.registerNorthDefaultHorizontalRotation(BlockContent.ACCELERATOR_SENSOR);
blockStateModelGenerator.registerSimpleState(BlockContent.BLACK_HOLE_BLOCK);
blockStateModelGenerator.registerSimpleState(BlockContent.BLACK_HOLE_INNER);
blockStateModelGenerator.registerSimpleState(BlockContent.BLACK_HOLE_MIDDLE);
blockStateModelGenerator.registerSimpleState(BlockContent.BLACK_HOLE_OUTER);
// metals
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.NICKEL_ORE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.DEEPSLATE_NICKEL_ORE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.ENDSTONE_PLATINUM_ORE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.DEEPSLATE_PLATINUM_ORE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.DEEPSLATE_URANIUM_ORE);
// NODES
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_REDSTONE);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_LAPIS);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_IRON);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_COAL);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_GOLD);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_EMERALD);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_DIAMOND);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_COPPER);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_NICKEL);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_PLATINUM);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RESOURCE_NODE_URANIUM);
//decorative
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.INDUSTRIAL_GLASS_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.CAPACITOR_ADDON_EXTENDER);
blockStateModelGenerator.registerSimpleState(BlockContent.METAL_BEAM_BLOCK);
blockStateModelGenerator.blockStateCollector.accept(createWallMountedState(BlockContent.CEILING_LIGHT));
blockStateModelGenerator.blockStateCollector.accept(createWallMountedState(BlockContent.CEILING_LIGHT_HANGING));
blockStateModelGenerator.blockStateCollector.accept(createButtonBlockState(BlockContent.TECH_BUTTON, Identifier.of(Oritech.MOD_ID, "block/tech_button"), Identifier.of(Oritech.MOD_ID, "block/tech_button_on")));
registerLever(BlockContent.TECH_LEVER, blockStateModelGenerator);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.STEEL_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.ENERGITE_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.NICKEL_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.BIOSTEEL_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.PLATINUM_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.ADAMANT_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.ELECTRUM_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.DURATIUM_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.BIOMASS_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.PLASTIC_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.FLUXITE_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.SILICON_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RAW_NICKEL_BLOCK);
blockStateModelGenerator.registerSimpleCubeAll(BlockContent.RAW_PLATINUM_BLOCK);
var machinePlatingPool = blockStateModelGenerator.registerCubeAllModelTexturePool(BlockContent.MACHINE_PLATING_BLOCK);
machinePlatingPool.stairs(BlockContent.MACHINE_PLATING_STAIRS);
machinePlatingPool.slab(BlockContent.MACHINE_PLATING_SLAB);
machinePlatingPool.pressurePlate(BlockContent.MACHINE_PLATING_PRESSURE_PLATE);
var ironPlatingPool = blockStateModelGenerator.registerCubeAllModelTexturePool(BlockContent.IRON_PLATING_BLOCK);
ironPlatingPool.stairs(BlockContent.IRON_PLATING_STAIRS);
ironPlatingPool.slab(BlockContent.IRON_PLATING_SLAB);
ironPlatingPool.pressurePlate(BlockContent.IRON_PLATING_PRESSURE_PLATE);
var nickelPlatingPool = blockStateModelGenerator.registerCubeAllModelTexturePool(BlockContent.NICKEL_PLATING_BLOCK);
nickelPlatingPool.stairs(BlockContent.NICKEL_PLATING_STAIRS);
nickelPlatingPool.slab(BlockContent.NICKEL_PLATING_SLAB);
nickelPlatingPool.pressurePlate(BlockContent.NICKEL_PLATING_PRESSURE_PLATE);
}
@Override
public void generateItemModels(ItemModelGenerator itemModelGenerator) {
itemModelGenerator.register(ToolsContent.EXO_HELMET, Models.GENERATED);
itemModelGenerator.register(ToolsContent.EXO_CHESTPLATE, Models.GENERATED);
itemModelGenerator.register(ToolsContent.EXO_LEGGINGS, Models.GENERATED);
itemModelGenerator.register(ToolsContent.EXO_BOOTS, Models.GENERATED);
itemModelGenerator.register(ToolsContent.CHAINSAW, Models.HANDHELD);
itemModelGenerator.register(ToolsContent.HAND_DRILL, Models.HANDHELD);
itemModelGenerator.register(ToolsContent.JETPACK, Models.GENERATED);
itemModelGenerator.register(ToolsContent.EXO_JETPACK, Models.GENERATED);
itemModelGenerator.register(ToolsContent.JETPACK_ELYTRA, Models.GENERATED);
itemModelGenerator.register(ToolsContent.JETPACK_EXO_ELYTRA, Models.GENERATED);
for (var item : ItemContent.autoRegisteredModels) {
itemModelGenerator.register(item, Models.GENERATED);
}
}
public static BlockStateSupplier createWallMountedState(Block block) {
return VariantsBlockStateSupplier
.create(block, BlockStateVariant.create().put(VariantSettings.MODEL, ModelIds.getBlockModelId(block)))
.coordinate(BlockStateVariantMap.create(Properties.BLOCK_FACE, Properties.HORIZONTAL_FACING)
.register(BlockFace.FLOOR, Direction.EAST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90))
.register(BlockFace.FLOOR, Direction.WEST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270))
.register(BlockFace.FLOOR, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180))
.register(BlockFace.FLOOR, Direction.NORTH, BlockStateVariant.create())
.register(BlockFace.WALL, Direction.EAST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90).put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.WEST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270).put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180).put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.NORTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.CEILING, Direction.EAST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270).put(VariantSettings.X, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.WEST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90).put(VariantSettings.X, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.NORTH, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180).put(VariantSettings.X, VariantSettings.Rotation.R180)));
}
// same as original method in BlockStateModelGenerator but without uvlock
public static BlockStateSupplier createButtonBlockState(Block buttonBlock, Identifier regularModelId, Identifier pressedModelId) {
return VariantsBlockStateSupplier.create(buttonBlock)
.coordinate(BlockStateVariantMap.create(Properties.POWERED)
.register(false,
BlockStateVariant.create().put(VariantSettings.MODEL, regularModelId)).register(true,
BlockStateVariant.create().put(VariantSettings.MODEL, pressedModelId)))
.coordinate(BlockStateVariantMap.create(Properties.BLOCK_FACE, Properties.HORIZONTAL_FACING)
.register(BlockFace.FLOOR, Direction.EAST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90))
.register(BlockFace.FLOOR, Direction.WEST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270))
.register(BlockFace.FLOOR, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180))
.register(BlockFace.FLOOR, Direction.NORTH, BlockStateVariant.create())
.register(BlockFace.WALL, Direction.EAST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90).put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.WEST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270).put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180).put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.NORTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.CEILING, Direction.EAST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270).put(VariantSettings.X, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.WEST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90).put(VariantSettings.X, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.NORTH, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180).put(VariantSettings.X, VariantSettings.Rotation.R180)));
}
// basically the original registerLever, but with parameters
public static void registerLever(Block block, BlockStateModelGenerator generator) {
Identifier identifier2 = ModelIds.getBlockModelId(block);
Identifier identifier = ModelIds.getBlockSubModelId(block, "_on");
generator.registerItemModel(block);
generator.blockStateCollector.accept(
VariantsBlockStateSupplier.create(block)
.coordinate(BlockStateModelGenerator.createBooleanModelMap(Properties.POWERED, identifier, identifier2))
.coordinate(BlockStateVariantMap.create(Properties.BLOCK_FACE, Properties.HORIZONTAL_FACING)
.register(BlockFace.CEILING, Direction.NORTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R180).put(VariantSettings.Y, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.EAST, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R180).put(VariantSettings.Y, VariantSettings.Rotation.R270))
.register(BlockFace.CEILING, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R180))
.register(BlockFace.CEILING, Direction.WEST, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R180).put(VariantSettings.Y, VariantSettings.Rotation.R90))
.register(BlockFace.FLOOR, Direction.NORTH, BlockStateVariant.create())
.register(BlockFace.FLOOR, Direction.EAST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90))
.register(BlockFace.FLOOR, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180))
.register(BlockFace.FLOOR, Direction.WEST, BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270))
.register(BlockFace.WALL, Direction.NORTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.EAST, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R90).put(VariantSettings.Y, VariantSettings.Rotation.R90))
.register(BlockFace.WALL, Direction.SOUTH, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R90).put(VariantSettings.Y, VariantSettings.Rotation.R180))
.register(BlockFace.WALL, Direction.WEST, BlockStateVariant.create().put(VariantSettings.X, VariantSettings.Rotation.R90).put(VariantSettings.Y, VariantSettings.Rotation.R270))));
}
}