package com.simibubi.create; import java.util.EnumMap; import java.util.HashMap; import java.util.Map; import com.jozufozu.flywheel.core.PartialModel; import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour; import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.core.Direction; import net.minecraft.world.item.DyeColor; public class AllBlockPartials { public static final PartialModel SCHEMATICANNON_CONNECTOR = block("schematicannon/connector"), SCHEMATICANNON_PIPE = block("schematicannon/pipe"), SHAFTLESS_COGWHEEL = block("cogwheel_shaftless"), SHAFTLESS_LARGE_COGWHEEL = block("large_cogwheel_shaftless"), COGWHEEL_SHAFT = block("cogwheel_shaft"), SHAFT_HALF = block("shaft_half"), BELT_PULLEY = block("belt_pulley"), BELT_START = block("belt/start"), BELT_MIDDLE = block("belt/middle"), BELT_END = block("belt/end"), BELT_START_BOTTOM = block("belt/start_bottom"), BELT_MIDDLE_BOTTOM = block("belt/middle_bottom"), BELT_END_BOTTOM = block("belt/end_bottom"), BELT_DIAGONAL_START = block("belt/diagonal_start"), BELT_DIAGONAL_MIDDLE = block("belt/diagonal_middle"), BELT_DIAGONAL_END = block("belt/diagonal_end"), ENCASED_FAN_INNER = block("encased_fan/propeller"), HAND_CRANK_HANDLE = block("hand_crank/handle"), MECHANICAL_PRESS_HEAD = block("mechanical_press/head"), MECHANICAL_MIXER_POLE = block("mechanical_mixer/pole"), MECHANICAL_MIXER_HEAD = block("mechanical_mixer/head"), MECHANICAL_CRAFTER_LID = block("mechanical_crafter/lid"), MECHANICAL_CRAFTER_ARROW = block("mechanical_crafter/arrow"), MECHANICAL_CRAFTER_BELT_FRAME = block("mechanical_crafter/belt"), MECHANICAL_CRAFTER_BELT = block("mechanical_crafter/belt_animated"), SAW_BLADE_HORIZONTAL_ACTIVE = block("mechanical_saw/blade_horizontal_active"), SAW_BLADE_HORIZONTAL_INACTIVE = block("mechanical_saw/blade_horizontal_inactive"), SAW_BLADE_HORIZONTAL_REVERSED = block("mechanical_saw/blade_horizontal_reversed"), SAW_BLADE_VERTICAL_ACTIVE = block("mechanical_saw/blade_vertical_active"), SAW_BLADE_VERTICAL_INACTIVE = block("mechanical_saw/blade_vertical_inactive"), SAW_BLADE_VERTICAL_REVERSED = block("mechanical_saw/blade_vertical_reversed"), GAUGE_DIAL = block("gauge/dial"), GAUGE_INDICATOR = block("gauge/indicator"), GAUGE_HEAD_SPEED = block("gauge/speedometer/head"), GAUGE_HEAD_STRESS = block("gauge/stressometer/head"), BEARING_TOP = block("bearing/top"), BEARING_TOP_WOODEN = block("bearing/top_wooden"), DRILL_HEAD = block("mechanical_drill/head"), HARVESTER_BLADE = block("mechanical_harvester/blade"), DEPLOYER_POLE = block("deployer/pole"), DEPLOYER_HAND_POINTING = block("deployer/hand_pointing"), DEPLOYER_HAND_PUNCHING = block("deployer/hand_punching"), DEPLOYER_HAND_HOLDING = block("deployer/hand_holding"), ANALOG_LEVER_HANDLE = block("analog_lever/handle"), ANALOG_LEVER_INDICATOR = block("analog_lever/indicator"), FUNNEL_FLAP = block("funnel/flap"), BELT_FUNNEL_FLAP = block("belt_funnel/flap"), BELT_TUNNEL_FLAP = block("belt_tunnel/flap"), FLEXPEATER_INDICATOR = block("diodes/indicator"), FLYWHEEL = block("flywheel/wheel"), FLYWHEEL_UPPER_ROTATING = block("flywheel/upper_rotating_connector"), FLYWHEEL_LOWER_ROTATING = block("flywheel/lower_rotating_connector"), FLYWHEEL_UPPER_SLIDING = block("flywheel/upper_sliding_connector"), FLYWHEEL_LOWER_SLIDING = block("flywheel/lower_sliding_connector"), FURNACE_GENERATOR_FRAME = block("furnace_engine/frame"), CUCKOO_MINUTE_HAND = block("cuckoo_clock/minute_hand"), CUCKOO_HOUR_HAND = block("cuckoo_clock/hour_hand"), CUCKOO_LEFT_DOOR = block("cuckoo_clock/left_door"), CUCKOO_RIGHT_DOOR = block("cuckoo_clock/right_door"), CUCKOO_PIG = block("cuckoo_clock/pig"), CUCKOO_CREEPER = block("cuckoo_clock/creeper"), GANTRY_COGS = block("gantry_carriage/wheels"), ROPE_COIL = block("rope_pulley/rope_coil"), ROPE_HALF = block("rope_pulley/rope_half"), ROPE_HALF_MAGNET = block("rope_pulley/rope_half_magnet"), HOSE_COIL = block("hose_pulley/rope_coil"), HOSE = block("hose_pulley/rope"), HOSE_MAGNET = block("hose_pulley/pulley_magnet"), HOSE_HALF = block("hose_pulley/rope_half"), HOSE_HALF_MAGNET = block("hose_pulley/rope_half_magnet"), MILLSTONE_COG = block("millstone/inner"), SYMMETRY_PLANE = block("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = block("symmetry_effect/crossplane"), SYMMETRY_TRIPLEPLANE = block("symmetry_effect/tripleplane"), STICKER_HEAD = block("sticker/head"), PORTABLE_STORAGE_INTERFACE_MIDDLE = block("portable_storage_interface/block_middle"), PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED = block("portable_storage_interface/block_middle_powered"), PORTABLE_STORAGE_INTERFACE_TOP = block("portable_storage_interface/block_top"), PORTABLE_FLUID_INTERFACE_MIDDLE = block("portable_fluid_interface/block_middle"), PORTABLE_FLUID_INTERFACE_MIDDLE_POWERED = block("portable_fluid_interface/block_middle_powered"), PORTABLE_FLUID_INTERFACE_TOP = block("portable_fluid_interface/block_top"), ARM_COG = block("mechanical_arm/cog"), ARM_BASE = block("mechanical_arm/base"), ARM_LOWER_BODY = block("mechanical_arm/lower_body"), ARM_UPPER_BODY = block("mechanical_arm/upper_body"), ARM_HEAD = block("mechanical_arm/head"), ARM_CLAW_BASE = block("mechanical_arm/claw_base"), ARM_CLAW_GRIP = block("mechanical_arm/claw_grip"), FLAG_SHORT_IN = block("mechanical_arm/flag/short_in"), FLAG_SHORT_OUT = block("mechanical_arm/flag/short_out"), FLAG_LONG_IN = block("mechanical_arm/flag/long_in"), FLAG_LONG_OUT = block("mechanical_arm/flag/long_out"), MECHANICAL_PUMP_ARROW = block("mechanical_pump/arrow"), MECHANICAL_PUMP_COG = block("mechanical_pump/cog"), FLUID_PIPE_CASING = block("fluid_pipe/casing"), FLUID_VALVE_POINTER = block("fluid_valve/pointer"), SPOUT_TOP = block("spout/top"), SPOUT_MIDDLE = block("spout/middle"), SPOUT_BOTTOM = block("spout/bottom"), PECULIAR_BELL = block("peculiar_bell"), HAUNTED_BELL = block("haunted_bell"), TOOLBOX_DRAWER = block("toolbox/drawer"), SPEED_CONTROLLER_BRACKET = block("rotation_speed_controller/bracket"), GOGGLES = block("goggles"), EJECTOR_TOP = block("weighted_ejector/top"), COPPER_BACKTANK_SHAFT = block("copper_backtank/block_shaft_input"), COPPER_BACKTANK_COGS = block("copper_backtank/block_cogs"), CRAFTING_BLUEPRINT_1x1 = entity("crafting_blueprint_small"), CRAFTING_BLUEPRINT_2x2 = entity("crafting_blueprint_medium"), CRAFTING_BLUEPRINT_3x3 = entity("crafting_blueprint_large"), COUPLING_ATTACHMENT = entity("minecart_coupling/attachment"), COUPLING_RING = entity("minecart_coupling/ring"), COUPLING_CONNECTOR = entity("minecart_coupling/connector") ; public static final Map> PIPE_ATTACHMENTS = new EnumMap<>(FluidTransportBehaviour.AttachmentTypes.class); public static final Map BLAZES = new EnumMap<>(BlazeBurnerBlock.HeatLevel.class); public static final Map TOOLBOX_LIDS = new EnumMap<>(DyeColor.class); static { for (FluidTransportBehaviour.AttachmentTypes type : FluidTransportBehaviour.AttachmentTypes.values()) { if (!type.hasModel()) continue; Map map = new HashMap<>(); for (Direction d : Iterate.directions) { String asId = Lang.asId(type.name()); map.put(d, block("fluid_pipe/" + asId + "/" + Lang.asId(d.getSerializedName()))); } PIPE_ATTACHMENTS.put(type, map); } for (BlazeBurnerBlock.HeatLevel heat : BlazeBurnerBlock.HeatLevel.values()) { if (heat == BlazeBurnerBlock.HeatLevel.NONE) continue; BLAZES.put(heat, block("blaze_burner/blaze/" + heat.getSerializedName())); } for (DyeColor color : DyeColor.values()) TOOLBOX_LIDS.put(color, block("toolbox/lid/" + Lang.asId(color.name()))); } private static PartialModel block(String path) { return new PartialModel(Create.asResource("block/" + path)); } private static PartialModel entity(String path) { return new PartialModel(Create.asResource("entity/" + path)); } public static void init() { // init static fields } }