From 7e4e6d39d7efd3b33605ef5332dedfe503d2ae67 Mon Sep 17 00:00:00 2001 From: CoderJoe Date: Sun, 15 Mar 2026 06:24:52 -0500 Subject: [PATCH 1/2] Migrate from Nexo to CraftEngine for resource pack management Replace Nexo dependency and integration with CraftEngine across the entire plugin: block definitions, texture paths, recipes, resource pack handling, and all tests. Remove old Nexo YAML configs, models, and textures. Update dev server script, texture generation scripts, and the new-block scaffolding skill to use CraftEngine conventions. --- .claude/commands/new-block.md | 117 +- pom.xml | 23 +- run-server.sh | 86 +- scripts/generate_fluid_textures.py | 4 +- scripts/generate_power_cable_textures.py | 4 +- scripts/generate_textures.py | 4 +- src/main/kotlin/com/coderjoe/atlas/Atlas.kt | 15 +- ...tegration.kt => CraftEngineIntegration.kt} | 143 +- .../com/coderjoe/atlas/PlayerJoinListener.kt | 24 +- .../com/coderjoe/atlas/ResourcePackManager.kt | 76 - .../com/coderjoe/atlas/core/AtlasBlock.kt | 23 +- .../coderjoe/atlas/core/AtlasBlockListener.kt | 120 +- .../coderjoe/atlas/core/BlockDescriptor.kt | 3 +- .../com/coderjoe/atlas/core/BlockFactory.kt | 3 +- .../com/coderjoe/atlas/core/BlockSystem.kt | 2 +- .../coderjoe/atlas/core/CraftEngineHelper.kt | 121 + .../atlas/fluid/block/FluidContainer.kt | 116 +- .../coderjoe/atlas/fluid/block/FluidMerger.kt | 85 +- .../coderjoe/atlas/fluid/block/FluidPipe.kt | 80 +- .../coderjoe/atlas/fluid/block/FluidPump.kt | 17 +- .../atlas/power/block/LavaGenerator.kt | 12 +- .../atlas/power/block/MultiPowerCable.kt | 90 +- .../coderjoe/atlas/power/block/PowerCable.kt | 52 +- .../coderjoe/atlas/power/block/PowerMerger.kt | 53 +- .../atlas/power/block/SmallBattery.kt | 32 +- .../atlas/power/block/SmallSolarPanel.kt | 22 +- .../atlas/transport/block/ConveyorBelt.kt | 19 +- .../atlas/utility/block/AutoSmelter.kt | 50 +- .../atlas/utility/block/CobblestoneFactory.kt | 18 +- .../atlas/utility/block/ObsidianFactory.kt | 18 +- .../atlas/utility/block/SmallDrill.kt | 19 +- .../atlas/configuration/auto_smelter.yml | 171 + .../configuration/cobblestone_factory.yml | 90 + .../atlas/configuration/conveyor_belt.yml | 107 + .../atlas/configuration/fluid_container.yml | 580 +++ .../atlas/configuration/fluid_merger.yml | 248 + .../atlas/configuration/fluid_pipe.yml | 244 + .../atlas/configuration/fluid_pump.yml | 129 + .../atlas/configuration/lava_generator.yml | 90 + .../atlas/configuration/multi_power_cable.yml | 180 + .../atlas/configuration/obsidian_factory.yml | 90 + .../atlas/configuration/power_cable.yml | 177 + .../atlas/configuration/power_merger.yml | 181 + .../atlas/configuration/small_battery.yml | 168 + .../atlas/configuration/small_drill.yml | 114 + .../atlas/configuration/small_solar_panel.yml | 92 + src/main/resources/atlas/pack.yml | 1 + .../block/custom/conveyor_belt_base.json | 19 + .../block/custom}/auto_smelter_back.png | Bin .../block/custom}/auto_smelter_fire.png | Bin .../block/custom}/auto_smelter_fire_off.png | Bin .../block/custom}/auto_smelter_front.png | Bin .../block/custom}/auto_smelter_housing.png | Bin .../block/custom}/auto_smelter_side.png | Bin .../block/custom}/auto_smelter_top_east.png | Bin .../block/custom}/auto_smelter_top_north.png | Bin .../block/custom}/auto_smelter_top_south.png | Bin .../block/custom}/auto_smelter_top_west.png | Bin .../custom}/cobblestone_factory_bottom.png | Bin .../custom}/cobblestone_factory_side.png | Bin .../cobblestone_factory_side_active.png | Bin .../block/custom}/cobblestone_factory_top.png | Bin .../cobblestone_factory_top_active.png | Bin .../block/custom}/conveyor_belt_back.png | Bin .../block/custom}/conveyor_belt_bottom.png | Bin .../block/custom}/conveyor_belt_front.png | Bin .../block/custom}/conveyor_belt_side.png | Bin .../block/custom}/conveyor_belt_top_east.png | Bin .../block/custom}/conveyor_belt_top_north.png | Bin .../block/custom}/conveyor_belt_top_south.png | Bin .../block/custom}/conveyor_belt_top_west.png | Bin .../block/custom}/fluid_container_back.png | Bin .../fluid_container_back_lava_full.png | Bin .../custom}/fluid_container_back_lava_low.png | Bin .../fluid_container_back_lava_medium.png | Bin .../fluid_container_back_water_full.png | Bin .../fluid_container_back_water_low.png | Bin .../fluid_container_back_water_medium.png | Bin .../block/custom}/fluid_container_front.png | Bin .../fluid_container_front_lava_full.png | Bin .../fluid_container_front_lava_low.png | Bin .../fluid_container_front_lava_medium.png | Bin .../fluid_container_front_water_full.png | Bin .../fluid_container_front_water_low.png | Bin .../fluid_container_front_water_medium.png | Bin .../block/custom}/fluid_container_side.png | Bin .../fluid_container_side_lava_full.png | Bin .../custom}/fluid_container_side_lava_low.png | Bin .../fluid_container_side_lava_medium.png | Bin .../fluid_container_side_water_full.png | Bin .../fluid_container_side_water_low.png | Bin .../fluid_container_side_water_medium.png | Bin .../block/custom}/fluid_container_top.png | Bin .../custom}/fluid_container_top_lava_full.png | Bin .../custom}/fluid_container_top_lava_low.png | Bin .../fluid_container_top_lava_medium.png | Bin .../fluid_container_top_water_full.png | Bin .../custom}/fluid_container_top_water_low.png | Bin .../fluid_container_top_water_medium.png | Bin .../block/custom}/fluid_merger_back.png | Bin .../block/custom}/fluid_merger_back_lava.png | Bin .../block/custom}/fluid_merger_back_water.png | Bin .../block/custom}/fluid_merger_bottom.png | Bin .../custom}/fluid_merger_bottom_lava.png | Bin .../custom}/fluid_merger_bottom_water.png | Bin .../block/custom}/fluid_merger_front.png | Bin .../block/custom}/fluid_merger_front_lava.png | Bin .../custom}/fluid_merger_front_water.png | Bin .../block/custom}/fluid_merger_side.png | Bin .../block/custom}/fluid_merger_side_lava.png | Bin .../block/custom}/fluid_merger_side_water.png | Bin .../block/custom}/fluid_merger_top.png | Bin .../block/custom}/fluid_merger_top_lava.png | Bin .../block/custom}/fluid_merger_top_water.png | Bin .../block/custom}/fluid_pipe_back.png | Bin .../block/custom}/fluid_pipe_back_filled.png | Bin .../custom}/fluid_pipe_back_filled_lava.png | Bin .../block/custom}/fluid_pipe_front.png | Bin .../block/custom}/fluid_pipe_front_filled.png | Bin .../custom}/fluid_pipe_front_filled_lava.png | Bin .../block/custom}/fluid_pipe_side_down.png | Bin .../custom}/fluid_pipe_side_filled_down.png | Bin .../fluid_pipe_side_filled_lava_down.png | Bin .../fluid_pipe_side_filled_lava_left.png | Bin .../fluid_pipe_side_filled_lava_right.png | Bin .../fluid_pipe_side_filled_lava_up.png | Bin .../custom}/fluid_pipe_side_filled_left.png | Bin .../custom}/fluid_pipe_side_filled_right.png | Bin .../custom}/fluid_pipe_side_filled_up.png | Bin .../block/custom}/fluid_pipe_side_left.png | Bin .../block/custom}/fluid_pipe_side_right.png | Bin .../block/custom}/fluid_pipe_side_up.png | Bin .../block/custom}/fluid_pump_bottom.png | Bin .../custom}/fluid_pump_bottom_active.png | Bin .../custom}/fluid_pump_bottom_active_lava.png | Bin .../block/custom}/fluid_pump_side.png | Bin .../block/custom}/fluid_pump_side_active.png | Bin .../custom}/fluid_pump_side_active_lava.png | Bin .../textures/block/custom}/fluid_pump_top.png | Bin .../block/custom}/fluid_pump_top_active.png | Bin .../custom}/fluid_pump_top_active_lava.png | Bin .../block/custom}/guide_auto_smelter.png | Bin .../block/custom}/guide_conveyor_belt.png | Bin .../block/custom}/guide_fluid_container.png | Bin .../block/custom}/guide_fluid_pipe.png | Bin .../block/custom}/guide_fluid_pump.png | Bin .../block/custom}/guide_lava_generator.png | Bin .../block/custom}/guide_power_cable.png | Bin .../block/custom}/guide_small_battery.png | Bin .../block/custom}/guide_small_drill.png | Bin .../block/custom}/guide_small_solar_panel.png | Bin .../block/custom}/lava_generator_bottom.png | Bin .../block/custom}/lava_generator_side.png | Bin .../custom}/lava_generator_side_active.png | Bin .../block/custom}/lava_generator_top.png | Bin .../custom}/lava_generator_top_active.png | Bin .../block/custom}/multi_power_cable_back.png | Bin .../multi_power_cable_back_powered.png | Bin .../block/custom}/multi_power_cable_cap.png | Bin .../custom}/multi_power_cable_cap_powered.png | Bin .../block/custom}/multi_power_cable_front.png | Bin .../multi_power_cable_front_powered.png | Bin .../block/custom}/multi_power_cable_side.png | Bin .../multi_power_cable_side_powered.png | Bin .../block/custom}/obsidian_factory_bottom.png | Bin .../block/custom}/obsidian_factory_side.png | Bin .../custom}/obsidian_factory_side_active.png | Bin .../block/custom}/obsidian_factory_top.png | Bin .../custom}/obsidian_factory_top_active.png | Bin .../block/custom}/power_cable_back.png | Bin .../custom}/power_cable_back_powered.png | Bin .../block/custom}/power_cable_cap_down.png | Bin .../custom}/power_cable_cap_down_powered.png | Bin .../block/custom}/power_cable_cap_left.png | Bin .../custom}/power_cable_cap_left_powered.png | Bin .../block/custom}/power_cable_cap_right.png | Bin .../custom}/power_cable_cap_right_powered.png | Bin .../block/custom}/power_cable_cap_up.png | Bin .../custom}/power_cable_cap_up_powered.png | Bin .../block/custom}/power_cable_front.png | Bin .../custom}/power_cable_front_powered.png | Bin .../block/custom}/power_cable_side_down.png | Bin .../custom}/power_cable_side_down_powered.png | Bin .../block/custom}/power_cable_side_left.png | Bin .../custom}/power_cable_side_left_powered.png | Bin .../block/custom}/power_cable_side_right.png | Bin .../power_cable_side_right_powered.png | Bin .../block/custom}/power_cable_side_up.png | Bin .../custom}/power_cable_side_up_powered.png | Bin .../block/custom}/power_merger_back.png | Bin .../custom}/power_merger_back_powered.png | Bin .../block/custom}/power_merger_bottom.png | Bin .../custom}/power_merger_bottom_powered.png | Bin .../block/custom}/power_merger_front.png | Bin .../custom}/power_merger_front_powered.png | Bin .../block/custom}/power_merger_side.png | Bin .../custom}/power_merger_side_powered.png | Bin .../block/custom}/power_merger_top.png | Bin .../custom}/power_merger_top_powered.png | Bin .../textures/block/custom}/small_battery.png | Bin .../block/custom}/small_battery_bottom.png | Bin .../block/custom}/small_battery_full.png | Bin .../block/custom}/small_battery_low.png | Bin .../block/custom}/small_battery_medium.png | Bin .../block/custom}/small_battery_side.png | Bin .../textures/block/custom}/small_drill.png | Bin .../block/custom}/small_drill_arrow_down.png | Bin .../block/custom}/small_drill_arrow_left.png | Bin .../block/custom}/small_drill_arrow_right.png | Bin .../block/custom}/small_drill_arrow_up.png | Bin .../block/custom}/small_drill_front.png | Bin .../block/custom}/small_solar_panel.png | Bin .../custom}/small_solar_panel_bottom.png | Bin .../block/custom}/small_solar_panel_full.png | Bin .../block/custom}/small_solar_panel_side.png | Bin src/main/resources/config.yml | 20 - .../resources/nexo/items/atlas_blocks.yml | 4591 ----------------- .../atlas/models/block/auto_smelter_ew.json | 53 - .../models/block/auto_smelter_ew_on.json | 53 - .../atlas/models/block/auto_smelter_ns.json | 53 - .../models/block/auto_smelter_ns_on.json | 53 - .../atlas/models/block/conveyor_belt.json | 19 - .../pack/assets/minecraft/font/default.json | 74 - .../nexo/recipes/shapeless/atlas_recipes.yml | 269 - src/main/resources/plugin.yml | 2 +- .../com/coderjoe/atlas/AtlasPluginTest.kt | 12 +- .../atlas/CrossSystemIntegrationTest.kt | 24 +- .../com/coderjoe/atlas/NexoIntegrationTest.kt | 54 - .../coderjoe/atlas/PlayerJoinListenerTest.kt | 27 +- .../coderjoe/atlas/ResourcePackManagerTest.kt | 80 - .../atlas/fluid/FluidBlockDataTest.kt | 10 +- .../atlas/fluid/FluidBlockFactoryTest.kt | 8 +- .../atlas/fluid/FluidBlockInitializerTest.kt | 41 +- .../atlas/fluid/FluidBlockListenerTest.kt | 88 +- .../atlas/fluid/FluidBlockLogicTest.kt | 331 +- .../atlas/fluid/FluidBlockPersistenceTest.kt | 14 +- .../atlas/fluid/FluidBlockRegistryTest.kt | 20 +- .../atlas/fluid/FluidContainerTest.kt | 298 +- .../coderjoe/atlas/fluid/FluidMergerTest.kt | 81 +- .../fluid/FluidNetworkIntegrationTest.kt | 22 +- .../coderjoe/atlas/power/LavaGeneratorTest.kt | 87 +- .../atlas/power/MultiPowerCableTest.kt | 174 +- .../atlas/power/PowerBlockDataTest.kt | 16 +- .../atlas/power/PowerBlockInitializerTest.kt | 75 +- .../atlas/power/PowerBlockListenerTest.kt | 97 +- .../atlas/power/PowerBlockLogicTest.kt | 209 +- .../atlas/power/PowerBlockPersistenceTest.kt | 20 +- .../atlas/power/PowerBlockRegistryTest.kt | 20 +- .../coderjoe/atlas/power/PowerMergerTest.kt | 96 +- .../power/PowerNetworkIntegrationTest.kt | 34 +- .../atlas/transport/ConveyorBeltTest.kt | 148 +- .../coderjoe/atlas/utility/AutoSmelterTest.kt | 204 +- .../atlas/utility/CobblestoneFactoryTest.kt | 88 +- .../atlas/utility/ObsidianFactoryTest.kt | 87 +- .../atlas/utility/SmallDrillMiningTest.kt | 12 +- 255 files changed, 4519 insertions(+), 7277 deletions(-) rename src/main/kotlin/com/coderjoe/atlas/{NexoIntegration.kt => CraftEngineIntegration.kt} (52%) delete mode 100644 src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt create mode 100644 src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt create mode 100644 src/main/resources/atlas/configuration/auto_smelter.yml create mode 100644 src/main/resources/atlas/configuration/cobblestone_factory.yml create mode 100644 src/main/resources/atlas/configuration/conveyor_belt.yml create mode 100644 src/main/resources/atlas/configuration/fluid_container.yml create mode 100644 src/main/resources/atlas/configuration/fluid_merger.yml create mode 100644 src/main/resources/atlas/configuration/fluid_pipe.yml create mode 100644 src/main/resources/atlas/configuration/fluid_pump.yml create mode 100644 src/main/resources/atlas/configuration/lava_generator.yml create mode 100644 src/main/resources/atlas/configuration/multi_power_cable.yml create mode 100644 src/main/resources/atlas/configuration/obsidian_factory.yml create mode 100644 src/main/resources/atlas/configuration/power_cable.yml create mode 100644 src/main/resources/atlas/configuration/power_merger.yml create mode 100644 src/main/resources/atlas/configuration/small_battery.yml create mode 100644 src/main/resources/atlas/configuration/small_drill.yml create mode 100644 src/main/resources/atlas/configuration/small_solar_panel.yml create mode 100644 src/main/resources/atlas/pack.yml create mode 100644 src/main/resources/atlas/resourcepack/assets/minecraft/models/block/custom/conveyor_belt_base.json rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_fire.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_fire_off.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_housing.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_top_east.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_top_north.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_top_south.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/auto_smelter_top_west.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/cobblestone_factory_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/cobblestone_factory_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/cobblestone_factory_side_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/cobblestone_factory_top.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/cobblestone_factory_top_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_top_east.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_top_north.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_top_south.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/conveyor_belt_top_west.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_back_lava_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_back_lava_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_back_lava_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_back_water_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_back_water_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_back_water_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_front_lava_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_front_lava_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_front_lava_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_front_water_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_front_water_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_front_water_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_side_lava_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_side_lava_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_side_lava_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_side_water_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_side_water_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_side_water_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_top.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_top_lava_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_top_lava_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_top_lava_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_top_water_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_top_water_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_container_top_water_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_back_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_back_water.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_bottom_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_bottom_water.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_front_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_front_water.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_side_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_side_water.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_top.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_top_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_merger_top_water.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_back_filled.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_back_filled_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_front_filled.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_front_filled_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_down.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_down.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_lava_down.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_lava_left.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_lava_right.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_lava_up.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_left.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_right.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_filled_up.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_left.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_right.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pipe_side_up.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_bottom_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_bottom_active_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_side_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_side_active_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_top.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_top_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/fluid_pump_top_active_lava.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_auto_smelter.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_conveyor_belt.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_fluid_container.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_fluid_pipe.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_fluid_pump.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_lava_generator.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_power_cable.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_small_battery.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_small_drill.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/guide_small_solar_panel.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/lava_generator_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/lava_generator_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/lava_generator_side_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/lava_generator_top.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/lava_generator_top_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_back_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_cap.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_cap_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_front_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/multi_power_cable_side_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/obsidian_factory_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/obsidian_factory_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/obsidian_factory_side_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/obsidian_factory_top.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/obsidian_factory_top_active.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_back_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_down.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_down_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_left.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_left_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_right.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_right_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_up.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_cap_up_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_front_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_down.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_down_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_left.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_left_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_right.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_right_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_up.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_cable_side_up_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_back.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_back_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_bottom_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_front_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_side_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_top.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/power_merger_top_powered.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_battery.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_battery_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_battery_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_battery_low.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_battery_medium.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_battery_side.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_drill.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_drill_arrow_down.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_drill_arrow_left.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_drill_arrow_right.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_drill_arrow_up.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_drill_front.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_solar_panel.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_solar_panel_bottom.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_solar_panel_full.png (100%) rename src/main/resources/{nexo/pack/assets/atlas/textures/block => atlas/resourcepack/assets/minecraft/textures/block/custom}/small_solar_panel_side.png (100%) delete mode 100644 src/main/resources/nexo/items/atlas_blocks.yml delete mode 100644 src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew.json delete mode 100644 src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew_on.json delete mode 100644 src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns.json delete mode 100644 src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns_on.json delete mode 100644 src/main/resources/nexo/pack/assets/atlas/models/block/conveyor_belt.json delete mode 100644 src/main/resources/nexo/pack/assets/minecraft/font/default.json delete mode 100644 src/main/resources/nexo/recipes/shapeless/atlas_recipes.yml delete mode 100644 src/test/kotlin/com/coderjoe/atlas/NexoIntegrationTest.kt delete mode 100644 src/test/kotlin/com/coderjoe/atlas/ResourcePackManagerTest.kt diff --git a/.claude/commands/new-block.md b/.claude/commands/new-block.md index a9f3938..5d3d1d3 100644 --- a/.claude/commands/new-block.md +++ b/.claude/commands/new-block.md @@ -8,7 +8,7 @@ $ARGUMENTS ## Instructions -You are scaffolding a new block in a Minecraft plugin (Paper/Kotlin) that uses the Nexo resource pack system and a custom block framework. Follow the existing patterns exactly. +You are scaffolding a new block in a Minecraft plugin (Paper/Kotlin) that uses the CraftEngine resource pack system and a custom block framework. Follow the existing patterns exactly. ### Step 1: Gather Info @@ -76,67 +76,74 @@ class {ClassName}(location: Location) : {BaseClass}(location, maxStorage = {N}) **DIRECTIONAL_OPPOSITE block** (like SmallDrill): Same directional pattern but placement type is `DIRECTIONAL_OPPOSITE`. -### Step 3: Add Block Definitions to atlas_blocks.yml +### Step 3: Add CraftEngine Block Configuration -Append to `src/main/resources/nexo/items/atlas_blocks.yml`. +Create `src/main/resources/atlas/configuration/{block_id}.yml`. -Find the next available `custom_variation` number. Power blocks use 100+ range, fluid blocks use 1-43 range. Check the file for the highest used number in the relevant range and increment. +Follow the CraftEngine configuration format. Each variant gets its own `items` section (use `items#1`, `items#2`, etc. for additional variants). The base variant uses `loot: template: default:loot_table/self`, while other variants use explicit loot pools that drop the base item. + +Reference existing configuration files (e.g., `small_solar_panel.yml`, `lava_generator.yml`) for the exact format. Here's the general structure: -Each variant needs its own YAML entry: ```yaml -{block_id}: - itemname: "{Display Name}" - material: paper - Pack: - generate_model: true - parent_model: block/cube # or block/cube_all for same texture on all faces - textures: - north: atlas:block/{texture_name} - south: atlas:block/{texture_name} - east: atlas:block/{texture_name} - west: atlas:block/{texture_name} - up: atlas:block/{texture_top} - down: atlas:block/{texture_bottom} - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: {next_available_number} - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: {base_block_id} # ALWAYS drops the base ID, not the variant - probability: 1.0 +items: + atlas:{block_id}: + material: paper + data: + item-name: "{Display Name}" + model: minecraft:block/custom/{block_id} + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/{block_id} + generation: + parent: minecraft:block/cube_bottom_top # or block/cube, block/cube_all + textures: + top: minecraft:block/custom/{block_id}_top + bottom: minecraft:block/custom/{block_id}_bottom + side: minecraft:block/custom/{block_id}_side ``` -Notes: -- All variant entries (active, directional, etc.) must each have a unique `custom_variation` number -- The `drop` always references the base block ID so variants drop the right item -- Use `block/cube_all` with `all:` texture if all 6 faces are the same -- Use `block/cube` with individual face textures if faces differ -- Use `block/cube_bottom_top` with `top:`, `bottom:`, `side:` if top/bottom differ from sides +For additional variant entries (active states, directional, etc.), add `items#1`, `items#2`, etc. sections with explicit loot that drops the base item: +```yaml +items#1: + atlas:{block_id}_{variant}: + # ... same structure but with: + # loot pools that drop atlas:{block_id} (the base item) +``` ### Step 4: Add Recipe -Append to `src/main/resources/nexo/recipes/shapeless/atlas_recipes.yml`: +Add the recipe in the same configuration file. Append a `recipes:` section: ```yaml -{block_id}_recipe: - result: - nexo_item: {block_id} - amount: 1 - ingredients: - A: - amount: {n} - minecraft_type: {MATERIAL} - B: - amount: {n} - minecraft_type: {MATERIAL} +recipes: + atlas:{block_id}: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:{material} + - minecraft:{material} + result: + id: atlas:{block_id} + count: 1 ``` ### Step 5: Register in Atlas.kt @@ -178,7 +185,7 @@ For **fluid blocks**, edit `src/main/kotlin/com/coderjoe/atlas/fluid/FluidBlockD ### Step 8: Generate Placeholder Textures -Create 128x128 PNG placeholder textures at `src/main/resources/nexo/pack/assets/atlas/textures/block/`. +Create 128x128 PNG placeholder textures at `src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/`. Use Python with Pillow to generate dark industrial-style textures matching the project's art style: - Base color: dark gray/charcoal (~38,38,44 RGB) @@ -194,8 +201,8 @@ Name textures following the convention: `{block_id}_{face}.png`, `{block_id}_{fa Before finishing, verify: - [ ] Block class created with correct descriptor - [ ] All variant IDs listed in `allRegistrableIds` -- [ ] YAML entries added for every variant with unique `custom_variation` numbers -- [ ] Recipe added +- [ ] CraftEngine configuration YAML created with all variants +- [ ] Recipe added in the configuration file - [ ] Descriptor registered in Atlas.kt - [ ] Dialog cases added - [ ] TestHelper updated with new descriptor diff --git a/pom.xml b/pom.xml index 3b8b4c5..fdc35ce 100644 --- a/pom.xml +++ b/pom.xml @@ -27,9 +27,8 @@ https://repo.papermc.io/repository/maven-public/ - nexomc - NexoMC Repository - https://repo.nexomc.com/releases + momirealms-repo + https://repo.momirealms.net/releases/ @@ -184,16 +183,16 @@ ${kotlin.version} - com.nexomc - nexo - 1.20.1 + net.momirealms + craft-engine-core + 0.0.67 + provided + + + net.momirealms + craft-engine-bukkit + 0.0.67 provided - - - * - * - - org.junit.jupiter diff --git a/run-server.sh b/run-server.sh index 23600e8..b50e103 100755 --- a/run-server.sh +++ b/run-server.sh @@ -5,10 +5,8 @@ SERVER_DIR="run" MINECRAFT_VERSION="1.21.11" # Create server directory if it doesn't exist -mkdir -p "$SERVER_DIR/plugins/Atlas" -mkdir -p "$SERVER_DIR/plugins/Nexo/items" -mkdir -p "$SERVER_DIR/plugins/Nexo/recipes/shapeless" -mkdir -p "$SERVER_DIR/plugins/Nexo/pack/assets/atlas/textures/block" +mkdir -p "$SERVER_DIR/plugins" +mkdir -p "$SERVER_DIR/plugins/CraftEngine/resources" # Build the plugin echo "Building plugin..." @@ -22,59 +20,61 @@ fi # Copy the plugin to the server cp target/Atlas-*.jar "$SERVER_DIR/plugins/" -# Check for Nexo plugin (accept any nexo*.jar or Nexo*.jar file) -NEXO_JAR=$(find "$SERVER_DIR/plugins" -maxdepth 1 \( -name "nexo*.jar" -o -name "Nexo*.jar" \) 2>/dev/null | head -1) - -# Validate the JAR has plugin.yml (not just the API artifact) -if [ -n "$NEXO_JAR" ]; then - if ! unzip -l "$NEXO_JAR" 2>/dev/null | grep -q "plugin.yml"; then - echo "Found invalid Nexo JAR (API artifact, not plugin). Removing..." - rm -f "$NEXO_JAR" - rm -rf "$SERVER_DIR/plugins/.paper-remapped/nexo-"* - rm -rf "$SERVER_DIR/plugins/.paper-remapped/Nexo-"* - NEXO_JAR="" +# Copy the plugin to the server +cp target/Atlas-Experimental-*.jar "$SERVER_DIR/plugins/" + +# Copy CraftEngine pack (configuration + textures) +echo "Setting up CraftEngine pack..." +rm -rf "$SERVER_DIR/plugins/CraftEngine/resources/atlas" +cp -r src/main/resources/atlas "$SERVER_DIR/plugins/CraftEngine/resources/atlas" + +# Check for CraftEngine plugin +CE_JAR=$(find "$SERVER_DIR/plugins" -maxdepth 1 \( -name "craft-engine*.jar" -o -name "CraftEngine*.jar" \) 2>/dev/null | head -1) + +if [ -n "$CE_JAR" ]; then + if ! unzip -l "$CE_JAR" 2>/dev/null | grep -q "plugin.yml\|paper-plugin.yml"; then + echo "Found invalid CraftEngine JAR (API artifact, not plugin). Removing..." + rm -f "$CE_JAR" + rm -rf "$SERVER_DIR/plugins/.paper-remapped/craft-engine-"* + rm -rf "$SERVER_DIR/plugins/.paper-remapped/CraftEngine-"* + CE_JAR="" fi fi -if [ -z "$NEXO_JAR" ]; then - # Clean up any corrupted files - rm -rf "$SERVER_DIR/plugins/.paper-remapped/nexo-"* - rm -rf "$SERVER_DIR/plugins/.paper-remapped/Nexo-"* +if [ -z "$CE_JAR" ]; then + rm -rf "$SERVER_DIR/plugins/.paper-remapped/craft-engine-"* + rm -rf "$SERVER_DIR/plugins/.paper-remapped/CraftEngine-"* echo "" echo "==============================================" - echo " Nexo plugin not found!" + echo " CraftEngine plugin not found!" echo "==============================================" echo "" echo " Download from Polymart:" - echo " https://polymart.org/resource/nexo.6901" + echo " https://polymart.org/product/7624/craftengine" echo "" echo " Or from BuiltByBit:" - echo " https://builtbybit.com/resources/nexo.36138/" + echo " https://builtbybit.com/resources/craftengine.82674/" + echo "" + echo " Or from Modrinth:" + echo " https://modrinth.com/plugin/craftengine" echo "" echo " Then place the JAR in:" echo " $(pwd)/$SERVER_DIR/plugins/" echo "" echo " NOTE: The Maven repository only has the API." - echo " You need the full plugin from Polymart/BuiltByBit." + echo " You need the full plugin JAR." echo "==============================================" echo "" exit 1 fi -echo "Found Nexo: $NEXO_JAR" +echo "Found CraftEngine: $CE_JAR" -# Pre-copy Atlas Nexo configurations (so they're available on first startup) -echo "Setting up Atlas Nexo configurations..." -cp "src/main/resources/nexo/items/atlas_blocks.yml" "$SERVER_DIR/plugins/Nexo/items/" -cp "src/main/resources/nexo/recipes/shapeless/atlas_recipes.yml" "$SERVER_DIR/plugins/Nexo/recipes/shapeless/" -cp src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel_*.png "$SERVER_DIR/plugins/Nexo/pack/assets/atlas/textures/block/" -cp src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_*.png "$SERVER_DIR/plugins/Nexo/pack/assets/atlas/textures/block/" - -# Create/update the Atlas plugin config (resource pack disabled - Nexo handles it) +# Create/update the Atlas plugin config (resource pack disabled - CraftEngine handles it) cat > "$SERVER_DIR/plugins/Atlas/config.yml" << EOF # Atlas Plugin Configuration (auto-generated for testing) -# Resource pack is disabled because Nexo handles resource pack generation and hosting +# Resource pack is disabled because CraftEngine handles resource pack generation and hosting logging: false @@ -86,7 +86,7 @@ resource-pack: prompt: "" EOF -echo "Atlas config created (resource pack disabled - Nexo handles it)" +echo "Atlas config created (resource pack disabled - CraftEngine handles it)" # Download Paper if not present or update to latest build cd "$SERVER_DIR" @@ -111,24 +111,23 @@ fi # Accept EULA echo "eula=true" > eula.txt -# Configure Paper for Nexo (disable noteblock/tripwire/chorus updates for performance) +# Configure Paper for CraftEngine (disable noteblock/tripwire/chorus updates for performance) mkdir -p "config" if [ ! -f "config/paper-global.yml" ]; then cat > "config/paper-global.yml" << EOF # Paper Global Configuration -# Optimized for Nexo custom blocks block-updates: disable-noteblock-updates: true disable-tripwire-updates: true disable-chorus-plant-updates: true EOF - echo "Paper config created with Nexo optimizations" + echo "Paper config created with CraftEngine optimizations" else # Check if optimizations are already present, if not warn the user if ! grep -q "disable-noteblock-updates: true" "config/paper-global.yml"; then echo "" - echo "WARNING: Please add these settings to config/paper-global.yml for Nexo:" + echo "WARNING: Please add these settings to config/paper-global.yml for CraftEngine:" echo " block-updates:" echo " disable-noteblock-updates: true" echo " disable-tripwire-updates: true" @@ -137,17 +136,6 @@ else fi fi -echo "" -echo "==============================================" -echo " Atlas + Nexo Development Server" -echo "==============================================" -echo " Nexo will handle resource pack hosting" -echo " Craft Small Solar Panel:" -echo " 3x Iron Ingot + 3x Lapis + 3x Redstone" -echo " Use /nexo reload to reload configurations" -echo "==============================================" -echo "" - # Run the server echo "Starting Paper server..." java -Xms1G -Xmx2G -jar "$PAPER_JAR" --nogui diff --git a/scripts/generate_fluid_textures.py b/scripts/generate_fluid_textures.py index 6f0e60e..e8a6371 100644 --- a/scripts/generate_fluid_textures.py +++ b/scripts/generate_fluid_textures.py @@ -13,8 +13,8 @@ OUTPUT_DIR = os.path.join( os.path.dirname(__file__), "..", - "src", "main", "resources", "nexo", "pack", - "assets", "atlas", "textures", "block" + "src", "main", "resources", "atlas", "resourcepack", + "assets", "minecraft", "textures", "block", "custom" ) S = 32 # texture size diff --git a/scripts/generate_power_cable_textures.py b/scripts/generate_power_cable_textures.py index 0c8a459..0489f97 100644 --- a/scripts/generate_power_cable_textures.py +++ b/scripts/generate_power_cable_textures.py @@ -13,8 +13,8 @@ OUTPUT_DIR = os.path.join( os.path.dirname(__file__), "..", - "src", "main", "resources", "nexo", "pack", - "assets", "atlas", "textures", "block" + "src", "main", "resources", "atlas", "resourcepack", + "assets", "minecraft", "textures", "block", "custom" ) # Colors diff --git a/scripts/generate_textures.py b/scripts/generate_textures.py index 8765f96..a4d87e0 100644 --- a/scripts/generate_textures.py +++ b/scripts/generate_textures.py @@ -11,8 +11,8 @@ OUTPUT_DIR = os.path.join( os.path.dirname(__file__), "..", - "src", "main", "resources", "nexo", "pack", - "assets", "atlas", "textures", "block" + "src", "main", "resources", "atlas", "resourcepack", + "assets", "minecraft", "textures", "block", "custom" ) # Indicator light colors (2x2 block in bottom-right corner) diff --git a/src/main/kotlin/com/coderjoe/atlas/Atlas.kt b/src/main/kotlin/com/coderjoe/atlas/Atlas.kt index 2d1ab48..151f4c6 100644 --- a/src/main/kotlin/com/coderjoe/atlas/Atlas.kt +++ b/src/main/kotlin/com/coderjoe/atlas/Atlas.kt @@ -20,8 +20,7 @@ import org.bukkit.plugin.java.JavaPlugin import org.bukkit.scheduler.BukkitTask class Atlas : JavaPlugin() { - private lateinit var resourcePackManager: ResourcePackManager - private lateinit var nexoIntegration: NexoIntegration + private lateinit var craftEngineIntegration: CraftEngineIntegration private lateinit var powerBlockRegistry: PowerBlockRegistry private lateinit var powerBlockPersistence: PowerBlockPersistence private lateinit var fluidBlockRegistry: FluidBlockRegistry @@ -37,16 +36,10 @@ class Atlas : JavaPlugin() { AtlasConfig.load(this) - nexoIntegration = NexoIntegration(this) - nexoIntegration.initialize() + craftEngineIntegration = CraftEngineIntegration(this) + craftEngineIntegration.initialize() - resourcePackManager = ResourcePackManager(this) - resourcePackManager.load() - - if (resourcePackManager.isConfigured()) { - logger.atlasInfo("Resource pack is configured and will be sent to players on join") - server.pluginManager.registerEvents(PlayerJoinListener(resourcePackManager), this) - } + server.pluginManager.registerEvents(PlayerJoinListener(), this) PowerBlockDialog.init(this) FluidBlockDialog.init(this) diff --git a/src/main/kotlin/com/coderjoe/atlas/NexoIntegration.kt b/src/main/kotlin/com/coderjoe/atlas/CraftEngineIntegration.kt similarity index 52% rename from src/main/kotlin/com/coderjoe/atlas/NexoIntegration.kt rename to src/main/kotlin/com/coderjoe/atlas/CraftEngineIntegration.kt index 248a159..00c49a5 100644 --- a/src/main/kotlin/com/coderjoe/atlas/NexoIntegration.kt +++ b/src/main/kotlin/com/coderjoe/atlas/CraftEngineIntegration.kt @@ -5,54 +5,93 @@ import java.io.File import java.net.URI import java.util.jar.JarFile -class NexoIntegration(private val plugin: JavaPlugin) { - private val nexoFolder: File - get() = File(plugin.dataFolder.parentFile, "Nexo") +class CraftEngineIntegration(private val plugin: JavaPlugin) { + private val craftEngineFolder: File + get() = File(plugin.dataFolder.parentFile, "CraftEngine/resources/atlas") fun initialize() { - copyItemConfigurations() + copyPackYml() + copyConfigurations() copyTextures() copyModels() - copyRecipes() - copyFonts() - plugin.logger.atlasInfo("Atlas Nexo integration initialized") + plugin.logger.atlasInfo("Atlas CraftEngine integration initialized") } - private fun copyItemConfigurations() { - val itemsFolder = File(nexoFolder, "items") - if (!itemsFolder.exists()) { - plugin.logger.warning("Nexo items folder not found. Make sure Nexo is installed.") - return + private fun copyPackYml() { + val targetFile = File(craftEngineFolder, "pack.yml") + if (!targetFile.parentFile.exists()) { + targetFile.parentFile.mkdirs() } - - val targetFile = File(itemsFolder, "atlas_blocks.yml") - plugin.saveResource("nexo/items/atlas_blocks.yml", true) - val sourceFile = File(plugin.dataFolder, "nexo/items/atlas_blocks.yml") + plugin.saveResource("atlas/pack.yml", true) + val sourceFile = File(plugin.dataFolder, "atlas/pack.yml") if (sourceFile.exists()) { sourceFile.copyTo(targetFile, overwrite = true) sourceFile.delete() - plugin.logger.atlasInfo("Copied Atlas block configurations to Nexo") + } + } + + private fun copyConfigurations() { + val configFolder = File(craftEngineFolder, "configuration") + if (!configFolder.exists()) { + configFolder.mkdirs() + } + + val prefix = "atlas/configuration/" + val configPaths = discoverResources(prefix, ".yml") + + for (resourcePath in configPaths) { + val fileName = resourcePath.substringAfterLast("/") + val targetFile = File(configFolder, fileName) + plugin.saveResource(resourcePath, true) + val sourceFile = File(plugin.dataFolder, resourcePath) + if (sourceFile.exists()) { + sourceFile.copyTo(targetFile, overwrite = true) + sourceFile.delete() + plugin.logger.atlasInfo("Copied ${fileName.removeSuffix(".yml")} configuration to CraftEngine") + } } } private fun copyTextures() { - val texturesFolder = File(nexoFolder, "pack/assets/atlas/textures/block") + val texturesFolder = File(craftEngineFolder, "resourcepack/assets/minecraft/textures/block/custom") if (!texturesFolder.exists()) { texturesFolder.mkdirs() } - val prefix = "nexo/pack/assets/atlas/textures/block/" + val prefix = "atlas/resourcepack/assets/minecraft/textures/block/custom/" val texturePaths = discoverResources(prefix, ".png") for (resourcePath in texturePaths) { val fileName = resourcePath.substringAfterLast("/") - val textureFile = File(texturesFolder, fileName) + val targetFile = File(texturesFolder, fileName) + plugin.saveResource(resourcePath, true) + val sourceFile = File(plugin.dataFolder, resourcePath) + if (sourceFile.exists()) { + sourceFile.copyTo(targetFile, overwrite = true) + sourceFile.delete() + plugin.logger.atlasInfo("Copied ${fileName.removeSuffix(".png")} texture to CraftEngine") + } + } + } + + private fun copyModels() { + val modelsFolder = File(craftEngineFolder, "resourcepack/assets/minecraft/models/block/custom") + if (!modelsFolder.exists()) { + modelsFolder.mkdirs() + } + + val prefix = "atlas/resourcepack/assets/minecraft/models/block/custom/" + val modelPaths = discoverResources(prefix, ".json") + + for (resourcePath in modelPaths) { + val fileName = resourcePath.substringAfterLast("/") + val targetFile = File(modelsFolder, fileName) plugin.saveResource(resourcePath, true) val sourceFile = File(plugin.dataFolder, resourcePath) if (sourceFile.exists()) { - sourceFile.copyTo(textureFile, overwrite = true) + sourceFile.copyTo(targetFile, overwrite = true) sourceFile.delete() - plugin.logger.atlasInfo("Copied ${fileName.removeSuffix(".png")} texture to Nexo") + plugin.logger.atlasInfo("Copied ${fileName.removeSuffix(".json")} model to CraftEngine") } } } @@ -82,64 +121,4 @@ class NexoIntegration(private val plugin: JavaPlugin) { else -> emptyList() } } - - private fun copyModels() { - val modelsFolder = File(nexoFolder, "pack/assets/atlas/models/block") - if (!modelsFolder.exists()) { - modelsFolder.mkdirs() - } - - val prefix = "nexo/pack/assets/atlas/models/block/" - val modelPaths = discoverResources(prefix, ".json") - - for (resourcePath in modelPaths) { - val fileName = resourcePath.substringAfterLast("/") - val modelFile = File(modelsFolder, fileName) - plugin.saveResource(resourcePath, true) - val sourceFile = File(plugin.dataFolder, resourcePath) - if (sourceFile.exists()) { - sourceFile.copyTo(modelFile, overwrite = true) - sourceFile.delete() - plugin.logger.atlasInfo("Copied ${fileName.removeSuffix(".json")} model to Nexo") - } - } - } - - private fun copyFonts() { - val fontsFolder = File(nexoFolder, "pack/assets/minecraft/font") - if (!fontsFolder.exists()) { - fontsFolder.mkdirs() - } - - val prefix = "nexo/pack/assets/minecraft/font/" - val fontPaths = discoverResources(prefix, ".json") - - for (resourcePath in fontPaths) { - val fileName = resourcePath.substringAfterLast("/") - val fontFile = File(fontsFolder, fileName) - plugin.saveResource(resourcePath, true) - val sourceFile = File(plugin.dataFolder, resourcePath) - if (sourceFile.exists()) { - sourceFile.copyTo(fontFile, overwrite = true) - sourceFile.delete() - plugin.logger.atlasInfo("Copied ${fileName.removeSuffix(".json")} font to Nexo") - } - } - } - - private fun copyRecipes() { - val recipesFolder = File(nexoFolder, "recipes/shapeless") - if (!recipesFolder.exists()) { - recipesFolder.mkdirs() - } - - val targetFile = File(recipesFolder, "atlas_recipes.yml") - plugin.saveResource("nexo/recipes/shapeless/atlas_recipes.yml", true) - val sourceFile = File(plugin.dataFolder, "nexo/recipes/shapeless/atlas_recipes.yml") - if (sourceFile.exists()) { - sourceFile.copyTo(targetFile, overwrite = true) - sourceFile.delete() - plugin.logger.atlasInfo("Copied Atlas recipes to Nexo") - } - } } diff --git a/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt b/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt index 8e20b40..2750af8 100644 --- a/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt +++ b/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt @@ -1,19 +1,27 @@ package com.coderjoe.atlas +import org.bukkit.Bukkit +import org.bukkit.Keyed import org.bukkit.event.EventHandler import org.bukkit.event.Listener import org.bukkit.event.player.PlayerJoinEvent -class PlayerJoinListener( - private val resourcePackManager: ResourcePackManager, -) : Listener { +class PlayerJoinListener : Listener { @EventHandler fun onPlayerJoin(event: PlayerJoinEvent) { val player = event.player - - // Send resource pack to the player - if (resourcePackManager.isConfigured()) { - resourcePackManager.sendToPlayer(player) - } + val plugin = player.server.pluginManager.getPlugin("Atlas") ?: return + player.server.scheduler.runTaskLater(plugin, Runnable { + val iterator = Bukkit.recipeIterator() + while (iterator.hasNext()) { + val recipe = iterator.next() + if (recipe is Keyed) { + val key = recipe.key + if (key.namespace == "atlas") { + player.discoverRecipe(key) + } + } + } + }, 20L) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt b/src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt deleted file mode 100644 index b4edf7a..0000000 --- a/src/main/kotlin/com/coderjoe/atlas/ResourcePackManager.kt +++ /dev/null @@ -1,76 +0,0 @@ -package com.coderjoe.atlas - -import net.kyori.adventure.resource.ResourcePackInfo -import net.kyori.adventure.resource.ResourcePackRequest -import net.kyori.adventure.text.Component -import org.bukkit.entity.Player -import org.bukkit.plugin.java.JavaPlugin -import java.net.URI -import java.util.UUID - -class ResourcePackManager(private val plugin: JavaPlugin) { - private var packInfo: ResourcePackInfo? = null - private var isRequired: Boolean = false - private var promptMessage: Component? = null - - fun load() { - plugin.saveDefaultConfig() - val config = plugin.config - - val enabled = config.getBoolean("resource-pack.enabled", false) - if (!enabled) { - plugin.logger.atlasInfo("Resource pack is disabled in config") - return - } - - val url = config.getString("resource-pack.url") ?: "" - val hash = config.getString("resource-pack.hash") ?: "" - isRequired = config.getBoolean("resource-pack.required", false) - val prompt = config.getString("resource-pack.prompt") ?: "" - - if (url.isBlank()) { - plugin.logger.warning("Resource pack URL is not configured!") - return - } - - // Generate a consistent UUID based on the URL - val packId = UUID.nameUUIDFromBytes(url.toByteArray()) - - try { - packInfo = - ResourcePackInfo.resourcePackInfo() - .uri(URI.create(url)) - .hash(hash) - .id(packId) - .build() - - if (prompt.isNotBlank()) { - promptMessage = Component.text(prompt) - } - - plugin.logger.atlasInfo("Resource pack configured: $url") - } catch (e: Exception) { - plugin.logger.severe("Failed to configure resource pack: ${e.message}") - } - } - - fun sendToPlayer(player: Player) { - val info = packInfo ?: return - - val request = - ResourcePackRequest.resourcePackRequest() - .packs(info) - .required(isRequired) - .replace(true) - .apply { - promptMessage?.let { prompt(it) } - } - .build() - - player.sendResourcePacks(request) - - plugin.logger.atlasInfo("Sent resource pack to ${player.name}") - } - - fun isConfigured(): Boolean = packInfo != null -} diff --git a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt index 0370ee9..522d052 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt @@ -2,9 +2,9 @@ package com.coderjoe.atlas.core import com.coderjoe.atlas.Atlas import com.coderjoe.atlas.atlasInfo -import com.nexomc.nexo.api.NexoBlocks +import net.momirealms.craftengine.bukkit.api.CraftEngineBlocks +import net.momirealms.craftengine.core.util.Key import org.bukkit.Location -import org.bukkit.Material import org.bukkit.block.BlockFace import org.bukkit.plugin.java.JavaPlugin import org.bukkit.scheduler.BukkitTask @@ -38,9 +38,12 @@ abstract class AtlasBlock( val key = BlockRegistry.locationKey(location) registry.updatingLocations.add(key) try { - location.block.setType(Material.AIR, false) - NexoBlocks.place(newState, location) + CraftEngineBlocks.place(location, Key.of(newState), false) currentVisualState = newState + } catch (e: Throwable) { + plugin.logger.warning( + "Failed to update visual state at ${location.blockX},${location.blockY},${location.blockZ}: ${e.message}" + ) } finally { registry.updatingLocations.remove(key) } @@ -48,12 +51,20 @@ abstract class AtlasBlock( } fun start() { - currentVisualState = NexoBlocks.customBlockMechanic(location.block)?.itemID + try { + val state = CraftEngineBlocks.getCustomBlockState(location.block) + currentVisualState = state?.owner()?.value()?.id()?.toString() + } catch (_: Throwable) { + // CraftEngine not loaded + } plugin.server.scheduler.runTask( plugin, Runnable { updateVisualState() + if (facing != BlockFace.SELF) { + CraftEngineHelper.setFacing(location, facing) + } }, ) @@ -67,7 +78,7 @@ abstract class AtlasBlock( } catch (e: Exception) { plugin.logger.warning( """ - Error in block tick at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ}: ${'$'}{e.message} + Error in block tick at ${location.blockX},${location.blockY},${location.blockZ}: ${e.message} """.trimIndent(), ) } diff --git a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt index dd1791a..eeb29f3 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt @@ -1,8 +1,5 @@ package com.coderjoe.atlas.core -import com.nexomc.nexo.api.NexoBlocks -import com.nexomc.nexo.api.NexoItems -import org.bukkit.Material import org.bukkit.block.BlockFace import org.bukkit.event.EventHandler import org.bukkit.event.Listener @@ -23,20 +20,12 @@ class AtlasBlockListener( if (systems.any { it.registry.updatingLocations.contains(key) }) return - val mechanic = NexoBlocks.customBlockMechanic(event.block) ?: return - val blockId = mechanic.itemID + val blockId = CraftEngineHelper.getBlockId(event.block) ?: return for (system in systems) { - val baseDescriptor = system.findDescriptorByBaseId(blockId) - if (baseDescriptor != null) { - handlePlacement(event, system, baseDescriptor, blockId) - return - } - val descriptor = system.findDescriptorForBlockId(blockId) if (descriptor != null) { - val facing = resolveFacingFromVariant(descriptor, blockId) - createAndRegister(system, blockId, event.block.location, facing) + handlePlacement(event, system, descriptor) return } } @@ -46,42 +35,39 @@ class AtlasBlockListener( event: BlockPlaceEvent, system: BlockSystem<*>, descriptor: BlockDescriptor, - blockId: String, ) { + val location = event.block.location.clone() + when (descriptor.placementType) { PlacementType.SIMPLE -> { - val location = event.block.location.clone() - val facing = - if (descriptor.directionalVariants.isEmpty()) { - getPlayerFacing(event) - } else { - BlockFace.SELF - } - createAndRegister(system, blockId, location, facing) + val facing = getPlayerFacing(event) + createAndRegister(system, descriptor.baseBlockId, location, facing) } PlacementType.DIRECTIONAL -> { - val facing = getDirectionalFacing(event, descriptor) - val variantId = descriptor.directionalVariants[facing] ?: return - val location = event.block.location.clone() + val facing = getPlayerFacing(event) + val playerFacing = event.player.facing plugin.server.scheduler.runTask( plugin, Runnable { - location.block.setType(Material.AIR, false) - NexoBlocks.place(variantId, location) - createAndRegister(system, variantId, location, facing) + val actualFacing = if (CraftEngineHelper.setFacing(location, facing)) facing else { + CraftEngineHelper.setFacing(location, playerFacing) + playerFacing + } + createAndRegister(system, descriptor.baseBlockId, location, actualFacing) }, ) } PlacementType.DIRECTIONAL_OPPOSITE -> { - val facing = getDirectionalFacing(event, descriptor, opposite = true) - val variantId = descriptor.directionalVariants[facing] ?: blockId - val location = event.block.location.clone() + val facing = getPlayerFacing(event).oppositeFace + val playerFacing = event.player.facing.oppositeFace plugin.server.scheduler.runTask( plugin, Runnable { - location.block.setType(Material.AIR, false) - NexoBlocks.place(variantId, location) - createAndRegister(system, variantId, location, facing) + val actualFacing = if (CraftEngineHelper.setFacing(location, facing)) facing else { + CraftEngineHelper.setFacing(location, playerFacing) + playerFacing + } + createAndRegister(system, descriptor.baseBlockId, location, actualFacing) }, ) } @@ -113,61 +99,12 @@ class AtlasBlockListener( for (system in systems) { val block = system.registry.unregister(location) if (block != null) { - val baseItemId = block.baseBlockId.ifEmpty { null } - if (baseItemId != null) { - val itemBuilder = NexoItems.itemFromId(baseItemId) - if (itemBuilder != null) { - val dropLocation = event.block.location.add(0.5, 0.5, 0.5) - event.block.world.dropItemNaturally(dropLocation, itemBuilder.build()) - event.isDropItems = false - } - } return } } } - @EventHandler - fun onPlayerInteract(event: PlayerInteractEvent) { - if (event.action != Action.RIGHT_CLICK_BLOCK) return - if (event.player.isSneaking) return - val clickedBlock = event.clickedBlock ?: return - val location = clickedBlock.location - - for (system in systems) { - val block = system.registry.getBlock(location) - if (block != null) { - system.showDialog(event.player, block) - event.isCancelled = true - return - } - } - } - - private fun resolveFacingFromVariant( - descriptor: BlockDescriptor, - blockId: String, - ): BlockFace { - for ((face, id) in descriptor.directionalVariants) { - if (id == blockId) return face - } - return BlockFace.SELF - } - companion object { - fun getDirectionalFacing( - event: BlockPlaceEvent, - descriptor: BlockDescriptor, - opposite: Boolean = false, - ): BlockFace { - val raw = getPlayerFacing(event) - val facing = if (opposite) raw.oppositeFace else raw - if (descriptor.directionalVariants.containsKey(facing)) return facing - // Fall back to the player's horizontal look direction - val fallback = event.player.facing - return if (opposite) fallback.oppositeFace else fallback - } - fun getPlayerFacing(event: BlockPlaceEvent): BlockFace { val against = event.blockAgainst.location val placed = event.block.location @@ -186,4 +123,21 @@ class AtlasBlockListener( } } } + + @EventHandler + fun onPlayerInteract(event: PlayerInteractEvent) { + if (event.action != Action.RIGHT_CLICK_BLOCK) return + if (event.player.isSneaking) return + val clickedBlock = event.clickedBlock ?: return + val location = clickedBlock.location + + for (system in systems) { + val block = system.registry.getBlock(location) + if (block != null) { + system.showDialog(event.player, block) + event.isCancelled = true + return + } + } + } } diff --git a/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt b/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt index 2fb2d45..ce5170b 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/BlockDescriptor.kt @@ -14,7 +14,6 @@ data class BlockDescriptor( val displayName: String, val description: String, val placementType: PlacementType, - val directionalVariants: Map, - val allRegistrableIds: List, + val additionalBlockIds: List = emptyList(), val constructor: (Location, BlockFace) -> AtlasBlock, ) diff --git a/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt b/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt index f45d9bd..3e719d0 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/BlockFactory.kt @@ -32,7 +32,8 @@ open class BlockFactory { @Suppress("UNCHECKED_CAST") fun registerFromDescriptors(descriptors: Collection) { for (desc in descriptors) { - for (id in desc.allRegistrableIds) { + register(desc.baseBlockId, desc.constructor as (Location, BlockFace) -> T) + for (id in desc.additionalBlockIds) { register(id, desc.constructor as (Location, BlockFace) -> T) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/core/BlockSystem.kt b/src/main/kotlin/com/coderjoe/atlas/core/BlockSystem.kt index 09d049b..f9bdadc 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/BlockSystem.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/BlockSystem.kt @@ -10,7 +10,7 @@ class BlockSystem( val showDialog: (Player, AtlasBlock) -> Unit, ) { fun findDescriptorForBlockId(blockId: String): BlockDescriptor? { - return descriptors.values.find { blockId in it.allRegistrableIds } + return descriptors.values.find { blockId == it.baseBlockId || blockId in it.additionalBlockIds } } fun findDescriptorByBaseId(blockId: String): BlockDescriptor? { diff --git a/src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt b/src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt new file mode 100644 index 0000000..99311da --- /dev/null +++ b/src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt @@ -0,0 +1,121 @@ +package com.coderjoe.atlas.core + +import net.momirealms.craftengine.bukkit.api.CraftEngineBlocks +import net.momirealms.craftengine.core.block.properties.Property +import org.bukkit.Location +import org.bukkit.block.Block +import org.bukkit.block.BlockFace + +object CraftEngineHelper { + private val CE_FACING_TO_BLOCK_FACE = mapOf( + "north" to BlockFace.NORTH, + "south" to BlockFace.SOUTH, + "east" to BlockFace.EAST, + "west" to BlockFace.WEST, + "up" to BlockFace.UP, + "down" to BlockFace.DOWN, + ) + + fun getBlockId(block: Block): String? { + return try { + val state = CraftEngineBlocks.getCustomBlockState(block) ?: return null + state.owner().value().id().toString() + } catch (_: Throwable) { + null + } + } + + fun getFacing(block: Block): BlockFace { + return try { + val state = CraftEngineBlocks.getCustomBlockState(block) ?: return BlockFace.NORTH + val customBlock = state.owner().value() + val facingProp = customBlock.getProperty("facing") ?: return BlockFace.NORTH + val facingValue = state.get(facingProp).toString() + CE_FACING_TO_BLOCK_FACE[facingValue] ?: BlockFace.NORTH + } catch (_: Throwable) { + BlockFace.NORTH + } + } + + fun setFacing(location: Location, facing: BlockFace): Boolean { + return try { + val block = location.block + val state = CraftEngineBlocks.getCustomBlockState(block) ?: return false + val customBlock = state.owner().value() + val facingProp = customBlock.getProperty("facing") ?: return false + val currentFacing = state.get(facingProp).toString() + val targetFacing = facing.name.lowercase() + if (currentFacing != targetFacing) { + @Suppress("UNCHECKED_CAST") + val typedProp = facingProp as Property>> + val possibleValues = typedProp.possibleValues() + val targetValue = possibleValues.find { + typedProp.valueName(it) == targetFacing + } ?: return false + val newState = state.with(typedProp, targetValue) + CraftEngineBlocks.place(location, newState, false) + } + true + } catch (_: Throwable) { + false + } + } + + fun setBooleanProperty(location: Location, propertyName: String, value: Boolean) { + try { + val block = location.block + val state = CraftEngineBlocks.getCustomBlockState(block) ?: return + val customBlock = state.owner().value() + val prop = customBlock.getProperty(propertyName) ?: return + val currentValue = state.get(prop) as? Boolean ?: return + if (currentValue != value) { + @Suppress("UNCHECKED_CAST") + val typedProp = prop as Property + val newState = state.with(typedProp, value) + CraftEngineBlocks.place(location, newState, false) + } + } catch (_: Throwable) { + // CraftEngine not available + } + } + + fun setStringProperty(location: Location, propertyName: String, value: String) { + try { + val block = location.block + val state = CraftEngineBlocks.getCustomBlockState(block) ?: return + val customBlock = state.owner().value() + val prop = customBlock.getProperty(propertyName) ?: return + @Suppress("UNCHECKED_CAST") + val typedProp = prop as Property>> + val possibleValues = typedProp.possibleValues() + val targetValue = possibleValues.find { + typedProp.valueName(it) == value + } ?: return + val currentValue = state.get(typedProp) + if (currentValue != targetValue) { + val newState = state.with(typedProp, targetValue) + CraftEngineBlocks.place(location, newState, false) + } + } catch (_: Throwable) { + // CraftEngine not available + } + } + + fun setIntProperty(location: Location, propertyName: String, value: Int) { + try { + val block = location.block + val state = CraftEngineBlocks.getCustomBlockState(block) ?: return + val customBlock = state.owner().value() + val prop = customBlock.getProperty(propertyName) ?: return + val currentValue = state.get(prop) as? Int ?: return + if (currentValue != value) { + @Suppress("UNCHECKED_CAST") + val typedProp = prop as Property + val newState = state.with(typedProp, value) + CraftEngineBlocks.place(location, newState, false) + } + } catch (_: Throwable) { + // CraftEngine not available + } + } +} diff --git a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt index acb6e8d..cc73af5 100644 --- a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt +++ b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt @@ -2,6 +2,7 @@ package com.coderjoe.atlas.fluid.block import com.coderjoe.atlas.atlasInfo import com.coderjoe.atlas.core.BlockDescriptor +import com.coderjoe.atlas.core.CraftEngineHelper import com.coderjoe.atlas.core.PlacementType import com.coderjoe.atlas.fluid.FluidBlock import com.coderjoe.atlas.fluid.FluidBlockRegistry @@ -16,73 +17,15 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "fluid_container" + const val BLOCK_ID = "atlas:fluid_container" const val MAX_CAPACITY = 10 - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "fluid_container_north", - BlockFace.SOUTH to "fluid_container_south", - BlockFace.EAST to "fluid_container_east", - BlockFace.WEST to "fluid_container_west", - BlockFace.UP to "fluid_container_up", - BlockFace.DOWN to "fluid_container_down", - ) - - val ID_TO_FACING = DIRECTIONAL_IDS.entries.associate { (face, id) -> id to face } - - private val FILL_LEVELS = listOf("low", "medium", "full") - private val FLUID_TYPES = listOf("water", "lava") - - val FILLED_IDS: Map>> = - BlockFace.values() - .filter { DIRECTIONAL_IDS.containsKey(it) } - .associateWith { face -> - val dir = face.name.lowercase() - mapOf( - FluidType.WATER to - mapOf( - "low" to "fluid_container_${dir}_water_low", - "medium" to "fluid_container_${dir}_water_medium", - "full" to "fluid_container_${dir}_water_full", - ), - FluidType.LAVA to - mapOf( - "low" to "fluid_container_${dir}_lava_low", - "medium" to "fluid_container_${dir}_lava_medium", - "full" to "fluid_container_${dir}_lava_full", - ), - ) - } - - val ALL_VARIANT_IDS: List = - buildList { - addAll(DIRECTIONAL_IDS.values) - for (face in FILLED_IDS.keys) { - for (fluidMap in FILLED_IDS[face]!!.values) { - addAll(fluidMap.values) - } - } - } - - fun facingFromBlockId(blockId: String): BlockFace? { - ID_TO_FACING[blockId]?.let { return it } - for ((face, fluidMap) in FILLED_IDS) { - for (levelMap in fluidMap.values) { - if (blockId in levelMap.values) return face - } - } - return null - } - val descriptor = BlockDescriptor( baseBlockId = BLOCK_ID, displayName = "Fluid Container", description = "Container - stores up to $MAX_CAPACITY units of fluid", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = ALL_VARIANT_IDS, constructor = { loc, facing -> FluidContainer(loc, facing) }, ) } @@ -113,27 +56,38 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid return direction == facing && hasFluid() } - fun getFillLevel(): String = + fun getFillLevel(): Int = when (storedAmount) { - 0 -> "empty" - in 1..3 -> "low" - in 4..7 -> "medium" - else -> "full" + 0 -> 0 + in 1..3 -> 1 + in 4..7 -> 2 + else -> 3 } - override fun getVisualStateBlockId(): String { - if (storedAmount == 0 || storedFluid == FluidType.NONE) { - return DIRECTIONAL_IDS[facing]!! + override fun getVisualStateBlockId(): String = BLOCK_ID + + private fun updateProperties() { + val fluidValue = when (storedFluid) { + FluidType.WATER -> "water" + FluidType.LAVA -> "lava" + FluidType.NONE -> "none" } - return FILLED_IDS[facing]!![storedFluid]!![getFillLevel()]!! + CraftEngineHelper.setStringProperty(location, "fluid", fluidValue) + CraftEngineHelper.setIntProperty(location, "fill_level", getFillLevel()) } override fun fluidUpdate() { - if (storedAmount >= MAX_CAPACITY) return + if (storedAmount >= MAX_CAPACITY) { + updateProperties() + return + } val registry = FluidBlockRegistry.instance ?: return val behind = facing.oppositeFace - val source = registry.getAdjacentFluidBlock(location, behind) ?: return + val source = registry.getAdjacentFluidBlock(location, behind) ?: run { + updateProperties() + return + } when (source) { is FluidPump -> { @@ -141,9 +95,8 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid val fluid = source.removeFluid() if (storeFluid(fluid)) { plugin.logger.atlasInfo( - """ - FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidPump - """.trimIndent(), + "FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidPump", ) } else { source.storeFluid(fluid) @@ -155,9 +108,8 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid val fluid = source.removeFluid() if (storeFluid(fluid)) { plugin.logger.atlasInfo( - """ - FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidPipe - """.trimIndent(), + "FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidPipe", ) } else { source.storeFluid(fluid) @@ -169,9 +121,8 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid val fluid = source.removeFluid() if (storeFluid(fluid)) { plugin.logger.atlasInfo( - """ - FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidContainer - """.trimIndent(), + "FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidContainer", ) } else { source.storeFluid(fluid) @@ -183,9 +134,8 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid val fluid = source.removeFluid() if (storeFluid(fluid)) { plugin.logger.atlasInfo( - """ - FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidMerger - """.trimIndent(), + "FluidContainer at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidMerger", ) } else { source.storeFluid(fluid) @@ -193,6 +143,8 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid } } } + + updateProperties() } fun restoreState( diff --git a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt index 393d390..523cf7c 100644 --- a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt +++ b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt @@ -2,6 +2,7 @@ package com.coderjoe.atlas.fluid.block import com.coderjoe.atlas.atlasInfo import com.coderjoe.atlas.core.BlockDescriptor +import com.coderjoe.atlas.core.CraftEngineHelper import com.coderjoe.atlas.core.PlacementType import com.coderjoe.atlas.fluid.FluidBlock import com.coderjoe.atlas.fluid.FluidBlockRegistry @@ -13,41 +14,7 @@ class FluidMerger(location: Location, override val facing: BlockFace) : FluidBlo override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "fluid_merger" - - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "fluid_merger_north", - BlockFace.SOUTH to "fluid_merger_south", - BlockFace.EAST to "fluid_merger_east", - BlockFace.WEST to "fluid_merger_west", - BlockFace.UP to "fluid_merger_up", - BlockFace.DOWN to "fluid_merger_down", - ) - - val WATER_FILLED_IDS = - mapOf( - BlockFace.NORTH to "fluid_merger_north_filled", - BlockFace.SOUTH to "fluid_merger_south_filled", - BlockFace.EAST to "fluid_merger_east_filled", - BlockFace.WEST to "fluid_merger_west_filled", - BlockFace.UP to "fluid_merger_up_filled", - BlockFace.DOWN to "fluid_merger_down_filled", - ) - - val LAVA_FILLED_IDS = - mapOf( - BlockFace.NORTH to "fluid_merger_north_filled_lava", - BlockFace.SOUTH to "fluid_merger_south_filled_lava", - BlockFace.EAST to "fluid_merger_east_filled_lava", - BlockFace.WEST to "fluid_merger_west_filled_lava", - BlockFace.UP to "fluid_merger_up_filled_lava", - BlockFace.DOWN to "fluid_merger_down_filled_lava", - ) - - val ID_TO_FACING = DIRECTIONAL_IDS.entries.associate { (face, id) -> id to face } - - fun facingFromBlockId(blockId: String): BlockFace? = ID_TO_FACING[blockId] + const val BLOCK_ID = "atlas:fluid_merger" val descriptor = BlockDescriptor( @@ -55,27 +22,31 @@ class FluidMerger(location: Location, override val facing: BlockFace) : FluidBlo displayName = "Fluid Merger", description = "Merger - merges fluid from all sides, outputs in facing direction", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = DIRECTIONAL_IDS.values.toList() + WATER_FILLED_IDS.values.toList() + LAVA_FILLED_IDS.values.toList(), constructor = { loc, facing -> FluidMerger(loc, facing) }, ) } override val baseBlockId: String = BLOCK_ID - override fun getVisualStateBlockId(): String = - when (storedFluid) { - FluidType.WATER -> WATER_FILLED_IDS[facing]!! - FluidType.LAVA -> LAVA_FILLED_IDS[facing]!! - FluidType.NONE -> DIRECTIONAL_IDS[facing]!! + override fun getVisualStateBlockId(): String = BLOCK_ID + + private fun updateFluidState() { + val fluidValue = when (storedFluid) { + FluidType.WATER -> "water" + FluidType.LAVA -> "lava" + FluidType.NONE -> "none" } + CraftEngineHelper.setStringProperty(location, "fluid", fluidValue) + } override fun fluidUpdate() { - if (hasFluid()) return + if (hasFluid()) { + updateFluidState() + return + } val registry = FluidBlockRegistry.instance ?: return - // Pull fluid from all faces except the output (facing) direction val inputFaces = listOf(BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN) .filter { it != facing } @@ -89,10 +60,10 @@ class FluidMerger(location: Location, override val facing: BlockFace) : FluidBlo val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidPump at ${face.name} - """.trimIndent(), + "FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidPump at ${face.name}", ) + updateFluidState() return } } @@ -101,10 +72,10 @@ class FluidMerger(location: Location, override val facing: BlockFace) : FluidBlo val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidPipe at ${face.name} - """.trimIndent(), + "FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidPipe at ${face.name}", ) + updateFluidState() return } } @@ -113,10 +84,10 @@ class FluidMerger(location: Location, override val facing: BlockFace) : FluidBlo val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidContainer at ${face.name} - """.trimIndent(), + "FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidContainer at ${face.name}", ) + updateFluidState() return } } @@ -125,14 +96,16 @@ class FluidMerger(location: Location, override val facing: BlockFace) : FluidBlo val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidMerger at ${face.name} - """.trimIndent(), + "FluidMerger at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidMerger at ${face.name}", ) + updateFluidState() return } } } } + + updateFluidState() } } diff --git a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt index bba752e..a24e52b 100644 --- a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt +++ b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt @@ -2,6 +2,7 @@ package com.coderjoe.atlas.fluid.block import com.coderjoe.atlas.atlasInfo import com.coderjoe.atlas.core.BlockDescriptor +import com.coderjoe.atlas.core.CraftEngineHelper import com.coderjoe.atlas.core.PlacementType import com.coderjoe.atlas.fluid.FluidBlock import com.coderjoe.atlas.fluid.FluidBlockRegistry @@ -13,41 +14,7 @@ class FluidPipe(location: Location, override val facing: BlockFace) : FluidBlock override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "fluid_pipe" - - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "fluid_pipe_north", - BlockFace.SOUTH to "fluid_pipe_south", - BlockFace.EAST to "fluid_pipe_east", - BlockFace.WEST to "fluid_pipe_west", - BlockFace.UP to "fluid_pipe_up", - BlockFace.DOWN to "fluid_pipe_down", - ) - - val ID_TO_FACING = DIRECTIONAL_IDS.entries.associate { (face, id) -> id to face } - - val WATER_FILLED_IDS = - mapOf( - BlockFace.NORTH to "fluid_pipe_north_filled", - BlockFace.SOUTH to "fluid_pipe_south_filled", - BlockFace.EAST to "fluid_pipe_east_filled", - BlockFace.WEST to "fluid_pipe_west_filled", - BlockFace.UP to "fluid_pipe_up_filled", - BlockFace.DOWN to "fluid_pipe_down_filled", - ) - - val LAVA_FILLED_IDS = - mapOf( - BlockFace.NORTH to "fluid_pipe_north_filled_lava", - BlockFace.SOUTH to "fluid_pipe_south_filled_lava", - BlockFace.EAST to "fluid_pipe_east_filled_lava", - BlockFace.WEST to "fluid_pipe_west_filled_lava", - BlockFace.UP to "fluid_pipe_up_filled_lava", - BlockFace.DOWN to "fluid_pipe_down_filled_lava", - ) - - fun facingFromBlockId(blockId: String): BlockFace? = ID_TO_FACING[blockId] + const val BLOCK_ID = "atlas:fluid_pipe" val descriptor = BlockDescriptor( @@ -55,23 +22,28 @@ class FluidPipe(location: Location, override val facing: BlockFace) : FluidBlock displayName = "Fluid Pipe", description = "Pipe - transports fluid in facing direction", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = DIRECTIONAL_IDS.values.toList() + WATER_FILLED_IDS.values.toList() + LAVA_FILLED_IDS.values.toList(), constructor = { loc, facing -> FluidPipe(loc, facing) }, ) } override val baseBlockId: String = BLOCK_ID - override fun getVisualStateBlockId(): String = - when (storedFluid) { - FluidType.WATER -> WATER_FILLED_IDS[facing]!! - FluidType.LAVA -> LAVA_FILLED_IDS[facing]!! - FluidType.NONE -> DIRECTIONAL_IDS[facing]!! + override fun getVisualStateBlockId(): String = BLOCK_ID + + private fun updateFluidState() { + val fluidValue = when (storedFluid) { + FluidType.WATER -> "water" + FluidType.LAVA -> "lava" + FluidType.NONE -> "none" } + CraftEngineHelper.setStringProperty(location, "fluid", fluidValue) + } override fun fluidUpdate() { - if (hasFluid()) return + if (hasFluid()) { + updateFluidState() + return + } val registry = FluidBlockRegistry.instance ?: return val behind = facing.oppositeFace @@ -83,9 +55,8 @@ class FluidPipe(location: Location, override val facing: BlockFace) : FluidBlock val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidPump - """.trimIndent(), + "FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidPump", ) } } @@ -94,9 +65,8 @@ class FluidPipe(location: Location, override val facing: BlockFace) : FluidBlock val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidPipe - """.trimIndent(), + "FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidPipe", ) } } @@ -105,9 +75,8 @@ class FluidPipe(location: Location, override val facing: BlockFace) : FluidBlock val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidContainer - """.trimIndent(), + "FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidContainer", ) } } @@ -116,12 +85,13 @@ class FluidPipe(location: Location, override val facing: BlockFace) : FluidBlock val fluid = source.removeFluid() storeFluid(fluid) plugin.logger.atlasInfo( - """ - FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} pulled ${fluid.name} from FluidMerger - """.trimIndent(), + "FluidPipe at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled ${fluid.name} from FluidMerger", ) } } } + + updateFluidState() } } diff --git a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPump.kt b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPump.kt index 032592d..7b46b91 100644 --- a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPump.kt +++ b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPump.kt @@ -30,9 +30,9 @@ class FluidPump(location: Location) : FluidBlock(location) { private set companion object { - const val BLOCK_ID = "fluid_pump" - const val BLOCK_ID_ACTIVE = "fluid_pump_active" - const val BLOCK_ID_ACTIVE_LAVA = "fluid_pump_active_lava" + const val BLOCK_ID = "atlas:fluid_pump" + const val BLOCK_ID_ACTIVE = "atlas:fluid_pump_active" + const val BLOCK_ID_ACTIVE_LAVA = "atlas:fluid_pump_active_lava" private val ADJACENT_FACES = listOf( @@ -50,8 +50,7 @@ class FluidPump(location: Location) : FluidBlock(location) { displayName = "Fluid Pump", description = "Pump - extracts fluid from adjacent cauldrons or source blocks (1 power/s)", placementType = PlacementType.SIMPLE, - directionalVariants = emptyMap(), - allRegistrableIds = listOf(BLOCK_ID, BLOCK_ID_ACTIVE, BLOCK_ID_ACTIVE_LAVA), + additionalBlockIds = listOf(BLOCK_ID_ACTIVE, BLOCK_ID_ACTIVE_LAVA), constructor = { loc, _ -> FluidPump(loc) }, ) } @@ -75,13 +74,11 @@ class FluidPump(location: Location) : FluidBlock(location) { val powerNeighbors = powerRegistry.getAdjacentPowerBlocks(location) isPowered = powerNeighbors.any { it.hasPower() } - // Step 1: If already holding fluid, skip — no power consumed if (hasFluid()) { pumpStatus = PumpStatus.IDLE return } - // Step 2: Scan for an adjacent cauldron var foundFace: BlockFace? = null var foundBlock: org.bukkit.block.Block? = null var fluidType = FluidType.NONE @@ -121,7 +118,6 @@ class FluidPump(location: Location) : FluidBlock(location) { return } - // Step 3: Try to pull 1 power from an adjacent power block var poweredThisTick = false for (neighbor in powerNeighbors) { if (neighbor.hasPower()) { @@ -138,7 +134,6 @@ class FluidPump(location: Location) : FluidBlock(location) { return } - // Step 4: Drain the source and store fluid when (foundBlock.type) { Material.WATER_CAULDRON -> { val levelled = foundBlock.blockData as? org.bukkit.block.data.Levelled @@ -162,9 +157,7 @@ class FluidPump(location: Location) : FluidBlock(location) { cauldronFace = foundFace pumpStatus = PumpStatus.EXTRACTING plugin.logger.atlasInfo( - """ - FluidPump at ${location.blockX},${location.blockY},${location.blockZ} extracted ${fluidType.name} from $foundFace - """.trimIndent(), + "FluidPump at ${location.blockX},${location.blockY},${location.blockZ} extracted ${fluidType.name} from $foundFace", ) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/power/block/LavaGenerator.kt b/src/main/kotlin/com/coderjoe/atlas/power/block/LavaGenerator.kt index f63d4b4..3c06087 100644 --- a/src/main/kotlin/com/coderjoe/atlas/power/block/LavaGenerator.kt +++ b/src/main/kotlin/com/coderjoe/atlas/power/block/LavaGenerator.kt @@ -18,8 +18,8 @@ class LavaGenerator(location: Location) : PowerBlock(location, maxStorage = 50) override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "lava_generator" - const val BLOCK_ID_ACTIVE = "lava_generator_active" + const val BLOCK_ID = "atlas:lava_generator" + const val BLOCK_ID_ACTIVE = "atlas:lava_generator_active" const val POWER_PER_LAVA = 5 private val ADJACENT_FACES = @@ -38,8 +38,7 @@ class LavaGenerator(location: Location) : PowerBlock(location, maxStorage = 50) displayName = "Lava Generator", description = "Generator - produces $POWER_PER_LAVA power per lava unit", placementType = PlacementType.SIMPLE, - directionalVariants = emptyMap(), - allRegistrableIds = listOf(BLOCK_ID, BLOCK_ID_ACTIVE), + additionalBlockIds = listOf(BLOCK_ID_ACTIVE), constructor = { loc, _ -> LavaGenerator(loc) }, ) } @@ -67,9 +66,8 @@ class LavaGenerator(location: Location) : PowerBlock(location, maxStorage = 50) if (lava) { val generated = addPower(POWER_PER_LAVA) plugin.logger.atlasInfo( - """ - LavaGenerator at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ} consumed 1 lava, generated ${'$'}generated power (now ${'$'}currentPower/${'$'}maxStorage) - """.trimIndent(), + "LavaGenerator at ${location.blockX},${location.blockY},${location.blockZ} " + + "consumed 1 lava, generated $generated power (now $currentPower/$maxStorage)", ) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/power/block/MultiPowerCable.kt b/src/main/kotlin/com/coderjoe/atlas/power/block/MultiPowerCable.kt index 7a2299e..3d3cd2b 100644 --- a/src/main/kotlin/com/coderjoe/atlas/power/block/MultiPowerCable.kt +++ b/src/main/kotlin/com/coderjoe/atlas/power/block/MultiPowerCable.kt @@ -2,6 +2,7 @@ package com.coderjoe.atlas.power.block import com.coderjoe.atlas.atlasInfo import com.coderjoe.atlas.core.BlockDescriptor +import com.coderjoe.atlas.core.CraftEngineHelper import com.coderjoe.atlas.core.PlacementType import com.coderjoe.atlas.power.PowerBlock import com.coderjoe.atlas.power.PowerBlockRegistry @@ -10,34 +11,7 @@ import org.bukkit.block.BlockFace class MultiPowerCable(location: Location, override val facing: BlockFace) : PowerBlock(location, maxStorage = 10) { companion object { - const val BLOCK_ID = "multi_power_cable" - - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "multi_power_cable_north", - BlockFace.SOUTH to "multi_power_cable_south", - BlockFace.EAST to "multi_power_cable_east", - BlockFace.WEST to "multi_power_cable_west", - BlockFace.UP to "multi_power_cable_up", - BlockFace.DOWN to "multi_power_cable_down", - ) - - val POWERED_IDS = - mapOf( - BlockFace.NORTH to "multi_power_cable_north_powered", - BlockFace.SOUTH to "multi_power_cable_south_powered", - BlockFace.EAST to "multi_power_cable_east_powered", - BlockFace.WEST to "multi_power_cable_west_powered", - BlockFace.UP to "multi_power_cable_up_powered", - BlockFace.DOWN to "multi_power_cable_down_powered", - ) - - val ID_TO_FACING = ( - DIRECTIONAL_IDS.entries.associate { (face, id) -> id to face } + - POWERED_IDS.entries.associate { (face, id) -> id to face } - ) - - fun facingFromBlockId(blockId: String): BlockFace? = ID_TO_FACING[blockId] + const val BLOCK_ID = "atlas:multi_power_cable" val descriptor = BlockDescriptor( @@ -45,27 +19,19 @@ class MultiPowerCable(location: Location, override val facing: BlockFace) : Powe displayName = "Multi Power Cable", description = "Cable - distributes power to all adjacent faces", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = DIRECTIONAL_IDS.values.toList() + POWERED_IDS.values.toList(), constructor = { loc, facing -> MultiPowerCable(loc, facing) }, ) } override val baseBlockId: String = BLOCK_ID - override val updateIntervalTicks: Long = 20L // 1 second + override val updateIntervalTicks: Long = 20L - override fun getVisualStateBlockId(): String = - if (currentPower > 0) { - POWERED_IDS[facing]!! - } else { - DIRECTIONAL_IDS[facing]!! - } + override fun getVisualStateBlockId(): String = BLOCK_ID override fun powerUpdate() { val registry = PowerBlockRegistry.instance ?: return - // Pull power from behind (opposite of facing direction) val source = registry.getAdjacentPowerBlock(location, facing.oppositeFace) if (source != null && canAcceptPower() && source.hasPower()) { @@ -74,34 +40,38 @@ class MultiPowerCable(location: Location, override val facing: BlockFace) : Powe if (pulled > 0) { addPower(pulled) plugin.logger.atlasInfo( - """ - MultiPowerCable at ${location.blockX},${location.blockY},${location.blockZ} pulled $pulled power (now $currentPower/$maxStorage) - """.trimIndent(), + "MultiPowerCable at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled $pulled power (now $currentPower/$maxStorage)", ) } } - // Push 1 power to each adjacent power block on the other 5 faces - if (!hasPower()) return - - val outputFaces = - listOf(BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN) - .filter { it != facing.oppositeFace } - - for (face in outputFaces) { - if (!hasPower()) break - val target = registry.getAdjacentPowerBlock(location, face) ?: continue - if (target.canAcceptPower()) { - val pushed = removePower(1) - if (pushed > 0) { - target.addPower(pushed) - plugin.logger.atlasInfo( - """ - MultiPowerCable at ${location.blockX},${location.blockY},${location.blockZ} pushed $pushed power to ${target::class.simpleName} at ${face.name} - """.trimIndent(), - ) + if (hasPower()) { + val outputFaces = + listOf(BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN) + .filter { it != facing.oppositeFace } + + for (face in outputFaces) { + if (!hasPower()) break + val target = registry.getAdjacentPowerBlock(location, face) ?: continue + if (target.canAcceptPower()) { + val pushed = removePower(1) + if (pushed > 0) { + target.addPower(pushed) + plugin.logger.atlasInfo( + "MultiPowerCable at ${location.blockX},${location.blockY},${location.blockZ} " + + "pushed $pushed power to ${target::class.simpleName} at ${face.name}", + ) + } } } } + + updatePoweredState() + } + + private fun updatePoweredState() { + val shouldBePowered = currentPower > 0 + CraftEngineHelper.setBooleanProperty(location, "powered", shouldBePowered) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/power/block/PowerCable.kt b/src/main/kotlin/com/coderjoe/atlas/power/block/PowerCable.kt index 3826c46..065b366 100644 --- a/src/main/kotlin/com/coderjoe/atlas/power/block/PowerCable.kt +++ b/src/main/kotlin/com/coderjoe/atlas/power/block/PowerCable.kt @@ -2,6 +2,7 @@ package com.coderjoe.atlas.power.block import com.coderjoe.atlas.atlasInfo import com.coderjoe.atlas.core.BlockDescriptor +import com.coderjoe.atlas.core.CraftEngineHelper import com.coderjoe.atlas.core.PlacementType import com.coderjoe.atlas.power.PowerBlock import com.coderjoe.atlas.power.PowerBlockRegistry @@ -10,31 +11,7 @@ import org.bukkit.block.BlockFace class PowerCable(location: Location, override val facing: BlockFace) : PowerBlock(location, maxStorage = 1) { companion object { - const val BLOCK_ID = "power_cable" - - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "power_cable_north", - BlockFace.SOUTH to "power_cable_south", - BlockFace.EAST to "power_cable_east", - BlockFace.WEST to "power_cable_west", - BlockFace.UP to "power_cable_up", - BlockFace.DOWN to "power_cable_down", - ) - - val ID_TO_FACING = DIRECTIONAL_IDS.entries.associate { (face, id) -> id to face } - - val POWERED_IDS = - mapOf( - BlockFace.NORTH to "power_cable_north_powered", - BlockFace.SOUTH to "power_cable_south_powered", - BlockFace.EAST to "power_cable_east_powered", - BlockFace.WEST to "power_cable_west_powered", - BlockFace.UP to "power_cable_up_powered", - BlockFace.DOWN to "power_cable_down_powered", - ) - - fun facingFromBlockId(blockId: String): BlockFace? = ID_TO_FACING[blockId] + const val BLOCK_ID = "atlas:power_cable" val descriptor = BlockDescriptor( @@ -42,28 +19,19 @@ class PowerCable(location: Location, override val facing: BlockFace) : PowerBloc displayName = "Power Cable", description = "Cable - transfers power in facing direction", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = DIRECTIONAL_IDS.values.toList(), constructor = { loc, facing -> PowerCable(loc, facing) }, ) } override val baseBlockId: String = BLOCK_ID - override val updateIntervalTicks: Long = 20L // 1 second + override val updateIntervalTicks: Long = 20L - override fun getVisualStateBlockId(): String = - if (currentPower > 0) { - POWERED_IDS[facing]!! - } else { - DIRECTIONAL_IDS[facing]!! - } + override fun getVisualStateBlockId(): String = BLOCK_ID override fun powerUpdate() { val registry = PowerBlockRegistry.instance ?: return - // Pull network: cables only pull from behind (opposite of facing direction). - // Downstream cables and consumers pull from us in their own update cycles. val source = registry.getAdjacentPowerBlock(location, facing.oppositeFace) if (source != null && canAcceptPower() && source.hasPower()) { @@ -71,11 +39,17 @@ class PowerCable(location: Location, override val facing: BlockFace) : PowerBloc if (pulled > 0) { addPower(pulled) plugin.logger.atlasInfo( - """ - PowerCable at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ} pulled ${'$'}pulled power from ${'$'}{source::class.simpleName} (now ${'$'}currentPower/${'$'}maxStorage) - """.trimIndent(), + "PowerCable at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled $pulled power from ${source::class.simpleName} (now $currentPower/$maxStorage)", ) } } + + updatePoweredState() + } + + private fun updatePoweredState() { + val shouldBePowered = currentPower > 0 + CraftEngineHelper.setBooleanProperty(location, "powered", shouldBePowered) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/power/block/PowerMerger.kt b/src/main/kotlin/com/coderjoe/atlas/power/block/PowerMerger.kt index 58b8de1..ed54b9d 100644 --- a/src/main/kotlin/com/coderjoe/atlas/power/block/PowerMerger.kt +++ b/src/main/kotlin/com/coderjoe/atlas/power/block/PowerMerger.kt @@ -2,6 +2,7 @@ package com.coderjoe.atlas.power.block import com.coderjoe.atlas.atlasInfo import com.coderjoe.atlas.core.BlockDescriptor +import com.coderjoe.atlas.core.CraftEngineHelper import com.coderjoe.atlas.core.PlacementType import com.coderjoe.atlas.power.PowerBlock import com.coderjoe.atlas.power.PowerBlockRegistry @@ -13,34 +14,7 @@ class PowerMerger(location: Location, override val facing: BlockFace) : PowerBlo override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "power_merger" - - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "power_merger_north", - BlockFace.SOUTH to "power_merger_south", - BlockFace.EAST to "power_merger_east", - BlockFace.WEST to "power_merger_west", - BlockFace.UP to "power_merger_up", - BlockFace.DOWN to "power_merger_down", - ) - - val POWERED_IDS = - mapOf( - BlockFace.NORTH to "power_merger_north_powered", - BlockFace.SOUTH to "power_merger_south_powered", - BlockFace.EAST to "power_merger_east_powered", - BlockFace.WEST to "power_merger_west_powered", - BlockFace.UP to "power_merger_up_powered", - BlockFace.DOWN to "power_merger_down_powered", - ) - - val ID_TO_FACING = ( - DIRECTIONAL_IDS.entries.associate { (face, id) -> id to face } + - POWERED_IDS.entries.associate { (face, id) -> id to face } - ) - - fun facingFromBlockId(blockId: String): BlockFace? = ID_TO_FACING[blockId] + const val BLOCK_ID = "atlas:power_merger" val descriptor = BlockDescriptor( @@ -48,25 +22,17 @@ class PowerMerger(location: Location, override val facing: BlockFace) : PowerBlo displayName = "Power Merger", description = "Cable - merges power from all sides, outputs in facing direction", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = DIRECTIONAL_IDS.values.toList() + POWERED_IDS.values.toList(), constructor = { loc, facing -> PowerMerger(loc, facing) }, ) } override val baseBlockId: String = BLOCK_ID - override fun getVisualStateBlockId(): String = - if (currentPower > 0) { - POWERED_IDS[facing]!! - } else { - DIRECTIONAL_IDS[facing]!! - } + override fun getVisualStateBlockId(): String = BLOCK_ID override fun powerUpdate() { val registry = PowerBlockRegistry.instance ?: return - // Pull power from all faces except the output (facing) direction val inputFaces = listOf(BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN) .filter { it != facing } @@ -79,12 +45,19 @@ class PowerMerger(location: Location, override val facing: BlockFace) : PowerBlo if (pulled > 0) { addPower(pulled) plugin.logger.atlasInfo( - """ - PowerMerger at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ} pulled ${'$'}pulled power from ${'$'}{source::class.simpleName} at ${'$'}{face.name} (now ${'$'}currentPower/${'$'}maxStorage) - """.trimIndent(), + "PowerMerger at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled $pulled power from ${source::class.simpleName} at ${face.name} " + + "(now $currentPower/$maxStorage)", ) } } } + + updatePoweredState() + } + + private fun updatePoweredState() { + val shouldBePowered = currentPower > 0 + CraftEngineHelper.setBooleanProperty(location, "powered", shouldBePowered) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/power/block/SmallBattery.kt b/src/main/kotlin/com/coderjoe/atlas/power/block/SmallBattery.kt index 2a6436e..e080bb4 100644 --- a/src/main/kotlin/com/coderjoe/atlas/power/block/SmallBattery.kt +++ b/src/main/kotlin/com/coderjoe/atlas/power/block/SmallBattery.kt @@ -15,17 +15,10 @@ class SmallBattery(location: Location, facing: BlockFace) : PowerBlock(location, override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "small_battery" - - val CHARGE_VARIANT_IDS = - mapOf( - 0 to "small_battery", - 1 to "small_battery_low", - 2 to "small_battery_medium", - 3 to "small_battery_full", - ) - - val ALL_VARIANT_IDS: List = CHARGE_VARIANT_IDS.values.toList() + const val BLOCK_ID = "atlas:small_battery" + const val BLOCK_ID_LOW = "atlas:small_battery_low" + const val BLOCK_ID_MEDIUM = "atlas:small_battery_medium" + const val BLOCK_ID_FULL = "atlas:small_battery_full" val descriptor = BlockDescriptor( @@ -33,8 +26,7 @@ class SmallBattery(location: Location, facing: BlockFace) : PowerBlock(location, displayName = "Small Battery", description = "Storage - holds up to 10 power", placementType = PlacementType.SIMPLE, - directionalVariants = emptyMap(), - allRegistrableIds = ALL_VARIANT_IDS, + additionalBlockIds = listOf(BLOCK_ID_LOW, BLOCK_ID_MEDIUM, BLOCK_ID_FULL), constructor = { loc, facing -> SmallBattery(loc, facing) }, ) } @@ -49,13 +41,18 @@ class SmallBattery(location: Location, facing: BlockFace) : PowerBlock(location, else -> 3 } - override fun getVisualStateBlockId(): String = CHARGE_VARIANT_IDS[chargeLevel()]!! + override fun getVisualStateBlockId(): String = + when (chargeLevel()) { + 0 -> BLOCK_ID + 1 -> BLOCK_ID_LOW + 2 -> BLOCK_ID_MEDIUM + else -> BLOCK_ID_FULL + } override fun powerUpdate() { if (!canAcceptPower()) return val registry = PowerBlockRegistry.instance ?: return - // Pull from behind (opposite of facing), same as power cables val source = registry.getAdjacentPowerBlock(location, facing.oppositeFace) if (source != null && canAcceptPower() && source.hasPower()) { @@ -63,9 +60,8 @@ class SmallBattery(location: Location, facing: BlockFace) : PowerBlock(location, if (pulled > 0) { addPower(pulled) plugin.logger.atlasInfo( - """ - SmallBattery at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ} pulled ${'$'}pulled power from ${'$'}{source::class.simpleName} (now ${'$'}currentPower/${'$'}maxStorage) - """.trimIndent(), + "SmallBattery at ${location.blockX},${location.blockY},${location.blockZ} " + + "pulled $pulled power from ${source::class.simpleName} (now $currentPower/$maxStorage)", ) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/power/block/SmallSolarPanel.kt b/src/main/kotlin/com/coderjoe/atlas/power/block/SmallSolarPanel.kt index 9a70dda..f8e9629 100644 --- a/src/main/kotlin/com/coderjoe/atlas/power/block/SmallSolarPanel.kt +++ b/src/main/kotlin/com/coderjoe/atlas/power/block/SmallSolarPanel.kt @@ -11,7 +11,8 @@ class SmallSolarPanel(location: Location) : PowerBlock(location, maxStorage = 1) override val updateIntervalTicks: Long = 1200L companion object { - const val BLOCK_ID = "small_solar_panel" + const val BLOCK_ID = "atlas:small_solar_panel" + const val BLOCK_ID_FULL = "atlas:small_solar_panel_full" val descriptor = BlockDescriptor( @@ -19,8 +20,7 @@ class SmallSolarPanel(location: Location) : PowerBlock(location, maxStorage = 1) displayName = "Small Solar Panel", description = "Generator - produces 1 power/min during daytime", placementType = PlacementType.SIMPLE, - directionalVariants = emptyMap(), - allRegistrableIds = listOf(BLOCK_ID), + additionalBlockIds = listOf(BLOCK_ID_FULL), constructor = { loc, _ -> SmallSolarPanel(loc) }, ) } @@ -29,8 +29,8 @@ class SmallSolarPanel(location: Location) : PowerBlock(location, maxStorage = 1) override fun getVisualStateBlockId(): String = when (currentPower) { - 0 -> "small_solar_panel" - else -> "small_solar_panel_full" + 0 -> BLOCK_ID + else -> BLOCK_ID_FULL } override fun powerUpdate() { @@ -41,19 +41,15 @@ class SmallSolarPanel(location: Location) : PowerBlock(location, maxStorage = 1) val generated = addPower(1) if (generated > 0) { plugin.logger.atlasInfo( - """ - SmallSolarPanel at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ} generated ${'$'}generated power (now ${'$'}currentPower/${'$'}maxStorage) - """.trimIndent(), + "SmallSolarPanel at ${location.blockX},${location.blockY},${location.blockZ} " + + "generated $generated power (now $currentPower/$maxStorage)", ) } } else { plugin.logger.atlasInfo( - """ - SmallSolarPanel at ${'$'}{location.blockX},${'$'}{location.blockY},${'$'}{location.blockZ} is not generating power because it is not daytime. - """.trimIndent(), + "SmallSolarPanel at ${location.blockX},${location.blockY},${location.blockZ} " + + "is not generating power because it is not daytime.", ) } - - // TODO: Implement power transfer to connected blocks } } diff --git a/src/main/kotlin/com/coderjoe/atlas/transport/block/ConveyorBelt.kt b/src/main/kotlin/com/coderjoe/atlas/transport/block/ConveyorBelt.kt index ad76572..aec8a9a 100644 --- a/src/main/kotlin/com/coderjoe/atlas/transport/block/ConveyorBelt.kt +++ b/src/main/kotlin/com/coderjoe/atlas/transport/block/ConveyorBelt.kt @@ -9,29 +9,15 @@ import org.bukkit.entity.Item class ConveyorBelt(location: Location, override val facing: BlockFace) : TransportBlock(location) { companion object { - const val BLOCK_ID = "conveyor_belt" + const val BLOCK_ID = "atlas:conveyor_belt" private const val MOVE_DISTANCE = 1.0 - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "conveyor_belt_north", - BlockFace.SOUTH to "conveyor_belt_south", - BlockFace.EAST to "conveyor_belt_east", - BlockFace.WEST to "conveyor_belt_west", - ) - - val ID_TO_FACING = DIRECTIONAL_IDS.entries.associate { (face, id) -> id to face } - - fun facingFromBlockId(blockId: String): BlockFace? = ID_TO_FACING[blockId] - val descriptor = BlockDescriptor( baseBlockId = BLOCK_ID, displayName = "Conveyor Belt", description = "Moves items forward in the facing direction", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = DIRECTIONAL_IDS.values.toList(), constructor = { loc, face -> ConveyorBelt(loc, face) }, ) } @@ -40,12 +26,11 @@ class ConveyorBelt(location: Location, override val facing: BlockFace) : Transpo override val updateIntervalTicks: Long = 20L - override fun getVisualStateBlockId(): String = DIRECTIONAL_IDS[facing]!! + override fun getVisualStateBlockId(): String = BLOCK_ID override fun transportUpdate() { val world = location.world ?: return - // Belt surface is at y + 6/16 (0.375), scan items resting on top val scanCenter = location.clone().add(0.5, 0.75, 0.5) val nearbyItems = world.getNearbyEntities(scanCenter, 0.5, 0.75, 0.5) diff --git a/src/main/kotlin/com/coderjoe/atlas/utility/block/AutoSmelter.kt b/src/main/kotlin/com/coderjoe/atlas/utility/block/AutoSmelter.kt index 460e697..20a0d53 100644 --- a/src/main/kotlin/com/coderjoe/atlas/utility/block/AutoSmelter.kt +++ b/src/main/kotlin/com/coderjoe/atlas/utility/block/AutoSmelter.kt @@ -1,6 +1,7 @@ package com.coderjoe.atlas.utility.block import com.coderjoe.atlas.core.BlockDescriptor +import com.coderjoe.atlas.core.CraftEngineHelper import com.coderjoe.atlas.core.PlacementType import com.coderjoe.atlas.power.PowerBlock import com.coderjoe.atlas.power.PowerBlockRegistry @@ -21,44 +22,16 @@ class AutoSmelter(location: Location, facing: BlockFace = BlockFace.NORTH) : Pow override val facing: BlockFace get() = direction companion object { - const val BLOCK_ID = "auto_smelter" + const val BLOCK_ID = "atlas:auto_smelter" const val POWER_PER_SMELT = 2 private const val MOVE_DISTANCE = 1.0 - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "auto_smelter_north", - BlockFace.SOUTH to "auto_smelter_south", - BlockFace.EAST to "auto_smelter_east", - BlockFace.WEST to "auto_smelter_west", - ) - - val POWERED_IDS = - mapOf( - BlockFace.NORTH to "auto_smelter_north_on", - BlockFace.SOUTH to "auto_smelter_south_on", - BlockFace.EAST to "auto_smelter_east_on", - BlockFace.WEST to "auto_smelter_west_on", - ) - - val ID_TO_FACING: Map = - buildMap { - DIRECTIONAL_IDS.forEach { (face, id) -> put(id, face) } - POWERED_IDS.forEach { (face, id) -> put(id, face) } - } - - val ALL_VARIANT_IDS: List = DIRECTIONAL_IDS.values.toList() + POWERED_IDS.values.toList() - - fun facingFromBlockId(blockId: String): BlockFace? = ID_TO_FACING[blockId] - val descriptor = BlockDescriptor( baseBlockId = BLOCK_ID, displayName = "Auto Smelter", description = "Smelts items passing through, consumes 2 power per item", placementType = PlacementType.DIRECTIONAL, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = ALL_VARIANT_IDS, constructor = { loc, face -> AutoSmelter(loc, face) }, ) @@ -74,16 +47,9 @@ class AutoSmelter(location: Location, facing: BlockFace = BlockFace.NORTH) : Pow } } - override fun getVisualStateBlockId(): String { - return if (hasPower()) { - POWERED_IDS[direction]!! - } else { - DIRECTIONAL_IDS[direction]!! - } - } + override fun getVisualStateBlockId(): String = BLOCK_ID override fun powerUpdate() { - // Pull power from adjacent blocks if (canAcceptPower()) { val registry = PowerBlockRegistry.instance ?: return val neighbors = registry.getAdjacentPowerBlocks(location) @@ -100,7 +66,6 @@ class AutoSmelter(location: Location, facing: BlockFace = BlockFace.NORTH) : Pow val world = location.world ?: return - // Scan for items on the belt surface (same as conveyor belt) val scanCenter = location.clone().add(0.5, 0.75, 0.5) val nearbyItems = world.getNearbyEntities(scanCenter, 0.5, 0.75, 0.5) @@ -112,7 +77,6 @@ class AutoSmelter(location: Location, facing: BlockFace = BlockFace.NORTH) : Pow val dz = direction.direction.z * MOVE_DISTANCE for (item in nearbyItems) { - // Try to smelt the item if we have power if (currentPower >= POWER_PER_SMELT) { val result = getSmeltingResult(item.itemStack) if (result != null) { @@ -123,8 +87,14 @@ class AutoSmelter(location: Location, facing: BlockFace = BlockFace.NORTH) : Pow } } - // Always move items forward (conveyor belt behavior) item.teleportAsync(item.location.add(dx, 0.0, dz)) } + + updatePoweredState() + } + + private fun updatePoweredState() { + val shouldBePowered = hasPower() + CraftEngineHelper.setBooleanProperty(location, "powered", shouldBePowered) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/utility/block/CobblestoneFactory.kt b/src/main/kotlin/com/coderjoe/atlas/utility/block/CobblestoneFactory.kt index 7210a1f..5376df4 100644 --- a/src/main/kotlin/com/coderjoe/atlas/utility/block/CobblestoneFactory.kt +++ b/src/main/kotlin/com/coderjoe/atlas/utility/block/CobblestoneFactory.kt @@ -21,8 +21,8 @@ class CobblestoneFactory(location: Location) : PowerBlock(location, maxStorage = override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "cobblestone_factory" - const val BLOCK_ID_ACTIVE = "cobblestone_factory_active" + const val BLOCK_ID = "atlas:cobblestone_factory" + const val BLOCK_ID_ACTIVE = "atlas:cobblestone_factory_active" const val POWER_COST = 2 private val ADJACENT_FACES = @@ -41,8 +41,7 @@ class CobblestoneFactory(location: Location) : PowerBlock(location, maxStorage = displayName = "Cobblestone Factory", description = "Machine - consumes $POWER_COST power + water + lava → cobblestone", placementType = PlacementType.SIMPLE, - directionalVariants = emptyMap(), - allRegistrableIds = listOf(BLOCK_ID, BLOCK_ID_ACTIVE), + additionalBlockIds = listOf(BLOCK_ID_ACTIVE), constructor = { loc, _ -> CobblestoneFactory(loc) }, ) } @@ -56,7 +55,6 @@ class CobblestoneFactory(location: Location) : PowerBlock(location, maxStorage = } override fun powerUpdate() { - // Pull power from adjacent blocks if (canAcceptPower()) { val registry = PowerBlockRegistry.instance ?: return val neighbors = registry.getAdjacentPowerBlocks(location) @@ -75,7 +73,6 @@ class CobblestoneFactory(location: Location) : PowerBlock(location, maxStorage = val fluidRegistry = FluidBlockRegistry.instance ?: return - // Check that BOTH water and lava are available before consuming either var waterSource: Pair? = null var lavaSource: Pair? = null @@ -91,16 +88,17 @@ class CobblestoneFactory(location: Location) : PowerBlock(location, maxStorage = if (waterSource == null || lavaSource == null) return - // Both available — consume atomically pullFluid(waterSource.first, waterSource.second) pullFluid(lavaSource.first, lavaSource.second) removePower(POWER_COST) val world = location.world ?: return - val dropLocation = location.clone().add(0.5, 1.0, 0.5) - world.dropItemNaturally(dropLocation, ItemStack(Material.COBBLESTONE)) + val dropLocation = location.clone().add(0.5, 1.5, 0.5) + world.dropItem(dropLocation, ItemStack(Material.COBBLESTONE)) - plugin.logger.atlasInfo("CobblestoneFactory at ${location.blockX},${location.blockY},${location.blockZ} produced 1 cobblestone") + plugin.logger.atlasInfo( + "CobblestoneFactory at ${location.blockX},${location.blockY},${location.blockZ} produced 1 cobblestone", + ) } private fun hasFluidAvailable( diff --git a/src/main/kotlin/com/coderjoe/atlas/utility/block/ObsidianFactory.kt b/src/main/kotlin/com/coderjoe/atlas/utility/block/ObsidianFactory.kt index f001a97..ad724a8 100644 --- a/src/main/kotlin/com/coderjoe/atlas/utility/block/ObsidianFactory.kt +++ b/src/main/kotlin/com/coderjoe/atlas/utility/block/ObsidianFactory.kt @@ -21,8 +21,8 @@ class ObsidianFactory(location: Location) : PowerBlock(location, maxStorage = 10 override val updateIntervalTicks: Long = 20L companion object { - const val BLOCK_ID = "obsidian_factory" - const val BLOCK_ID_ACTIVE = "obsidian_factory_active" + const val BLOCK_ID = "atlas:obsidian_factory" + const val BLOCK_ID_ACTIVE = "atlas:obsidian_factory_active" const val POWER_COST = 100 private val ADJACENT_FACES = @@ -41,8 +41,7 @@ class ObsidianFactory(location: Location) : PowerBlock(location, maxStorage = 10 displayName = "Obsidian Factory", description = "Machine - consumes $POWER_COST power + water + lava → obsidian", placementType = PlacementType.SIMPLE, - directionalVariants = emptyMap(), - allRegistrableIds = listOf(BLOCK_ID, BLOCK_ID_ACTIVE), + additionalBlockIds = listOf(BLOCK_ID_ACTIVE), constructor = { loc, _ -> ObsidianFactory(loc) }, ) } @@ -56,7 +55,6 @@ class ObsidianFactory(location: Location) : PowerBlock(location, maxStorage = 10 } override fun powerUpdate() { - // Pull power from adjacent blocks if (canAcceptPower()) { val registry = PowerBlockRegistry.instance ?: return val neighbors = registry.getAdjacentPowerBlocks(location) @@ -75,7 +73,6 @@ class ObsidianFactory(location: Location) : PowerBlock(location, maxStorage = 10 val fluidRegistry = FluidBlockRegistry.instance ?: return - // Check that BOTH water and lava are available before consuming either var waterSource: Pair? = null var lavaSource: Pair? = null @@ -91,16 +88,17 @@ class ObsidianFactory(location: Location) : PowerBlock(location, maxStorage = 10 if (waterSource == null || lavaSource == null) return - // Both available — consume atomically pullFluid(waterSource.first, waterSource.second) pullFluid(lavaSource.first, lavaSource.second) removePower(POWER_COST) val world = location.world ?: return - val dropLocation = location.clone().add(0.5, 1.0, 0.5) - world.dropItemNaturally(dropLocation, ItemStack(Material.OBSIDIAN)) + val dropLocation = location.clone().add(0.5, 1.5, 0.5) + world.dropItem(dropLocation, ItemStack(Material.OBSIDIAN)) - plugin.logger.atlasInfo("ObsidianFactory at ${location.blockX},${location.blockY},${location.blockZ} produced 1 obsidian") + plugin.logger.atlasInfo( + "ObsidianFactory at ${location.blockX},${location.blockY},${location.blockZ} produced 1 obsidian", + ) } private fun hasFluidAvailable( diff --git a/src/main/kotlin/com/coderjoe/atlas/utility/block/SmallDrill.kt b/src/main/kotlin/com/coderjoe/atlas/utility/block/SmallDrill.kt index c716fc1..58822b5 100644 --- a/src/main/kotlin/com/coderjoe/atlas/utility/block/SmallDrill.kt +++ b/src/main/kotlin/com/coderjoe/atlas/utility/block/SmallDrill.kt @@ -16,29 +16,15 @@ class SmallDrill(location: Location, facing: BlockFace? = null) : PowerBlock(loc var enabled: Boolean = true companion object { - const val BLOCK_ID = "small_drill" + const val BLOCK_ID = "atlas:small_drill" private const val MAX_HORIZONTAL_RANGE = 64 - val DIRECTIONAL_IDS = - mapOf( - BlockFace.NORTH to "small_drill_north", - BlockFace.SOUTH to "small_drill_south", - BlockFace.EAST to "small_drill_east", - BlockFace.WEST to "small_drill_west", - BlockFace.UP to "small_drill_up", - BlockFace.DOWN to "small_drill_down", - ) - - val ALL_DIRECTIONAL_IDS: List = DIRECTIONAL_IDS.values.toList() - val descriptor = BlockDescriptor( baseBlockId = BLOCK_ID, displayName = "Small Drill", description = "Machine - consumes 10 power/s", placementType = PlacementType.DIRECTIONAL_OPPOSITE, - directionalVariants = DIRECTIONAL_IDS, - allRegistrableIds = ALL_DIRECTIONAL_IDS, constructor = { loc, facing -> SmallDrill(loc, facing) }, ) } @@ -46,7 +32,7 @@ class SmallDrill(location: Location, facing: BlockFace? = null) : PowerBlock(loc override val baseBlockId: String = BLOCK_ID override val facing: BlockFace get() = miningDirection - override fun getVisualStateBlockId(): String = DIRECTIONAL_IDS[miningDirection] ?: BLOCK_ID + override fun getVisualStateBlockId(): String = BLOCK_ID fun toggleEnabled() { enabled = !enabled @@ -55,7 +41,6 @@ class SmallDrill(location: Location, facing: BlockFace? = null) : PowerBlock(loc override fun powerUpdate() { if (!enabled) return - // Pull power from adjacent blocks if (canAcceptPower()) { val registry = PowerBlockRegistry.instance ?: return val neighbors = registry.getAdjacentPowerBlocks(location) diff --git a/src/main/resources/atlas/configuration/auto_smelter.yml b/src/main/resources/atlas/configuration/auto_smelter.yml new file mode 100644 index 0000000..df86df8 --- /dev/null +++ b/src/main/resources/atlas/configuration/auto_smelter.yml @@ -0,0 +1,171 @@ +items: + atlas:auto_smelter: + material: paper + data: + item-name: "Auto Smelter" + model: minecraft:block/custom/auto_smelter + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: horizontal_direction + default: north + powered: + type: boolean + default: false + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_front + south: minecraft:block/custom/auto_smelter_back + east: minecraft:block/custom/auto_smelter_side + west: minecraft:block/custom/auto_smelter_side + up: minecraft:block/custom/auto_smelter_top_north + down: minecraft:block/custom/auto_smelter_housing + south: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter_south + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_back + south: minecraft:block/custom/auto_smelter_front + east: minecraft:block/custom/auto_smelter_side + west: minecraft:block/custom/auto_smelter_side + up: minecraft:block/custom/auto_smelter_top_south + down: minecraft:block/custom/auto_smelter_housing + east: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter_east + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_side + south: minecraft:block/custom/auto_smelter_side + east: minecraft:block/custom/auto_smelter_front + west: minecraft:block/custom/auto_smelter_back + up: minecraft:block/custom/auto_smelter_top_east + down: minecraft:block/custom/auto_smelter_housing + west: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter_west + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_side + south: minecraft:block/custom/auto_smelter_side + east: minecraft:block/custom/auto_smelter_back + west: minecraft:block/custom/auto_smelter_front + up: minecraft:block/custom/auto_smelter_top_west + down: minecraft:block/custom/auto_smelter_housing + north_powered: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_front + south: minecraft:block/custom/auto_smelter_back + east: minecraft:block/custom/auto_smelter_side + west: minecraft:block/custom/auto_smelter_side + up: minecraft:block/custom/auto_smelter_fire + down: minecraft:block/custom/auto_smelter_housing + south_powered: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter_south_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_back + south: minecraft:block/custom/auto_smelter_front + east: minecraft:block/custom/auto_smelter_side + west: minecraft:block/custom/auto_smelter_side + up: minecraft:block/custom/auto_smelter_fire + down: minecraft:block/custom/auto_smelter_housing + east_powered: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter_east_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_side + south: minecraft:block/custom/auto_smelter_side + east: minecraft:block/custom/auto_smelter_front + west: minecraft:block/custom/auto_smelter_back + up: minecraft:block/custom/auto_smelter_fire + down: minecraft:block/custom/auto_smelter_housing + west_powered: + auto-state: solid + model: + path: minecraft:block/custom/auto_smelter_west_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/auto_smelter_side + south: minecraft:block/custom/auto_smelter_side + east: minecraft:block/custom/auto_smelter_back + west: minecraft:block/custom/auto_smelter_front + up: minecraft:block/custom/auto_smelter_fire + down: minecraft:block/custom/auto_smelter_housing + variants: + facing=north,powered=false: + appearance: north + facing=south,powered=false: + appearance: south + facing=east,powered=false: + appearance: east + facing=west,powered=false: + appearance: west + facing=north,powered=true: + appearance: north_powered + facing=south,powered=true: + appearance: south_powered + facing=east,powered=true: + appearance: east_powered + facing=west,powered=true: + appearance: west_powered + +recipes: + atlas:auto_smelter: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + - minecraft:furnace + result: + id: atlas:auto_smelter + count: 1 diff --git a/src/main/resources/atlas/configuration/cobblestone_factory.yml b/src/main/resources/atlas/configuration/cobblestone_factory.yml new file mode 100644 index 0000000..b70170d --- /dev/null +++ b/src/main/resources/atlas/configuration/cobblestone_factory.yml @@ -0,0 +1,90 @@ +items: + atlas:cobblestone_factory: + material: paper + data: + item-name: "Cobblestone Factory" + model: minecraft:block/custom/cobblestone_factory + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/cobblestone_factory + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/cobblestone_factory_top + bottom: minecraft:block/custom/cobblestone_factory_bottom + side: minecraft:block/custom/cobblestone_factory_side + +items#1: + atlas:cobblestone_factory_active: + material: paper + data: + item-name: "Cobblestone Factory" + model: minecraft:block/custom/cobblestone_factory_active + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:cobblestone_factory + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/cobblestone_factory_active + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/cobblestone_factory_top_active + bottom: minecraft:block/custom/cobblestone_factory_bottom + side: minecraft:block/custom/cobblestone_factory_side_active + +recipes: + atlas:cobblestone_factory: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + - minecraft:cobblestone + result: + id: atlas:cobblestone_factory + count: 1 diff --git a/src/main/resources/atlas/configuration/conveyor_belt.yml b/src/main/resources/atlas/configuration/conveyor_belt.yml new file mode 100644 index 0000000..bc52cf6 --- /dev/null +++ b/src/main/resources/atlas/configuration/conveyor_belt.yml @@ -0,0 +1,107 @@ +items: + atlas:conveyor_belt: + material: paper + data: + item-name: "Conveyor Belt" + model: minecraft:block/custom/conveyor_belt + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 2.0 + resistance: 2.0 + is-suffocating: false + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: horizontal_direction + default: north + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/conveyor_belt + generation: + parent: minecraft:block/custom/conveyor_belt_base + textures: + north: minecraft:block/custom/conveyor_belt_front + south: minecraft:block/custom/conveyor_belt_back + east: minecraft:block/custom/conveyor_belt_side + west: minecraft:block/custom/conveyor_belt_side + up: minecraft:block/custom/conveyor_belt_top_north + down: minecraft:block/custom/conveyor_belt_bottom + south: + auto-state: solid + model: + path: minecraft:block/custom/conveyor_belt_south + generation: + parent: minecraft:block/custom/conveyor_belt_base + textures: + north: minecraft:block/custom/conveyor_belt_back + south: minecraft:block/custom/conveyor_belt_front + east: minecraft:block/custom/conveyor_belt_side + west: minecraft:block/custom/conveyor_belt_side + up: minecraft:block/custom/conveyor_belt_top_south + down: minecraft:block/custom/conveyor_belt_bottom + east: + auto-state: solid + model: + path: minecraft:block/custom/conveyor_belt_east + generation: + parent: minecraft:block/custom/conveyor_belt_base + textures: + north: minecraft:block/custom/conveyor_belt_side + south: minecraft:block/custom/conveyor_belt_side + east: minecraft:block/custom/conveyor_belt_front + west: minecraft:block/custom/conveyor_belt_back + up: minecraft:block/custom/conveyor_belt_top_east + down: minecraft:block/custom/conveyor_belt_bottom + west: + auto-state: solid + model: + path: minecraft:block/custom/conveyor_belt_west + generation: + parent: minecraft:block/custom/conveyor_belt_base + textures: + north: minecraft:block/custom/conveyor_belt_side + south: minecraft:block/custom/conveyor_belt_side + east: minecraft:block/custom/conveyor_belt_back + west: minecraft:block/custom/conveyor_belt_front + up: minecraft:block/custom/conveyor_belt_top_west + down: minecraft:block/custom/conveyor_belt_bottom + variants: + facing=north: + appearance: north + facing=south: + appearance: south + facing=east: + appearance: east + facing=west: + appearance: west + +recipes: + atlas:conveyor_belt: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + result: + id: atlas:conveyor_belt + count: 4 diff --git a/src/main/resources/atlas/configuration/fluid_container.yml b/src/main/resources/atlas/configuration/fluid_container.yml new file mode 100644 index 0000000..d75c6e4 --- /dev/null +++ b/src/main/resources/atlas/configuration/fluid_container.yml @@ -0,0 +1,580 @@ +items: + atlas:fluid_container: + material: paper + data: + item-name: "Fluid Container" + model: minecraft:block/custom/fluid_container + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: false + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: direction + default: north + fluid: + type: string + values: [none, water, lava] + default: none + fill_level: + type: int + range: 0~3 + default: 0 + appearances: + north: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_front + south: minecraft:block/custom/fluid_container_back + east: minecraft:block/custom/fluid_container_side + west: minecraft:block/custom/fluid_container_side + up: minecraft:block/custom/fluid_container_top + down: minecraft:block/custom/fluid_container_top + south: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container + y: 180 + east: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container + y: 90 + west: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container + y: 270 + up: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_up + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side + south: minecraft:block/custom/fluid_container_side + east: minecraft:block/custom/fluid_container_side + west: minecraft:block/custom/fluid_container_side + up: minecraft:block/custom/fluid_container_front + down: minecraft:block/custom/fluid_container_back + down: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_down + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side + south: minecraft:block/custom/fluid_container_side + east: minecraft:block/custom/fluid_container_side + west: minecraft:block/custom/fluid_container_side + up: minecraft:block/custom/fluid_container_back + down: minecraft:block/custom/fluid_container_front + north_water_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_low + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_front_water_low + south: minecraft:block/custom/fluid_container_back_water_low + east: minecraft:block/custom/fluid_container_side_water_low + west: minecraft:block/custom/fluid_container_side_water_low + up: minecraft:block/custom/fluid_container_top + down: minecraft:block/custom/fluid_container_top + south_water_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_low + y: 180 + east_water_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_low + y: 90 + west_water_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_low + y: 270 + up_water_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_up_water_low + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_water_low + south: minecraft:block/custom/fluid_container_side_water_low + east: minecraft:block/custom/fluid_container_side_water_low + west: minecraft:block/custom/fluid_container_side_water_low + up: minecraft:block/custom/fluid_container_front_water_low + down: minecraft:block/custom/fluid_container_back_water_low + down_water_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_down_water_low + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_water_low + south: minecraft:block/custom/fluid_container_side_water_low + east: minecraft:block/custom/fluid_container_side_water_low + west: minecraft:block/custom/fluid_container_side_water_low + up: minecraft:block/custom/fluid_container_back_water_low + down: minecraft:block/custom/fluid_container_front_water_low + north_water_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_medium + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_front_water_medium + south: minecraft:block/custom/fluid_container_back_water_medium + east: minecraft:block/custom/fluid_container_side_water_medium + west: minecraft:block/custom/fluid_container_side_water_medium + up: minecraft:block/custom/fluid_container_top + down: minecraft:block/custom/fluid_container_top + south_water_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_medium + y: 180 + east_water_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_medium + y: 90 + west_water_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_medium + y: 270 + up_water_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_up_water_medium + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_water_medium + south: minecraft:block/custom/fluid_container_side_water_medium + east: minecraft:block/custom/fluid_container_side_water_medium + west: minecraft:block/custom/fluid_container_side_water_medium + up: minecraft:block/custom/fluid_container_front_water_medium + down: minecraft:block/custom/fluid_container_back_water_medium + down_water_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_down_water_medium + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_water_medium + south: minecraft:block/custom/fluid_container_side_water_medium + east: minecraft:block/custom/fluid_container_side_water_medium + west: minecraft:block/custom/fluid_container_side_water_medium + up: minecraft:block/custom/fluid_container_back_water_medium + down: minecraft:block/custom/fluid_container_front_water_medium + north_water_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_full + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_front_water_full + south: minecraft:block/custom/fluid_container_back_water_full + east: minecraft:block/custom/fluid_container_side_water_full + west: minecraft:block/custom/fluid_container_side_water_full + up: minecraft:block/custom/fluid_container_top + down: minecraft:block/custom/fluid_container_top + south_water_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_full + y: 180 + east_water_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_full + y: 90 + west_water_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_water_full + y: 270 + up_water_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_up_water_full + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_water_full + south: minecraft:block/custom/fluid_container_side_water_full + east: minecraft:block/custom/fluid_container_side_water_full + west: minecraft:block/custom/fluid_container_side_water_full + up: minecraft:block/custom/fluid_container_front_water_full + down: minecraft:block/custom/fluid_container_back_water_full + down_water_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_down_water_full + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_water_full + south: minecraft:block/custom/fluid_container_side_water_full + east: minecraft:block/custom/fluid_container_side_water_full + west: minecraft:block/custom/fluid_container_side_water_full + up: minecraft:block/custom/fluid_container_back_water_full + down: minecraft:block/custom/fluid_container_front_water_full + north_lava_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_low + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_front_lava_low + south: minecraft:block/custom/fluid_container_back_lava_low + east: minecraft:block/custom/fluid_container_side_lava_low + west: minecraft:block/custom/fluid_container_side_lava_low + up: minecraft:block/custom/fluid_container_top + down: minecraft:block/custom/fluid_container_top + south_lava_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_low + y: 180 + east_lava_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_low + y: 90 + west_lava_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_low + y: 270 + up_lava_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_up_lava_low + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_lava_low + south: minecraft:block/custom/fluid_container_side_lava_low + east: minecraft:block/custom/fluid_container_side_lava_low + west: minecraft:block/custom/fluid_container_side_lava_low + up: minecraft:block/custom/fluid_container_front_lava_low + down: minecraft:block/custom/fluid_container_back_lava_low + down_lava_low: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_down_lava_low + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_lava_low + south: minecraft:block/custom/fluid_container_side_lava_low + east: minecraft:block/custom/fluid_container_side_lava_low + west: minecraft:block/custom/fluid_container_side_lava_low + up: minecraft:block/custom/fluid_container_back_lava_low + down: minecraft:block/custom/fluid_container_front_lava_low + north_lava_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_medium + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_front_lava_medium + south: minecraft:block/custom/fluid_container_back_lava_medium + east: minecraft:block/custom/fluid_container_side_lava_medium + west: minecraft:block/custom/fluid_container_side_lava_medium + up: minecraft:block/custom/fluid_container_top + down: minecraft:block/custom/fluid_container_top + south_lava_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_medium + y: 180 + east_lava_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_medium + y: 90 + west_lava_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_medium + y: 270 + up_lava_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_up_lava_medium + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_lava_medium + south: minecraft:block/custom/fluid_container_side_lava_medium + east: minecraft:block/custom/fluid_container_side_lava_medium + west: minecraft:block/custom/fluid_container_side_lava_medium + up: minecraft:block/custom/fluid_container_front_lava_medium + down: minecraft:block/custom/fluid_container_back_lava_medium + down_lava_medium: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_down_lava_medium + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_lava_medium + south: minecraft:block/custom/fluid_container_side_lava_medium + east: minecraft:block/custom/fluid_container_side_lava_medium + west: minecraft:block/custom/fluid_container_side_lava_medium + up: minecraft:block/custom/fluid_container_back_lava_medium + down: minecraft:block/custom/fluid_container_front_lava_medium + north_lava_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_full + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_front_lava_full + south: minecraft:block/custom/fluid_container_back_lava_full + east: minecraft:block/custom/fluid_container_side_lava_full + west: minecraft:block/custom/fluid_container_side_lava_full + up: minecraft:block/custom/fluid_container_top + down: minecraft:block/custom/fluid_container_top + south_lava_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_full + y: 180 + east_lava_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_full + y: 90 + west_lava_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_lava_full + y: 270 + up_lava_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_up_lava_full + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_lava_full + south: minecraft:block/custom/fluid_container_side_lava_full + east: minecraft:block/custom/fluid_container_side_lava_full + west: minecraft:block/custom/fluid_container_side_lava_full + up: minecraft:block/custom/fluid_container_front_lava_full + down: minecraft:block/custom/fluid_container_back_lava_full + down_lava_full: + auto-state: non_tintable_leaves + model: + path: minecraft:block/custom/fluid_container_down_lava_full + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_container_side_lava_full + south: minecraft:block/custom/fluid_container_side_lava_full + east: minecraft:block/custom/fluid_container_side_lava_full + west: minecraft:block/custom/fluid_container_side_lava_full + up: minecraft:block/custom/fluid_container_back_lava_full + down: minecraft:block/custom/fluid_container_front_lava_full + variants: + facing=north,fluid=none,fill_level=0: + appearance: north + facing=south,fluid=none,fill_level=0: + appearance: south + facing=east,fluid=none,fill_level=0: + appearance: east + facing=west,fluid=none,fill_level=0: + appearance: west + facing=up,fluid=none,fill_level=0: + appearance: up + facing=down,fluid=none,fill_level=0: + appearance: down + facing=north,fluid=water,fill_level=0: + appearance: north + facing=south,fluid=water,fill_level=0: + appearance: south + facing=east,fluid=water,fill_level=0: + appearance: east + facing=west,fluid=water,fill_level=0: + appearance: west + facing=up,fluid=water,fill_level=0: + appearance: up + facing=down,fluid=water,fill_level=0: + appearance: down + facing=north,fluid=lava,fill_level=0: + appearance: north + facing=south,fluid=lava,fill_level=0: + appearance: south + facing=east,fluid=lava,fill_level=0: + appearance: east + facing=west,fluid=lava,fill_level=0: + appearance: west + facing=up,fluid=lava,fill_level=0: + appearance: up + facing=down,fluid=lava,fill_level=0: + appearance: down + facing=north,fluid=none,fill_level=1: + appearance: north + facing=south,fluid=none,fill_level=1: + appearance: south + facing=east,fluid=none,fill_level=1: + appearance: east + facing=west,fluid=none,fill_level=1: + appearance: west + facing=up,fluid=none,fill_level=1: + appearance: up + facing=down,fluid=none,fill_level=1: + appearance: down + facing=north,fluid=none,fill_level=2: + appearance: north + facing=south,fluid=none,fill_level=2: + appearance: south + facing=east,fluid=none,fill_level=2: + appearance: east + facing=west,fluid=none,fill_level=2: + appearance: west + facing=up,fluid=none,fill_level=2: + appearance: up + facing=down,fluid=none,fill_level=2: + appearance: down + facing=north,fluid=none,fill_level=3: + appearance: north + facing=south,fluid=none,fill_level=3: + appearance: south + facing=east,fluid=none,fill_level=3: + appearance: east + facing=west,fluid=none,fill_level=3: + appearance: west + facing=up,fluid=none,fill_level=3: + appearance: up + facing=down,fluid=none,fill_level=3: + appearance: down + facing=north,fluid=water,fill_level=1: + appearance: north_water_low + facing=south,fluid=water,fill_level=1: + appearance: south_water_low + facing=east,fluid=water,fill_level=1: + appearance: east_water_low + facing=west,fluid=water,fill_level=1: + appearance: west_water_low + facing=up,fluid=water,fill_level=1: + appearance: up_water_low + facing=down,fluid=water,fill_level=1: + appearance: down_water_low + facing=north,fluid=water,fill_level=2: + appearance: north_water_medium + facing=south,fluid=water,fill_level=2: + appearance: south_water_medium + facing=east,fluid=water,fill_level=2: + appearance: east_water_medium + facing=west,fluid=water,fill_level=2: + appearance: west_water_medium + facing=up,fluid=water,fill_level=2: + appearance: up_water_medium + facing=down,fluid=water,fill_level=2: + appearance: down_water_medium + facing=north,fluid=water,fill_level=3: + appearance: north_water_full + facing=south,fluid=water,fill_level=3: + appearance: south_water_full + facing=east,fluid=water,fill_level=3: + appearance: east_water_full + facing=west,fluid=water,fill_level=3: + appearance: west_water_full + facing=up,fluid=water,fill_level=3: + appearance: up_water_full + facing=down,fluid=water,fill_level=3: + appearance: down_water_full + facing=north,fluid=lava,fill_level=1: + appearance: north_lava_low + facing=south,fluid=lava,fill_level=1: + appearance: south_lava_low + facing=east,fluid=lava,fill_level=1: + appearance: east_lava_low + facing=west,fluid=lava,fill_level=1: + appearance: west_lava_low + facing=up,fluid=lava,fill_level=1: + appearance: up_lava_low + facing=down,fluid=lava,fill_level=1: + appearance: down_lava_low + facing=north,fluid=lava,fill_level=2: + appearance: north_lava_medium + facing=south,fluid=lava,fill_level=2: + appearance: south_lava_medium + facing=east,fluid=lava,fill_level=2: + appearance: east_lava_medium + facing=west,fluid=lava,fill_level=2: + appearance: west_lava_medium + facing=up,fluid=lava,fill_level=2: + appearance: up_lava_medium + facing=down,fluid=lava,fill_level=2: + appearance: down_lava_medium + facing=north,fluid=lava,fill_level=3: + appearance: north_lava_full + facing=south,fluid=lava,fill_level=3: + appearance: south_lava_full + facing=east,fluid=lava,fill_level=3: + appearance: east_lava_full + facing=west,fluid=lava,fill_level=3: + appearance: west_lava_full + facing=up,fluid=lava,fill_level=3: + appearance: up_lava_full + facing=down,fluid=lava,fill_level=3: + appearance: down_lava_full + +recipes: + atlas:fluid_container: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:glass + - minecraft:glass + - minecraft:glass + - minecraft:glass + - minecraft:bucket + result: + id: atlas:fluid_container + count: 1 diff --git a/src/main/resources/atlas/configuration/fluid_merger.yml b/src/main/resources/atlas/configuration/fluid_merger.yml new file mode 100644 index 0000000..08f38d5 --- /dev/null +++ b/src/main/resources/atlas/configuration/fluid_merger.yml @@ -0,0 +1,248 @@ +items: + atlas:fluid_merger: + material: paper + data: + item-name: "Fluid Merger" + model: minecraft:block/custom/fluid_merger + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 2.0 + resistance: 2.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: direction + default: north + fluid: + type: string + values: [none, water, lava] + default: none + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_front + south: minecraft:block/custom/fluid_merger_back + east: minecraft:block/custom/fluid_merger_side + west: minecraft:block/custom/fluid_merger_side + up: minecraft:block/custom/fluid_merger_top + down: minecraft:block/custom/fluid_merger_bottom + south: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger + y: 180 + east: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger + y: 90 + west: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger + y: 270 + up: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_up + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_side + south: minecraft:block/custom/fluid_merger_side + east: minecraft:block/custom/fluid_merger_side + west: minecraft:block/custom/fluid_merger_side + up: minecraft:block/custom/fluid_merger_front + down: minecraft:block/custom/fluid_merger_back + down: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_down + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_side + south: minecraft:block/custom/fluid_merger_side + east: minecraft:block/custom/fluid_merger_side + west: minecraft:block/custom/fluid_merger_side + up: minecraft:block/custom/fluid_merger_back + down: minecraft:block/custom/fluid_merger_front + north_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_water + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_front_water + south: minecraft:block/custom/fluid_merger_back_water + east: minecraft:block/custom/fluid_merger_side_water + west: minecraft:block/custom/fluid_merger_side_water + up: minecraft:block/custom/fluid_merger_top_water + down: minecraft:block/custom/fluid_merger_bottom_water + south_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_water + y: 180 + east_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_water + y: 90 + west_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_water + y: 270 + up_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_up_water + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_side_water + south: minecraft:block/custom/fluid_merger_side_water + east: minecraft:block/custom/fluid_merger_side_water + west: minecraft:block/custom/fluid_merger_side_water + up: minecraft:block/custom/fluid_merger_front_water + down: minecraft:block/custom/fluid_merger_back_water + down_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_down_water + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_side_water + south: minecraft:block/custom/fluid_merger_side_water + east: minecraft:block/custom/fluid_merger_side_water + west: minecraft:block/custom/fluid_merger_side_water + up: minecraft:block/custom/fluid_merger_back_water + down: minecraft:block/custom/fluid_merger_front_water + north_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_lava + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_front_lava + south: minecraft:block/custom/fluid_merger_back_lava + east: minecraft:block/custom/fluid_merger_side_lava + west: minecraft:block/custom/fluid_merger_side_lava + up: minecraft:block/custom/fluid_merger_top_lava + down: minecraft:block/custom/fluid_merger_bottom_lava + south_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_lava + y: 180 + east_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_lava + y: 90 + west_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_lava + y: 270 + up_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_up_lava + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_side_lava + south: minecraft:block/custom/fluid_merger_side_lava + east: minecraft:block/custom/fluid_merger_side_lava + west: minecraft:block/custom/fluid_merger_side_lava + up: minecraft:block/custom/fluid_merger_front_lava + down: minecraft:block/custom/fluid_merger_back_lava + down_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_merger_down_lava + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_merger_side_lava + south: minecraft:block/custom/fluid_merger_side_lava + east: minecraft:block/custom/fluid_merger_side_lava + west: minecraft:block/custom/fluid_merger_side_lava + up: minecraft:block/custom/fluid_merger_back_lava + down: minecraft:block/custom/fluid_merger_front_lava + variants: + facing=north,fluid=none: + appearance: north + facing=south,fluid=none: + appearance: south + facing=east,fluid=none: + appearance: east + facing=west,fluid=none: + appearance: west + facing=up,fluid=none: + appearance: up + facing=down,fluid=none: + appearance: down + facing=north,fluid=water: + appearance: north_water + facing=south,fluid=water: + appearance: south_water + facing=east,fluid=water: + appearance: east_water + facing=west,fluid=water: + appearance: west_water + facing=up,fluid=water: + appearance: up_water + facing=down,fluid=water: + appearance: down_water + facing=north,fluid=lava: + appearance: north_lava + facing=south,fluid=lava: + appearance: south_lava + facing=east,fluid=lava: + appearance: east_lava + facing=west,fluid=lava: + appearance: west_lava + facing=up,fluid=lava: + appearance: up_lava + facing=down,fluid=lava: + appearance: down_lava + +recipes: + atlas:fluid_merger: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:bucket + result: + id: atlas:fluid_merger + count: 1 diff --git a/src/main/resources/atlas/configuration/fluid_pipe.yml b/src/main/resources/atlas/configuration/fluid_pipe.yml new file mode 100644 index 0000000..d4dff9d --- /dev/null +++ b/src/main/resources/atlas/configuration/fluid_pipe.yml @@ -0,0 +1,244 @@ +items: + atlas:fluid_pipe: + material: paper + data: + item-name: "Fluid Pipe" + model: minecraft:block/custom/fluid_pipe + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 2.0 + resistance: 2.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: direction + default: north + fluid: + type: string + values: [none, water, lava] + default: none + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_front + south: minecraft:block/custom/fluid_pipe_back + east: minecraft:block/custom/fluid_pipe_side_right + west: minecraft:block/custom/fluid_pipe_side_left + up: minecraft:block/custom/fluid_pipe_side_up + down: minecraft:block/custom/fluid_pipe_side_down + south: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe + y: 180 + east: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe + y: 90 + west: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe + y: 270 + up: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_up + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_side_up + south: minecraft:block/custom/fluid_pipe_side_down + east: minecraft:block/custom/fluid_pipe_side_right + west: minecraft:block/custom/fluid_pipe_side_left + up: minecraft:block/custom/fluid_pipe_front + down: minecraft:block/custom/fluid_pipe_back + down: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_down + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_side_down + south: minecraft:block/custom/fluid_pipe_side_up + east: minecraft:block/custom/fluid_pipe_side_right + west: minecraft:block/custom/fluid_pipe_side_left + up: minecraft:block/custom/fluid_pipe_back + down: minecraft:block/custom/fluid_pipe_front + north_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_water + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_front_filled + south: minecraft:block/custom/fluid_pipe_back_filled + east: minecraft:block/custom/fluid_pipe_side_filled_right + west: minecraft:block/custom/fluid_pipe_side_filled_left + up: minecraft:block/custom/fluid_pipe_side_filled_up + down: minecraft:block/custom/fluid_pipe_side_filled_down + south_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_water + y: 180 + east_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_water + y: 90 + west_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_water + y: 270 + up_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_up_water + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_side_filled_up + south: minecraft:block/custom/fluid_pipe_side_filled_down + east: minecraft:block/custom/fluid_pipe_side_filled_right + west: minecraft:block/custom/fluid_pipe_side_filled_left + up: minecraft:block/custom/fluid_pipe_front_filled + down: minecraft:block/custom/fluid_pipe_back_filled + down_water: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_down_water + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_side_filled_down + south: minecraft:block/custom/fluid_pipe_side_filled_up + east: minecraft:block/custom/fluid_pipe_side_filled_right + west: minecraft:block/custom/fluid_pipe_side_filled_left + up: minecraft:block/custom/fluid_pipe_back_filled + down: minecraft:block/custom/fluid_pipe_front_filled + north_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_lava + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_front_filled_lava + south: minecraft:block/custom/fluid_pipe_back_filled_lava + east: minecraft:block/custom/fluid_pipe_side_filled_lava_right + west: minecraft:block/custom/fluid_pipe_side_filled_lava_left + up: minecraft:block/custom/fluid_pipe_side_filled_lava_up + down: minecraft:block/custom/fluid_pipe_side_filled_lava_down + south_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_lava + y: 180 + east_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_lava + y: 90 + west_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_lava + y: 270 + up_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_up_lava + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_side_filled_lava_up + south: minecraft:block/custom/fluid_pipe_side_filled_lava_down + east: minecraft:block/custom/fluid_pipe_side_filled_lava_right + west: minecraft:block/custom/fluid_pipe_side_filled_lava_left + up: minecraft:block/custom/fluid_pipe_front_filled_lava + down: minecraft:block/custom/fluid_pipe_back_filled_lava + down_lava: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pipe_down_lava + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/fluid_pipe_side_filled_lava_down + south: minecraft:block/custom/fluid_pipe_side_filled_lava_up + east: minecraft:block/custom/fluid_pipe_side_filled_lava_right + west: minecraft:block/custom/fluid_pipe_side_filled_lava_left + up: minecraft:block/custom/fluid_pipe_back_filled_lava + down: minecraft:block/custom/fluid_pipe_front_filled_lava + variants: + facing=north,fluid=none: + appearance: north + facing=south,fluid=none: + appearance: south + facing=east,fluid=none: + appearance: east + facing=west,fluid=none: + appearance: west + facing=up,fluid=none: + appearance: up + facing=down,fluid=none: + appearance: down + facing=north,fluid=water: + appearance: north_water + facing=south,fluid=water: + appearance: south_water + facing=east,fluid=water: + appearance: east_water + facing=west,fluid=water: + appearance: west_water + facing=up,fluid=water: + appearance: up_water + facing=down,fluid=water: + appearance: down_water + facing=north,fluid=lava: + appearance: north_lava + facing=south,fluid=lava: + appearance: south_lava + facing=east,fluid=lava: + appearance: east_lava + facing=west,fluid=lava: + appearance: west_lava + facing=up,fluid=lava: + appearance: up_lava + facing=down,fluid=lava: + appearance: down_lava + +recipes: + atlas:fluid_pipe: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + result: + id: atlas:fluid_pipe + count: 1 diff --git a/src/main/resources/atlas/configuration/fluid_pump.yml b/src/main/resources/atlas/configuration/fluid_pump.yml new file mode 100644 index 0000000..ce323d5 --- /dev/null +++ b/src/main/resources/atlas/configuration/fluid_pump.yml @@ -0,0 +1,129 @@ +items: + atlas:fluid_pump: + material: paper + data: + item-name: "Fluid Pump" + model: minecraft:block/custom/fluid_pump + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pump + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/fluid_pump_top + bottom: minecraft:block/custom/fluid_pump_bottom + side: minecraft:block/custom/fluid_pump_side + +items#1: + atlas:fluid_pump_active: + material: paper + data: + item-name: "Fluid Pump" + model: minecraft:block/custom/fluid_pump_active + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:fluid_pump + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pump_active + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/fluid_pump_top_active + bottom: minecraft:block/custom/fluid_pump_bottom_active + side: minecraft:block/custom/fluid_pump_side_active + +items#2: + atlas:fluid_pump_active_lava: + material: paper + data: + item-name: "Fluid Pump" + model: minecraft:block/custom/fluid_pump_active_lava + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:fluid_pump + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/fluid_pump_active_lava + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/fluid_pump_top_active_lava + bottom: minecraft:block/custom/fluid_pump_bottom_active_lava + side: minecraft:block/custom/fluid_pump_side_active_lava + +recipes: + atlas:fluid_pump: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + - minecraft:bucket + result: + id: atlas:fluid_pump + count: 1 diff --git a/src/main/resources/atlas/configuration/lava_generator.yml b/src/main/resources/atlas/configuration/lava_generator.yml new file mode 100644 index 0000000..39a9681 --- /dev/null +++ b/src/main/resources/atlas/configuration/lava_generator.yml @@ -0,0 +1,90 @@ +items: + atlas:lava_generator: + material: paper + data: + item-name: "Lava Generator" + model: minecraft:block/custom/lava_generator + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/lava_generator + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/lava_generator_top + bottom: minecraft:block/custom/lava_generator_bottom + side: minecraft:block/custom/lava_generator_side + +items#1: + atlas:lava_generator_active: + material: paper + data: + item-name: "Lava Generator" + model: minecraft:block/custom/lava_generator_active + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:lava_generator + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/lava_generator_active + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/lava_generator_top_active + bottom: minecraft:block/custom/lava_generator_bottom + side: minecraft:block/custom/lava_generator_side_active + +recipes: + atlas:lava_generator: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + - minecraft:magma_block + result: + id: atlas:lava_generator + count: 1 diff --git a/src/main/resources/atlas/configuration/multi_power_cable.yml b/src/main/resources/atlas/configuration/multi_power_cable.yml new file mode 100644 index 0000000..e5901f2 --- /dev/null +++ b/src/main/resources/atlas/configuration/multi_power_cable.yml @@ -0,0 +1,180 @@ +items: + atlas:multi_power_cable: + material: paper + data: + item-name: "Multi Power Cable" + model: minecraft:block/custom/multi_power_cable + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 2.0 + resistance: 2.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: direction + default: north + powered: + type: boolean + default: false + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/multi_power_cable_front + south: minecraft:block/custom/multi_power_cable_back + east: minecraft:block/custom/multi_power_cable_side + west: minecraft:block/custom/multi_power_cable_side + up: minecraft:block/custom/multi_power_cable_cap + down: minecraft:block/custom/multi_power_cable_cap + south: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable + y: 180 + east: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable + y: 90 + west: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable + y: 270 + up: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_up + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/multi_power_cable_side + south: minecraft:block/custom/multi_power_cable_side + east: minecraft:block/custom/multi_power_cable_side + west: minecraft:block/custom/multi_power_cable_side + up: minecraft:block/custom/multi_power_cable_front + down: minecraft:block/custom/multi_power_cable_back + down: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_down + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/multi_power_cable_side + south: minecraft:block/custom/multi_power_cable_side + east: minecraft:block/custom/multi_power_cable_side + west: minecraft:block/custom/multi_power_cable_side + up: minecraft:block/custom/multi_power_cable_back + down: minecraft:block/custom/multi_power_cable_front + north_powered: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/multi_power_cable_front_powered + south: minecraft:block/custom/multi_power_cable_back_powered + east: minecraft:block/custom/multi_power_cable_side_powered + west: minecraft:block/custom/multi_power_cable_side_powered + up: minecraft:block/custom/multi_power_cable_cap_powered + down: minecraft:block/custom/multi_power_cable_cap_powered + south_powered: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_powered + y: 180 + east_powered: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_powered + y: 90 + west_powered: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_powered + y: 270 + up_powered: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_up_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/multi_power_cable_side_powered + south: minecraft:block/custom/multi_power_cable_side_powered + east: minecraft:block/custom/multi_power_cable_side_powered + west: minecraft:block/custom/multi_power_cable_side_powered + up: minecraft:block/custom/multi_power_cable_front_powered + down: minecraft:block/custom/multi_power_cable_back_powered + down_powered: + auto-state: solid + model: + path: minecraft:block/custom/multi_power_cable_down_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/multi_power_cable_side_powered + south: minecraft:block/custom/multi_power_cable_side_powered + east: minecraft:block/custom/multi_power_cable_side_powered + west: minecraft:block/custom/multi_power_cable_side_powered + up: minecraft:block/custom/multi_power_cable_back_powered + down: minecraft:block/custom/multi_power_cable_front_powered + variants: + facing=north,powered=false: + appearance: north + facing=south,powered=false: + appearance: south + facing=east,powered=false: + appearance: east + facing=west,powered=false: + appearance: west + facing=up,powered=false: + appearance: up + facing=down,powered=false: + appearance: down + facing=north,powered=true: + appearance: north_powered + facing=south,powered=true: + appearance: south_powered + facing=east,powered=true: + appearance: east_powered + facing=west,powered=true: + appearance: west_powered + facing=up,powered=true: + appearance: up_powered + facing=down,powered=true: + appearance: down_powered + +recipes: + atlas:multi_power_cable: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:copper_ingot + - minecraft:copper_ingot + - minecraft:copper_ingot + - minecraft:copper_ingot + result: + id: atlas:multi_power_cable + count: 1 diff --git a/src/main/resources/atlas/configuration/obsidian_factory.yml b/src/main/resources/atlas/configuration/obsidian_factory.yml new file mode 100644 index 0000000..e87fa0f --- /dev/null +++ b/src/main/resources/atlas/configuration/obsidian_factory.yml @@ -0,0 +1,90 @@ +items: + atlas:obsidian_factory: + material: paper + data: + item-name: "Obsidian Factory" + model: minecraft:block/custom/obsidian_factory + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/obsidian_factory + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/obsidian_factory_top + bottom: minecraft:block/custom/obsidian_factory_bottom + side: minecraft:block/custom/obsidian_factory_side + +items#1: + atlas:obsidian_factory_active: + material: paper + data: + item-name: "Obsidian Factory" + model: minecraft:block/custom/obsidian_factory_active + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:obsidian_factory + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/obsidian_factory_active + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/obsidian_factory_top_active + bottom: minecraft:block/custom/obsidian_factory_bottom + side: minecraft:block/custom/obsidian_factory_side_active + +recipes: + atlas:obsidian_factory: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + - minecraft:obsidian + result: + id: atlas:obsidian_factory + count: 1 diff --git a/src/main/resources/atlas/configuration/power_cable.yml b/src/main/resources/atlas/configuration/power_cable.yml new file mode 100644 index 0000000..ea09664 --- /dev/null +++ b/src/main/resources/atlas/configuration/power_cable.yml @@ -0,0 +1,177 @@ +items: + atlas:power_cable: + material: paper + data: + item-name: "Power Cable" + model: minecraft:block/custom/power_cable + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 2.0 + resistance: 2.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: direction + default: north + powered: + type: boolean + default: false + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/power_cable + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_cable_front + south: minecraft:block/custom/power_cable_back + east: minecraft:block/custom/power_cable_side_right + west: minecraft:block/custom/power_cable_side_left + up: minecraft:block/custom/power_cable_cap_up + down: minecraft:block/custom/power_cable_cap_down + south: + auto-state: solid + model: + path: minecraft:block/custom/power_cable + y: 180 + east: + auto-state: solid + model: + path: minecraft:block/custom/power_cable + y: 90 + west: + auto-state: solid + model: + path: minecraft:block/custom/power_cable + y: 270 + up: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_up + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_cable_side_up + south: minecraft:block/custom/power_cable_side_down + east: minecraft:block/custom/power_cable_side_right + west: minecraft:block/custom/power_cable_side_left + up: minecraft:block/custom/power_cable_front + down: minecraft:block/custom/power_cable_back + down: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_down + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_cable_side_down + south: minecraft:block/custom/power_cable_side_up + east: minecraft:block/custom/power_cable_side_right + west: minecraft:block/custom/power_cable_side_left + up: minecraft:block/custom/power_cable_back + down: minecraft:block/custom/power_cable_front + north_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_cable_front_powered + south: minecraft:block/custom/power_cable_back_powered + east: minecraft:block/custom/power_cable_side_right_powered + west: minecraft:block/custom/power_cable_side_left_powered + up: minecraft:block/custom/power_cable_cap_up_powered + down: minecraft:block/custom/power_cable_cap_down_powered + south_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_powered + y: 180 + east_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_powered + y: 90 + west_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_powered + y: 270 + up_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_up_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_cable_side_up_powered + south: minecraft:block/custom/power_cable_side_down_powered + east: minecraft:block/custom/power_cable_side_right_powered + west: minecraft:block/custom/power_cable_side_left_powered + up: minecraft:block/custom/power_cable_front_powered + down: minecraft:block/custom/power_cable_back_powered + down_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_cable_down_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_cable_side_down_powered + south: minecraft:block/custom/power_cable_side_up_powered + east: minecraft:block/custom/power_cable_side_right_powered + west: minecraft:block/custom/power_cable_side_left_powered + up: minecraft:block/custom/power_cable_back_powered + down: minecraft:block/custom/power_cable_front_powered + variants: + facing=north,powered=false: + appearance: north + facing=south,powered=false: + appearance: south + facing=east,powered=false: + appearance: east + facing=west,powered=false: + appearance: west + facing=up,powered=false: + appearance: up + facing=down,powered=false: + appearance: down + facing=north,powered=true: + appearance: north_powered + facing=south,powered=true: + appearance: south_powered + facing=east,powered=true: + appearance: east_powered + facing=west,powered=true: + appearance: west_powered + facing=up,powered=true: + appearance: up_powered + facing=down,powered=true: + appearance: down_powered + +recipes: + atlas:power_cable: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:copper_ingot + result: + id: atlas:power_cable + count: 1 diff --git a/src/main/resources/atlas/configuration/power_merger.yml b/src/main/resources/atlas/configuration/power_merger.yml new file mode 100644 index 0000000..ab4650a --- /dev/null +++ b/src/main/resources/atlas/configuration/power_merger.yml @@ -0,0 +1,181 @@ +items: + atlas:power_merger: + material: paper + data: + item-name: "Power Merger" + model: minecraft:block/custom/power_merger + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 2.0 + resistance: 2.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: direction + default: north + powered: + type: boolean + default: false + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/power_merger + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_merger_front + south: minecraft:block/custom/power_merger_back + east: minecraft:block/custom/power_merger_side + west: minecraft:block/custom/power_merger_side + up: minecraft:block/custom/power_merger_top + down: minecraft:block/custom/power_merger_bottom + south: + auto-state: solid + model: + path: minecraft:block/custom/power_merger + y: 180 + east: + auto-state: solid + model: + path: minecraft:block/custom/power_merger + y: 90 + west: + auto-state: solid + model: + path: minecraft:block/custom/power_merger + y: 270 + up: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_up + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_merger_side + south: minecraft:block/custom/power_merger_side + east: minecraft:block/custom/power_merger_side + west: minecraft:block/custom/power_merger_side + up: minecraft:block/custom/power_merger_front + down: minecraft:block/custom/power_merger_back + down: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_down + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_merger_side + south: minecraft:block/custom/power_merger_side + east: minecraft:block/custom/power_merger_side + west: minecraft:block/custom/power_merger_side + up: minecraft:block/custom/power_merger_back + down: minecraft:block/custom/power_merger_front + north_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_merger_front_powered + south: minecraft:block/custom/power_merger_back_powered + east: minecraft:block/custom/power_merger_side_powered + west: minecraft:block/custom/power_merger_side_powered + up: minecraft:block/custom/power_merger_top_powered + down: minecraft:block/custom/power_merger_bottom_powered + south_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_powered + y: 180 + east_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_powered + y: 90 + west_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_powered + y: 270 + up_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_up_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_merger_side_powered + south: minecraft:block/custom/power_merger_side_powered + east: minecraft:block/custom/power_merger_side_powered + west: minecraft:block/custom/power_merger_side_powered + up: minecraft:block/custom/power_merger_front_powered + down: minecraft:block/custom/power_merger_back_powered + down_powered: + auto-state: solid + model: + path: minecraft:block/custom/power_merger_down_powered + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/power_merger_side_powered + south: minecraft:block/custom/power_merger_side_powered + east: minecraft:block/custom/power_merger_side_powered + west: minecraft:block/custom/power_merger_side_powered + up: minecraft:block/custom/power_merger_back_powered + down: minecraft:block/custom/power_merger_front_powered + variants: + facing=north,powered=false: + appearance: north + facing=south,powered=false: + appearance: south + facing=east,powered=false: + appearance: east + facing=west,powered=false: + appearance: west + facing=up,powered=false: + appearance: up + facing=down,powered=false: + appearance: down + facing=north,powered=true: + appearance: north_powered + facing=south,powered=true: + appearance: south_powered + facing=east,powered=true: + appearance: east_powered + facing=west,powered=true: + appearance: west_powered + facing=up,powered=true: + appearance: up_powered + facing=down,powered=true: + appearance: down_powered + +recipes: + atlas:power_merger: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:copper_ingot + - minecraft:copper_ingot + - minecraft:copper_ingot + - minecraft:copper_ingot + - minecraft:redstone + result: + id: atlas:power_merger + count: 1 diff --git a/src/main/resources/atlas/configuration/small_battery.yml b/src/main/resources/atlas/configuration/small_battery.yml new file mode 100644 index 0000000..7ef342a --- /dev/null +++ b/src/main/resources/atlas/configuration/small_battery.yml @@ -0,0 +1,168 @@ +items: + atlas:small_battery: + material: paper + data: + item-name: "Small Battery" + model: minecraft:block/custom/small_battery + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/small_battery + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/small_battery + bottom: minecraft:block/custom/small_battery_bottom + side: minecraft:block/custom/small_battery_side + +items#1: + atlas:small_battery_low: + material: paper + data: + item-name: "Small Battery" + model: minecraft:block/custom/small_battery_low + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:small_battery + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/small_battery_low + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/small_battery_low + bottom: minecraft:block/custom/small_battery_bottom + side: minecraft:block/custom/small_battery_side + +items#2: + atlas:small_battery_medium: + material: paper + data: + item-name: "Small Battery" + model: minecraft:block/custom/small_battery_medium + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:small_battery + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/small_battery_medium + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/small_battery_medium + bottom: minecraft:block/custom/small_battery_bottom + side: minecraft:block/custom/small_battery_side + +items#3: + atlas:small_battery_full: + material: paper + data: + item-name: "Small Battery" + model: minecraft:block/custom/small_battery_full + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:small_battery + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/small_battery_full + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/small_battery_full + bottom: minecraft:block/custom/small_battery_bottom + side: minecraft:block/custom/small_battery_side + +recipes: + atlas:small_battery: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + - minecraft:copper_ingot + result: + id: atlas:small_battery + count: 1 diff --git a/src/main/resources/atlas/configuration/small_drill.yml b/src/main/resources/atlas/configuration/small_drill.yml new file mode 100644 index 0000000..e208e8c --- /dev/null +++ b/src/main/resources/atlas/configuration/small_drill.yml @@ -0,0 +1,114 @@ +items: + atlas:small_drill: + material: paper + data: + item-name: "Small Drill" + model: minecraft:block/custom/small_drill + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + states: + properties: + facing: + type: direction + default: down + appearances: + north: + auto-state: solid + model: + path: minecraft:block/custom/small_drill + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/small_drill_front + south: minecraft:block/custom/small_drill + east: minecraft:block/custom/small_drill_arrow_right + west: minecraft:block/custom/small_drill_arrow_left + up: minecraft:block/custom/small_drill_arrow_up + down: minecraft:block/custom/small_drill_arrow_down + south: + auto-state: solid + model: + path: minecraft:block/custom/small_drill + y: 180 + east: + auto-state: solid + model: + path: minecraft:block/custom/small_drill + y: 90 + west: + auto-state: solid + model: + path: minecraft:block/custom/small_drill + y: 270 + up: + auto-state: solid + model: + path: minecraft:block/custom/small_drill_up + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/small_drill_arrow_up + south: minecraft:block/custom/small_drill_arrow_down + east: minecraft:block/custom/small_drill_arrow_right + west: minecraft:block/custom/small_drill_arrow_left + up: minecraft:block/custom/small_drill_front + down: minecraft:block/custom/small_drill + down: + auto-state: solid + model: + path: minecraft:block/custom/small_drill_down + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/small_drill_arrow_down + south: minecraft:block/custom/small_drill_arrow_up + east: minecraft:block/custom/small_drill_arrow_right + west: minecraft:block/custom/small_drill_arrow_left + up: minecraft:block/custom/small_drill + down: minecraft:block/custom/small_drill_front + variants: + facing=north: + appearance: north + facing=south: + appearance: south + facing=east: + appearance: east + facing=west: + appearance: west + facing=up: + appearance: up + facing=down: + appearance: down + +recipes: + atlas:small_drill: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + - minecraft:diamond + result: + id: atlas:small_drill + count: 1 diff --git a/src/main/resources/atlas/configuration/small_solar_panel.yml b/src/main/resources/atlas/configuration/small_solar_panel.yml new file mode 100644 index 0000000..8f76e65 --- /dev/null +++ b/src/main/resources/atlas/configuration/small_solar_panel.yml @@ -0,0 +1,92 @@ +items: + atlas:small_solar_panel: + material: paper + data: + item-name: "Small Solar Panel" + model: minecraft:block/custom/small_solar_panel + behavior: + type: block_item + block: + loot: + template: default:loot_table/self + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/small_solar_panel + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/small_solar_panel + bottom: minecraft:block/custom/small_solar_panel_bottom + side: minecraft:block/custom/small_solar_panel_side + +items#1: + atlas:small_solar_panel_full: + material: paper + data: + item-name: "Small Solar Panel" + model: minecraft:block/custom/small_solar_panel_full + behavior: + type: block_item + block: + loot: + pools: + - rolls: 1 + entries: + - type: item + item: atlas:small_solar_panel + settings: + hardness: 4.0 + resistance: 4.0 + is-suffocating: true + is-redstone-conductor: false + push-reaction: push_only + tags: ["minecraft:mineable/pickaxe"] + sounds: + break: minecraft:block.metal.break + step: minecraft:block.metal.step + place: minecraft:block.metal.place + hit: minecraft:block.metal.hit + fall: minecraft:block.metal.fall + state: + auto-state: solid + model: + path: minecraft:block/custom/small_solar_panel_full + generation: + parent: minecraft:block/cube_bottom_top + textures: + top: minecraft:block/custom/small_solar_panel_full + bottom: minecraft:block/custom/small_solar_panel_bottom + side: minecraft:block/custom/small_solar_panel_side + +recipes: + atlas:small_solar_panel: + type: shapeless + category: misc + unlock-on-ingredient-obtained: true + ingredients: + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:iron_ingot + - minecraft:lapis_lazuli + - minecraft:lapis_lazuli + - minecraft:lapis_lazuli + - minecraft:redstone + - minecraft:redstone + - minecraft:redstone + result: + id: atlas:small_solar_panel + count: 1 diff --git a/src/main/resources/atlas/pack.yml b/src/main/resources/atlas/pack.yml new file mode 100644 index 0000000..a9537df --- /dev/null +++ b/src/main/resources/atlas/pack.yml @@ -0,0 +1 @@ +id: atlas diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/models/block/custom/conveyor_belt_base.json b/src/main/resources/atlas/resourcepack/assets/minecraft/models/block/custom/conveyor_belt_base.json new file mode 100644 index 0000000..548b5f0 --- /dev/null +++ b/src/main/resources/atlas/resourcepack/assets/minecraft/models/block/custom/conveyor_belt_base.json @@ -0,0 +1,19 @@ +{ + "textures": { + "particle": "#up" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 6, 16], + "faces": { + "north": {"texture": "#north", "uv": [0, 10, 16, 16], "cullface": "north"}, + "south": {"texture": "#south", "uv": [0, 10, 16, 16], "cullface": "south"}, + "east": {"texture": "#east", "uv": [0, 10, 16, 16], "cullface": "east"}, + "west": {"texture": "#west", "uv": [0, 10, 16, 16], "cullface": "west"}, + "up": {"texture": "#up"}, + "down": {"texture": "#down", "cullface": "down"} + } + } + ] +} diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_fire.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_fire.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_fire.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_fire.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_fire_off.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_fire_off.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_fire_off.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_fire_off.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_housing.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_housing.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_housing.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_housing.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_east.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_east.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_east.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_east.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_north.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_north.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_north.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_north.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_south.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_south.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_south.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_south.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_west.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_west.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/auto_smelter_top_west.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/auto_smelter_top_west.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_side_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_side_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_top.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_top_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/cobblestone_factory_top_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_east.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_east.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_east.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_east.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_north.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_north.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_north.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_north.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_south.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_south.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_south.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_south.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_west.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_west.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/conveyor_belt_top_west.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/conveyor_belt_top_west.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_lava_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_lava_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_lava_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_lava_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_lava_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_lava_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_lava_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_lava_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_lava_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_lava_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_lava_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_lava_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_water_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_water_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_water_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_water_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_water_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_water_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_water_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_water_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_water_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_water_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_back_water_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_back_water_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_lava_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_lava_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_lava_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_lava_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_lava_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_lava_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_lava_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_lava_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_lava_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_lava_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_lava_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_lava_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_water_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_water_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_water_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_water_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_water_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_water_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_water_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_water_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_water_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_water_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_front_water_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_front_water_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_lava_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_lava_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_lava_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_lava_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_lava_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_lava_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_lava_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_lava_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_lava_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_lava_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_lava_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_lava_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_water_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_water_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_water_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_water_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_water_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_water_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_water_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_water_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_water_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_water_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_side_water_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_side_water_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_lava_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_lava_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_lava_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_lava_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_lava_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_lava_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_lava_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_lava_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_lava_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_lava_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_lava_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_lava_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_water_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_water_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_water_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_water_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_water_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_water_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_water_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_water_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_water_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_water_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_container_top_water_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_container_top_water_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_back_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_back_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_back_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_back_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_back_water.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_back_water.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_back_water.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_back_water.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_bottom_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_bottom_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_bottom_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_bottom_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_bottom_water.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_bottom_water.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_bottom_water.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_bottom_water.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_front_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_front_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_front_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_front_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_front_water.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_front_water.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_front_water.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_front_water.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_side_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_side_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_side_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_side_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_side_water.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_side_water.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_side_water.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_side_water.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_top.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_top.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_top.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_top_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_top_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_top_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_top_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_top_water.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_top_water.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_merger_top_water.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_merger_top_water.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_back_filled.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_back_filled.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_back_filled.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_back_filled.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_back_filled_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_back_filled_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_back_filled_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_back_filled_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_front_filled.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_front_filled.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_front_filled.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_front_filled.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_front_filled_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_front_filled_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_front_filled_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_front_filled_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_down.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_down.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_down.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_down.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_down.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_down.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_down.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_down.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_down.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_left.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_left.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_left.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_left.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_right.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_right.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_right.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_right.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_up.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_lava_up.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_lava_up.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_left.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_left.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_left.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_left.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_right.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_right.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_right.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_right.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_up.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_filled_up.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_filled_up.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_left.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_left.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_left.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_left.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_right.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_right.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_right.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_right.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_up.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pipe_side_up.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pipe_side_up.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_bottom_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_bottom_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_bottom_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_bottom_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_bottom_active_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_bottom_active_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_bottom_active_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_bottom_active_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_side_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_side_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_side_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_side_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_side_active_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_side_active_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_side_active_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_side_active_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_top.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_top.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_top.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_top_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_top_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_top_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_top_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_top_active_lava.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_top_active_lava.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/fluid_pump_top_active_lava.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/fluid_pump_top_active_lava.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_auto_smelter.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_auto_smelter.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_auto_smelter.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_auto_smelter.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_conveyor_belt.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_conveyor_belt.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_conveyor_belt.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_conveyor_belt.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_fluid_container.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_fluid_container.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_fluid_container.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_fluid_container.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_fluid_pipe.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_fluid_pipe.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_fluid_pipe.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_fluid_pipe.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_fluid_pump.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_fluid_pump.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_fluid_pump.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_fluid_pump.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_lava_generator.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_lava_generator.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_lava_generator.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_lava_generator.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_power_cable.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_power_cable.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_power_cable.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_power_cable.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_small_battery.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_small_battery.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_small_battery.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_small_battery.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_small_drill.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_small_drill.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_small_drill.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_small_drill.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/guide_small_solar_panel.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_small_solar_panel.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/guide_small_solar_panel.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/guide_small_solar_panel.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_side_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_side_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_side_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_side_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_top.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_top.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_top.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_top_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_top_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/lava_generator_top_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/lava_generator_top_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_back_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_back_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_back_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_back_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_cap.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_cap.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_cap.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_cap.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_cap_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_cap_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_cap_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_cap_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_front_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_front_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_front_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_front_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_side_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_side_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/multi_power_cable_side_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/multi_power_cable_side_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_side_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_side_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_top.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_top_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top_active.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/obsidian_factory_top_active.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top_active.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_back_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_back_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_back_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_back_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_down.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_down.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_down.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_down_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_down_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_down_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_down_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_left.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_left.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_left.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_left.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_left_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_left_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_left_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_left_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_right.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_right.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_right.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_right.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_right_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_right_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_right_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_right_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_up.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_up.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_up.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_up_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_up_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_cap_up_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_cap_up_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_front_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_front_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_front_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_front_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_down.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_down.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_down.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_down_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_down_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_down_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_down_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_left.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_left.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_left.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_left.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_left_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_left_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_left_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_left_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_right.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_right.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_right.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_right.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_right_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_right_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_right_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_right_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_up.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_up.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_up.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_up_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_up_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_cable_side_up_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_cable_side_up_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_back.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_back.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_back.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_back.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_back_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_back_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_back_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_back_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_bottom_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_bottom_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_bottom_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_bottom_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_front_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_front_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_front_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_front_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_side_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_side_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_side_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_side_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_top.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_top.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_top.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_top_powered.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_top_powered.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/power_merger_top_powered.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/power_merger_top_powered.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_low.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_low.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_low.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_low.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_medium.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_medium.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_medium.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_medium.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_battery_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_battery_side.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_down.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_down.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_down.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_left.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_left.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_left.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_left.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_right.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_right.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_right.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_right.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_up.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_arrow_up.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_arrow_up.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_front.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_front.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_drill_front.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_drill_front.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel_bottom.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel_bottom.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel_bottom.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel_full.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel_full.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel_full.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel_full.png diff --git a/src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel_side.png similarity index 100% rename from src/main/resources/nexo/pack/assets/atlas/textures/block/small_solar_panel_side.png rename to src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/small_solar_panel_side.png diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 93a8429..d2da52e 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -2,23 +2,3 @@ # Enable or disable plugin logging (warnings and errors are always shown) logging: false - -resource-pack: - # Enable or disable resource pack distribution - enabled: false - - # URL to the resource pack (must be a direct download link) - # For local testing, run-server.sh will automatically set this - url: "" - - # SHA-1 hash of the resource pack (40 character hex string) - # Used for verification and caching - # For local testing, run-server.sh will automatically calculate this - hash: "" - - # Whether the resource pack is required to play - # If true, players who decline will be disconnected - required: false - - # Optional message shown when requesting the resource pack - prompt: "Atlas requires a resource pack for custom textures!" diff --git a/src/main/resources/nexo/items/atlas_blocks.yml b/src/main/resources/nexo/items/atlas_blocks.yml deleted file mode 100644 index 5f9041a..0000000 --- a/src/main/resources/nexo/items/atlas_blocks.yml +++ /dev/null @@ -1,4591 +0,0 @@ -# Atlas Custom Blocks Configuration -# These items are loaded by Nexo to create custom blocks - -power_cable: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube_all - textures: - all: atlas:block/power_cable_side_up - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 101 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_north: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_front - south: atlas:block/power_cable_back - east: atlas:block/power_cable_side_right - west: atlas:block/power_cable_side_left - up: atlas:block/power_cable_cap_up - down: atlas:block/power_cable_cap_down - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 102 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_south: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_back - south: atlas:block/power_cable_front - east: atlas:block/power_cable_side_left - west: atlas:block/power_cable_side_right - up: atlas:block/power_cable_cap_down - down: atlas:block/power_cable_cap_up - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 103 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_east: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_left - south: atlas:block/power_cable_side_right - east: atlas:block/power_cable_front - west: atlas:block/power_cable_back - up: atlas:block/power_cable_cap_right - down: atlas:block/power_cable_cap_right - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 104 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_west: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_right - south: atlas:block/power_cable_side_left - east: atlas:block/power_cable_back - west: atlas:block/power_cable_front - up: atlas:block/power_cable_cap_left - down: atlas:block/power_cable_cap_left - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 105 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_up: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_up - south: atlas:block/power_cable_side_up - east: atlas:block/power_cable_side_up - west: atlas:block/power_cable_side_up - up: atlas:block/power_cable_front - down: atlas:block/power_cable_back - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 106 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_down: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_down - south: atlas:block/power_cable_side_down - east: atlas:block/power_cable_side_down - west: atlas:block/power_cable_side_down - up: atlas:block/power_cable_back - down: atlas:block/power_cable_front - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 107 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -small_solar_panel: - itemname: "Small Solar Panel" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/small_solar_panel - bottom: atlas:block/small_solar_panel_bottom - side: atlas:block/small_solar_panel_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 100 - hardness: 4 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_solar_panel - probability: 1.0 - -small_solar_panel_full: - itemname: "Small Solar Panel" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/small_solar_panel_full - bottom: atlas:block/small_solar_panel_bottom - side: atlas:block/small_solar_panel_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 110 - hardness: 4 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_solar_panel - probability: 1.0 - -power_cable_north_powered: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_front_powered - south: atlas:block/power_cable_back_powered - east: atlas:block/power_cable_side_right_powered - west: atlas:block/power_cable_side_left_powered - up: atlas:block/power_cable_cap_up_powered - down: atlas:block/power_cable_cap_down_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 111 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_south_powered: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_back_powered - south: atlas:block/power_cable_front_powered - east: atlas:block/power_cable_side_left_powered - west: atlas:block/power_cable_side_right_powered - up: atlas:block/power_cable_cap_down_powered - down: atlas:block/power_cable_cap_up_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 112 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_east_powered: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_left_powered - south: atlas:block/power_cable_side_right_powered - east: atlas:block/power_cable_front_powered - west: atlas:block/power_cable_back_powered - up: atlas:block/power_cable_cap_right_powered - down: atlas:block/power_cable_cap_right_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 113 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_west_powered: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_right_powered - south: atlas:block/power_cable_side_left_powered - east: atlas:block/power_cable_back_powered - west: atlas:block/power_cable_front_powered - up: atlas:block/power_cable_cap_left_powered - down: atlas:block/power_cable_cap_left_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 114 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_up_powered: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_up_powered - south: atlas:block/power_cable_side_up_powered - east: atlas:block/power_cable_side_up_powered - west: atlas:block/power_cable_side_up_powered - up: atlas:block/power_cable_front_powered - down: atlas:block/power_cable_back_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 115 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -power_cable_down_powered: - itemname: "Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_cable_side_down_powered - south: atlas:block/power_cable_side_down_powered - east: atlas:block/power_cable_side_down_powered - west: atlas:block/power_cable_side_down_powered - up: atlas:block/power_cable_back_powered - down: atlas:block/power_cable_front_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 116 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_cable - probability: 1.0 - -small_drill: - itemname: "Small Drill" - material: paper - Pack: - generate_model: true - parent_model: block/cube_all - textures: - all: atlas:block/small_drill - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 117 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_drill - probability: 1.0 - -small_drill_north: - itemname: "Small Drill" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/small_drill_front - south: atlas:block/small_drill - east: atlas:block/small_drill_arrow_right - west: atlas:block/small_drill_arrow_left - up: atlas:block/small_drill_arrow_up - down: atlas:block/small_drill_arrow_up - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 122 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_drill - probability: 1.0 - -small_drill_south: - itemname: "Small Drill" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/small_drill - south: atlas:block/small_drill_front - east: atlas:block/small_drill_arrow_left - west: atlas:block/small_drill_arrow_right - up: atlas:block/small_drill_arrow_down - down: atlas:block/small_drill_arrow_down - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 123 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_drill - probability: 1.0 - -small_drill_east: - itemname: "Small Drill" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/small_drill_arrow_right - south: atlas:block/small_drill_arrow_left - east: atlas:block/small_drill_front - west: atlas:block/small_drill - up: atlas:block/small_drill_arrow_right - down: atlas:block/small_drill_arrow_left - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 124 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_drill - probability: 1.0 - -small_drill_west: - itemname: "Small Drill" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/small_drill_arrow_left - south: atlas:block/small_drill_arrow_right - east: atlas:block/small_drill - west: atlas:block/small_drill_front - up: atlas:block/small_drill_arrow_left - down: atlas:block/small_drill_arrow_right - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 125 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_drill - probability: 1.0 - -small_drill_up: - itemname: "Small Drill" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/small_drill_arrow_down - south: atlas:block/small_drill_arrow_down - east: atlas:block/small_drill_arrow_down - west: atlas:block/small_drill_arrow_down - up: atlas:block/small_drill_front - down: atlas:block/small_drill - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 126 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_drill - probability: 1.0 - -small_drill_down: - itemname: "Small Drill" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/small_drill_arrow_up - south: atlas:block/small_drill_arrow_up - east: atlas:block/small_drill_arrow_up - west: atlas:block/small_drill_arrow_up - up: atlas:block/small_drill - down: atlas:block/small_drill_front - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 127 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_drill - probability: 1.0 - -small_battery: - itemname: "Small Battery" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/small_battery - bottom: atlas:block/small_battery_bottom - side: atlas:block/small_battery_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 118 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_battery - probability: 1.0 - -small_battery_low: - itemname: "Small Battery" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/small_battery_low - bottom: atlas:block/small_battery_bottom - side: atlas:block/small_battery_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 119 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_battery - probability: 1.0 - -small_battery_medium: - itemname: "Small Battery" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/small_battery_medium - bottom: atlas:block/small_battery_bottom - side: atlas:block/small_battery_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 120 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_battery - probability: 1.0 - -small_battery_full: - itemname: "Small Battery" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/small_battery_full - bottom: atlas:block/small_battery_bottom - side: atlas:block/small_battery_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 121 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: small_battery - probability: 1.0 - -# ==================== Fluid Blocks ==================== - -fluid_pump: - itemname: "Fluid Pump" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/fluid_pump_top - bottom: atlas:block/fluid_pump_bottom - side: atlas:block/fluid_pump_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 130 - hardness: 4 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pump - probability: 1.0 - -fluid_pump_active: - itemname: "Fluid Pump" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/fluid_pump_top_active - bottom: atlas:block/fluid_pump_bottom_active - side: atlas:block/fluid_pump_side_active - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 131 - hardness: 4 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pump - probability: 1.0 - -fluid_pump_active_lava: - itemname: "Fluid Pump" - material: paper - Pack: - generate_model: true - parent_model: block/cube_bottom_top - textures: - top: atlas:block/fluid_pump_top_active_lava - bottom: atlas:block/fluid_pump_bottom_active_lava - side: atlas:block/fluid_pump_side_active_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 145 - hardness: 4 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pump - probability: 1.0 - -fluid_pipe: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube_all - textures: - all: atlas:block/fluid_pipe_side_up - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 132 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_north: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_front - south: atlas:block/fluid_pipe_back - east: atlas:block/fluid_pipe_side_right - west: atlas:block/fluid_pipe_side_left - up: atlas:block/fluid_pipe_side_up - down: atlas:block/fluid_pipe_side_down - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 133 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_south: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_back - south: atlas:block/fluid_pipe_front - east: atlas:block/fluid_pipe_side_left - west: atlas:block/fluid_pipe_side_right - up: atlas:block/fluid_pipe_side_down - down: atlas:block/fluid_pipe_side_up - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 134 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_east: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_left - south: atlas:block/fluid_pipe_side_right - east: atlas:block/fluid_pipe_front - west: atlas:block/fluid_pipe_back - up: atlas:block/fluid_pipe_side_right - down: atlas:block/fluid_pipe_side_right - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 135 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_west: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_right - south: atlas:block/fluid_pipe_side_left - east: atlas:block/fluid_pipe_back - west: atlas:block/fluid_pipe_front - up: atlas:block/fluid_pipe_side_left - down: atlas:block/fluid_pipe_side_left - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 136 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_up: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_up - south: atlas:block/fluid_pipe_side_up - east: atlas:block/fluid_pipe_side_up - west: atlas:block/fluid_pipe_side_up - up: atlas:block/fluid_pipe_front - down: atlas:block/fluid_pipe_back - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 137 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_down: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_down - south: atlas:block/fluid_pipe_side_down - east: atlas:block/fluid_pipe_side_down - west: atlas:block/fluid_pipe_side_down - up: atlas:block/fluid_pipe_back - down: atlas:block/fluid_pipe_front - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 138 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_north_filled: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_front_filled - south: atlas:block/fluid_pipe_back_filled - east: atlas:block/fluid_pipe_side_filled_right - west: atlas:block/fluid_pipe_side_filled_left - up: atlas:block/fluid_pipe_side_filled_up - down: atlas:block/fluid_pipe_side_filled_down - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 139 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_south_filled: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_back_filled - south: atlas:block/fluid_pipe_front_filled - east: atlas:block/fluid_pipe_side_filled_left - west: atlas:block/fluid_pipe_side_filled_right - up: atlas:block/fluid_pipe_side_filled_down - down: atlas:block/fluid_pipe_side_filled_up - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 140 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_east_filled: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_left - south: atlas:block/fluid_pipe_side_filled_right - east: atlas:block/fluid_pipe_front_filled - west: atlas:block/fluid_pipe_back_filled - up: atlas:block/fluid_pipe_side_filled_right - down: atlas:block/fluid_pipe_side_filled_right - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 141 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_west_filled: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_right - south: atlas:block/fluid_pipe_side_filled_left - east: atlas:block/fluid_pipe_back_filled - west: atlas:block/fluid_pipe_front_filled - up: atlas:block/fluid_pipe_side_filled_left - down: atlas:block/fluid_pipe_side_filled_left - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 142 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_up_filled: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_up - south: atlas:block/fluid_pipe_side_filled_up - east: atlas:block/fluid_pipe_side_filled_up - west: atlas:block/fluid_pipe_side_filled_up - up: atlas:block/fluid_pipe_front_filled - down: atlas:block/fluid_pipe_back_filled - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 143 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_down_filled: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_down - south: atlas:block/fluid_pipe_side_filled_down - east: atlas:block/fluid_pipe_side_filled_down - west: atlas:block/fluid_pipe_side_filled_down - up: atlas:block/fluid_pipe_back_filled - down: atlas:block/fluid_pipe_front_filled - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 144 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -# ==================== Lava-filled Pipe Variants ==================== - -fluid_pipe_north_filled_lava: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_front_filled_lava - south: atlas:block/fluid_pipe_back_filled_lava - east: atlas:block/fluid_pipe_side_filled_lava_right - west: atlas:block/fluid_pipe_side_filled_lava_left - up: atlas:block/fluid_pipe_side_filled_lava_up - down: atlas:block/fluid_pipe_side_filled_lava_down - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 146 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_south_filled_lava: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_back_filled_lava - south: atlas:block/fluid_pipe_front_filled_lava - east: atlas:block/fluid_pipe_side_filled_lava_left - west: atlas:block/fluid_pipe_side_filled_lava_right - up: atlas:block/fluid_pipe_side_filled_lava_down - down: atlas:block/fluid_pipe_side_filled_lava_up - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 147 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_east_filled_lava: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_lava_left - south: atlas:block/fluid_pipe_side_filled_lava_right - east: atlas:block/fluid_pipe_front_filled_lava - west: atlas:block/fluid_pipe_back_filled_lava - up: atlas:block/fluid_pipe_side_filled_lava_right - down: atlas:block/fluid_pipe_side_filled_lava_right - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 148 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_west_filled_lava: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_lava_right - south: atlas:block/fluid_pipe_side_filled_lava_left - east: atlas:block/fluid_pipe_back_filled_lava - west: atlas:block/fluid_pipe_front_filled_lava - up: atlas:block/fluid_pipe_side_filled_lava_left - down: atlas:block/fluid_pipe_side_filled_lava_left - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 149 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_up_filled_lava: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_lava_up - south: atlas:block/fluid_pipe_side_filled_lava_up - east: atlas:block/fluid_pipe_side_filled_lava_up - west: atlas:block/fluid_pipe_side_filled_lava_up - up: atlas:block/fluid_pipe_front_filled_lava - down: atlas:block/fluid_pipe_back_filled_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 150 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -fluid_pipe_down_filled_lava: - itemname: "Fluid Pipe" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_pipe_side_filled_lava_down - south: atlas:block/fluid_pipe_side_filled_lava_down - east: atlas:block/fluid_pipe_side_filled_lava_down - west: atlas:block/fluid_pipe_side_filled_lava_down - up: atlas:block/fluid_pipe_back_filled_lava - down: atlas:block/fluid_pipe_front_filled_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 151 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_pipe - probability: 1.0 - -# ==================== Fluid Container ==================== - -fluid_container: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube_all - textures: - all: atlas:block/fluid_container_side - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 1 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 - -fluid_container_north: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_front - south: atlas:block/fluid_container_back - east: atlas:block/fluid_container_side - west: atlas:block/fluid_container_side - up: atlas:block/fluid_container_top - down: atlas:block/fluid_container_top - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 2 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_south: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_back - south: atlas:block/fluid_container_front - east: atlas:block/fluid_container_side - west: atlas:block/fluid_container_side - up: atlas:block/fluid_container_top - down: atlas:block/fluid_container_top - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 3 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_east: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side - south: atlas:block/fluid_container_side - east: atlas:block/fluid_container_front - west: atlas:block/fluid_container_back - up: atlas:block/fluid_container_top - down: atlas:block/fluid_container_top - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 4 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_west: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side - south: atlas:block/fluid_container_side - east: atlas:block/fluid_container_back - west: atlas:block/fluid_container_front - up: atlas:block/fluid_container_top - down: atlas:block/fluid_container_top - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 5 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_up: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side - south: atlas:block/fluid_container_side - east: atlas:block/fluid_container_side - west: atlas:block/fluid_container_side - up: atlas:block/fluid_container_front - down: atlas:block/fluid_container_back - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 6 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_down: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side - south: atlas:block/fluid_container_side - east: atlas:block/fluid_container_side - west: atlas:block/fluid_container_side - up: atlas:block/fluid_container_back - down: atlas:block/fluid_container_front - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 7 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_north_water_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_front_water_low - south: atlas:block/fluid_container_back_water_low - east: atlas:block/fluid_container_side_water_low - west: atlas:block/fluid_container_side_water_low - up: atlas:block/fluid_container_top_water_low - down: atlas:block/fluid_container_top_water_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 8 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_north_water_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_front_water_medium - south: atlas:block/fluid_container_back_water_medium - east: atlas:block/fluid_container_side_water_medium - west: atlas:block/fluid_container_side_water_medium - up: atlas:block/fluid_container_top_water_medium - down: atlas:block/fluid_container_top_water_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 9 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_north_water_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_front_water_full - south: atlas:block/fluid_container_back_water_full - east: atlas:block/fluid_container_side_water_full - west: atlas:block/fluid_container_side_water_full - up: atlas:block/fluid_container_top_water_full - down: atlas:block/fluid_container_top_water_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 10 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_north_lava_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_front_lava_low - south: atlas:block/fluid_container_back_lava_low - east: atlas:block/fluid_container_side_lava_low - west: atlas:block/fluid_container_side_lava_low - up: atlas:block/fluid_container_top_lava_low - down: atlas:block/fluid_container_top_lava_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 11 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_north_lava_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_front_lava_medium - south: atlas:block/fluid_container_back_lava_medium - east: atlas:block/fluid_container_side_lava_medium - west: atlas:block/fluid_container_side_lava_medium - up: atlas:block/fluid_container_top_lava_medium - down: atlas:block/fluid_container_top_lava_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 12 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_north_lava_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_front_lava_full - south: atlas:block/fluid_container_back_lava_full - east: atlas:block/fluid_container_side_lava_full - west: atlas:block/fluid_container_side_lava_full - up: atlas:block/fluid_container_top_lava_full - down: atlas:block/fluid_container_top_lava_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 13 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_south_water_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_back_water_low - south: atlas:block/fluid_container_front_water_low - east: atlas:block/fluid_container_side_water_low - west: atlas:block/fluid_container_side_water_low - up: atlas:block/fluid_container_top_water_low - down: atlas:block/fluid_container_top_water_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 14 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_south_water_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_back_water_medium - south: atlas:block/fluid_container_front_water_medium - east: atlas:block/fluid_container_side_water_medium - west: atlas:block/fluid_container_side_water_medium - up: atlas:block/fluid_container_top_water_medium - down: atlas:block/fluid_container_top_water_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 15 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_south_water_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_back_water_full - south: atlas:block/fluid_container_front_water_full - east: atlas:block/fluid_container_side_water_full - west: atlas:block/fluid_container_side_water_full - up: atlas:block/fluid_container_top_water_full - down: atlas:block/fluid_container_top_water_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 16 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_south_lava_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_back_lava_low - south: atlas:block/fluid_container_front_lava_low - east: atlas:block/fluid_container_side_lava_low - west: atlas:block/fluid_container_side_lava_low - up: atlas:block/fluid_container_top_lava_low - down: atlas:block/fluid_container_top_lava_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 17 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_south_lava_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_back_lava_medium - south: atlas:block/fluid_container_front_lava_medium - east: atlas:block/fluid_container_side_lava_medium - west: atlas:block/fluid_container_side_lava_medium - up: atlas:block/fluid_container_top_lava_medium - down: atlas:block/fluid_container_top_lava_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 18 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_south_lava_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_back_lava_full - south: atlas:block/fluid_container_front_lava_full - east: atlas:block/fluid_container_side_lava_full - west: atlas:block/fluid_container_side_lava_full - up: atlas:block/fluid_container_top_lava_full - down: atlas:block/fluid_container_top_lava_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 19 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_east_water_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_low - south: atlas:block/fluid_container_side_water_low - east: atlas:block/fluid_container_front_water_low - west: atlas:block/fluid_container_back_water_low - up: atlas:block/fluid_container_top_water_low - down: atlas:block/fluid_container_top_water_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 20 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_east_water_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_medium - south: atlas:block/fluid_container_side_water_medium - east: atlas:block/fluid_container_front_water_medium - west: atlas:block/fluid_container_back_water_medium - up: atlas:block/fluid_container_top_water_medium - down: atlas:block/fluid_container_top_water_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 21 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_east_water_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_full - south: atlas:block/fluid_container_side_water_full - east: atlas:block/fluid_container_front_water_full - west: atlas:block/fluid_container_back_water_full - up: atlas:block/fluid_container_top_water_full - down: atlas:block/fluid_container_top_water_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 22 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_east_lava_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_low - south: atlas:block/fluid_container_side_lava_low - east: atlas:block/fluid_container_front_lava_low - west: atlas:block/fluid_container_back_lava_low - up: atlas:block/fluid_container_top_lava_low - down: atlas:block/fluid_container_top_lava_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 23 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_east_lava_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_medium - south: atlas:block/fluid_container_side_lava_medium - east: atlas:block/fluid_container_front_lava_medium - west: atlas:block/fluid_container_back_lava_medium - up: atlas:block/fluid_container_top_lava_medium - down: atlas:block/fluid_container_top_lava_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 24 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_east_lava_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_full - south: atlas:block/fluid_container_side_lava_full - east: atlas:block/fluid_container_front_lava_full - west: atlas:block/fluid_container_back_lava_full - up: atlas:block/fluid_container_top_lava_full - down: atlas:block/fluid_container_top_lava_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 25 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_west_water_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_low - south: atlas:block/fluid_container_side_water_low - east: atlas:block/fluid_container_back_water_low - west: atlas:block/fluid_container_front_water_low - up: atlas:block/fluid_container_top_water_low - down: atlas:block/fluid_container_top_water_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 26 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_west_water_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_medium - south: atlas:block/fluid_container_side_water_medium - east: atlas:block/fluid_container_back_water_medium - west: atlas:block/fluid_container_front_water_medium - up: atlas:block/fluid_container_top_water_medium - down: atlas:block/fluid_container_top_water_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 27 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_west_water_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_full - south: atlas:block/fluid_container_side_water_full - east: atlas:block/fluid_container_back_water_full - west: atlas:block/fluid_container_front_water_full - up: atlas:block/fluid_container_top_water_full - down: atlas:block/fluid_container_top_water_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 28 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_west_lava_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_low - south: atlas:block/fluid_container_side_lava_low - east: atlas:block/fluid_container_back_lava_low - west: atlas:block/fluid_container_front_lava_low - up: atlas:block/fluid_container_top_lava_low - down: atlas:block/fluid_container_top_lava_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 29 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_west_lava_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_medium - south: atlas:block/fluid_container_side_lava_medium - east: atlas:block/fluid_container_back_lava_medium - west: atlas:block/fluid_container_front_lava_medium - up: atlas:block/fluid_container_top_lava_medium - down: atlas:block/fluid_container_top_lava_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 30 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_west_lava_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_full - south: atlas:block/fluid_container_side_lava_full - east: atlas:block/fluid_container_back_lava_full - west: atlas:block/fluid_container_front_lava_full - up: atlas:block/fluid_container_top_lava_full - down: atlas:block/fluid_container_top_lava_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 31 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_up_water_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_low - south: atlas:block/fluid_container_side_water_low - east: atlas:block/fluid_container_side_water_low - west: atlas:block/fluid_container_side_water_low - up: atlas:block/fluid_container_front_water_low - down: atlas:block/fluid_container_back_water_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 32 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_up_water_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_medium - south: atlas:block/fluid_container_side_water_medium - east: atlas:block/fluid_container_side_water_medium - west: atlas:block/fluid_container_side_water_medium - up: atlas:block/fluid_container_front_water_medium - down: atlas:block/fluid_container_back_water_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 33 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_up_water_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_full - south: atlas:block/fluid_container_side_water_full - east: atlas:block/fluid_container_side_water_full - west: atlas:block/fluid_container_side_water_full - up: atlas:block/fluid_container_front_water_full - down: atlas:block/fluid_container_back_water_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 34 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_up_lava_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_low - south: atlas:block/fluid_container_side_lava_low - east: atlas:block/fluid_container_side_lava_low - west: atlas:block/fluid_container_side_lava_low - up: atlas:block/fluid_container_front_lava_low - down: atlas:block/fluid_container_back_lava_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 35 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_up_lava_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_medium - south: atlas:block/fluid_container_side_lava_medium - east: atlas:block/fluid_container_side_lava_medium - west: atlas:block/fluid_container_side_lava_medium - up: atlas:block/fluid_container_front_lava_medium - down: atlas:block/fluid_container_back_lava_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 36 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_up_lava_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_full - south: atlas:block/fluid_container_side_lava_full - east: atlas:block/fluid_container_side_lava_full - west: atlas:block/fluid_container_side_lava_full - up: atlas:block/fluid_container_front_lava_full - down: atlas:block/fluid_container_back_lava_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 37 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_down_water_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_low - south: atlas:block/fluid_container_side_water_low - east: atlas:block/fluid_container_side_water_low - west: atlas:block/fluid_container_side_water_low - up: atlas:block/fluid_container_back_water_low - down: atlas:block/fluid_container_front_water_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 38 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_down_water_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_medium - south: atlas:block/fluid_container_side_water_medium - east: atlas:block/fluid_container_side_water_medium - west: atlas:block/fluid_container_side_water_medium - up: atlas:block/fluid_container_back_water_medium - down: atlas:block/fluid_container_front_water_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 39 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_down_water_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_water_full - south: atlas:block/fluid_container_side_water_full - east: atlas:block/fluid_container_side_water_full - west: atlas:block/fluid_container_side_water_full - up: atlas:block/fluid_container_back_water_full - down: atlas:block/fluid_container_front_water_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 40 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_down_lava_low: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_low - south: atlas:block/fluid_container_side_lava_low - east: atlas:block/fluid_container_side_lava_low - west: atlas:block/fluid_container_side_lava_low - up: atlas:block/fluid_container_back_lava_low - down: atlas:block/fluid_container_front_lava_low - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 41 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_down_lava_medium: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_medium - south: atlas:block/fluid_container_side_lava_medium - east: atlas:block/fluid_container_side_lava_medium - west: atlas:block/fluid_container_side_lava_medium - up: atlas:block/fluid_container_back_lava_medium - down: atlas:block/fluid_container_front_lava_medium - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 42 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 -fluid_container_down_lava_full: - itemname: "Fluid Container" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_container_side_lava_full - south: atlas:block/fluid_container_side_lava_full - east: atlas:block/fluid_container_side_lava_full - west: atlas:block/fluid_container_side_lava_full - up: atlas:block/fluid_container_back_lava_full - down: atlas:block/fluid_container_front_lava_full - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 43 - hardness: 3 - block_sounds: - break_sound: block.glass.break - place_sound: block.glass.place - hit_sound: block.glass.hit - step_sound: block.glass.step - fall_sound: block.glass.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_container - probability: 1.0 - -# ─── Fluid Merger ──────────────────────────────────────────────── -fluid_merger: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube_all - textures: - all: atlas:block/fluid_merger_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 184 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_north: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_front - south: atlas:block/fluid_merger_back - east: atlas:block/fluid_merger_side - west: atlas:block/fluid_merger_side - up: atlas:block/fluid_merger_top - down: atlas:block/fluid_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 185 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_south: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_back - south: atlas:block/fluid_merger_front - east: atlas:block/fluid_merger_side - west: atlas:block/fluid_merger_side - up: atlas:block/fluid_merger_top - down: atlas:block/fluid_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 186 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_east: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side - south: atlas:block/fluid_merger_side - east: atlas:block/fluid_merger_front - west: atlas:block/fluid_merger_back - up: atlas:block/fluid_merger_top - down: atlas:block/fluid_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 187 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_west: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side - south: atlas:block/fluid_merger_side - east: atlas:block/fluid_merger_back - west: atlas:block/fluid_merger_front - up: atlas:block/fluid_merger_top - down: atlas:block/fluid_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 188 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_up: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side - south: atlas:block/fluid_merger_side - east: atlas:block/fluid_merger_side - west: atlas:block/fluid_merger_side - up: atlas:block/fluid_merger_front - down: atlas:block/fluid_merger_back - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 189 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_down: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side - south: atlas:block/fluid_merger_side - east: atlas:block/fluid_merger_side - west: atlas:block/fluid_merger_side - up: atlas:block/fluid_merger_back - down: atlas:block/fluid_merger_front - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 190 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_north_filled: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_front_water - south: atlas:block/fluid_merger_back_water - east: atlas:block/fluid_merger_side_water - west: atlas:block/fluid_merger_side_water - up: atlas:block/fluid_merger_top_water - down: atlas:block/fluid_merger_bottom_water - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 191 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_south_filled: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_back_water - south: atlas:block/fluid_merger_front_water - east: atlas:block/fluid_merger_side_water - west: atlas:block/fluid_merger_side_water - up: atlas:block/fluid_merger_top_water - down: atlas:block/fluid_merger_bottom_water - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 192 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_east_filled: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_water - south: atlas:block/fluid_merger_side_water - east: atlas:block/fluid_merger_front_water - west: atlas:block/fluid_merger_back_water - up: atlas:block/fluid_merger_top_water - down: atlas:block/fluid_merger_bottom_water - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 193 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_west_filled: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_water - south: atlas:block/fluid_merger_side_water - east: atlas:block/fluid_merger_back_water - west: atlas:block/fluid_merger_front_water - up: atlas:block/fluid_merger_top_water - down: atlas:block/fluid_merger_bottom_water - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 194 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_up_filled: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_water - south: atlas:block/fluid_merger_side_water - east: atlas:block/fluid_merger_side_water - west: atlas:block/fluid_merger_side_water - up: atlas:block/fluid_merger_front_water - down: atlas:block/fluid_merger_back_water - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 195 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_down_filled: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_water - south: atlas:block/fluid_merger_side_water - east: atlas:block/fluid_merger_side_water - west: atlas:block/fluid_merger_side_water - up: atlas:block/fluid_merger_back_water - down: atlas:block/fluid_merger_front_water - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 196 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_north_filled_lava: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_front_lava - south: atlas:block/fluid_merger_back_lava - east: atlas:block/fluid_merger_side_lava - west: atlas:block/fluid_merger_side_lava - up: atlas:block/fluid_merger_top_lava - down: atlas:block/fluid_merger_bottom_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 197 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_south_filled_lava: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_back_lava - south: atlas:block/fluid_merger_front_lava - east: atlas:block/fluid_merger_side_lava - west: atlas:block/fluid_merger_side_lava - up: atlas:block/fluid_merger_top_lava - down: atlas:block/fluid_merger_bottom_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 198 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_east_filled_lava: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_lava - south: atlas:block/fluid_merger_side_lava - east: atlas:block/fluid_merger_front_lava - west: atlas:block/fluid_merger_back_lava - up: atlas:block/fluid_merger_top_lava - down: atlas:block/fluid_merger_bottom_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 199 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_west_filled_lava: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_lava - south: atlas:block/fluid_merger_side_lava - east: atlas:block/fluid_merger_back_lava - west: atlas:block/fluid_merger_front_lava - up: atlas:block/fluid_merger_top_lava - down: atlas:block/fluid_merger_bottom_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 200 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_up_filled_lava: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_lava - south: atlas:block/fluid_merger_side_lava - east: atlas:block/fluid_merger_side_lava - west: atlas:block/fluid_merger_side_lava - up: atlas:block/fluid_merger_front_lava - down: atlas:block/fluid_merger_back_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 201 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -fluid_merger_down_filled_lava: - itemname: "Fluid Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/fluid_merger_side_lava - south: atlas:block/fluid_merger_side_lava - east: atlas:block/fluid_merger_side_lava - west: atlas:block/fluid_merger_side_lava - up: atlas:block/fluid_merger_back_lava - down: atlas:block/fluid_merger_front_lava - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 202 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: fluid_merger - probability: 1.0 - -# ─── Lava Generator ─────────────────────────────────────────────── -lava_generator: - itemname: "Lava Generator" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/lava_generator_side - south: atlas:block/lava_generator_side - east: atlas:block/lava_generator_side - west: atlas:block/lava_generator_side - up: atlas:block/lava_generator_top - down: atlas:block/lava_generator_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 152 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: lava_generator - probability: 1.0 - -lava_generator_active: - itemname: "Lava Generator" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/lava_generator_side_active - south: atlas:block/lava_generator_side_active - east: atlas:block/lava_generator_side_active - west: atlas:block/lava_generator_side_active - up: atlas:block/lava_generator_top_active - down: atlas:block/lava_generator_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 153 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: lava_generator - probability: 1.0 - -# ─── Conveyor Belt ──────────────────────────────────────────────── -conveyor_belt: - itemname: "Conveyor Belt" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/conveyor_belt - textures: - north: atlas:block/conveyor_belt_front - south: atlas:block/conveyor_belt_back - east: atlas:block/conveyor_belt_side - west: atlas:block/conveyor_belt_side - up: atlas:block/conveyor_belt_top_north - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 44 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: conveyor_belt - probability: 1.0 - -conveyor_belt_north: - itemname: "Conveyor Belt" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/conveyor_belt - textures: - north: atlas:block/conveyor_belt_front - south: atlas:block/conveyor_belt_back - east: atlas:block/conveyor_belt_side - west: atlas:block/conveyor_belt_side - up: atlas:block/conveyor_belt_top_north - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 45 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: conveyor_belt - probability: 1.0 - -conveyor_belt_south: - itemname: "Conveyor Belt" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/conveyor_belt - textures: - north: atlas:block/conveyor_belt_back - south: atlas:block/conveyor_belt_front - east: atlas:block/conveyor_belt_side - west: atlas:block/conveyor_belt_side - up: atlas:block/conveyor_belt_top_south - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 46 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: conveyor_belt - probability: 1.0 - -conveyor_belt_east: - itemname: "Conveyor Belt" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/conveyor_belt - textures: - north: atlas:block/conveyor_belt_side - south: atlas:block/conveyor_belt_side - east: atlas:block/conveyor_belt_front - west: atlas:block/conveyor_belt_back - up: atlas:block/conveyor_belt_top_east - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 47 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: conveyor_belt - probability: 1.0 - -conveyor_belt_west: - itemname: "Conveyor Belt" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/conveyor_belt - textures: - north: atlas:block/conveyor_belt_side - south: atlas:block/conveyor_belt_side - east: atlas:block/conveyor_belt_back - west: atlas:block/conveyor_belt_front - up: atlas:block/conveyor_belt_top_west - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 48 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: conveyor_belt - probability: 1.0 - -auto_smelter: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ns - textures: - north: atlas:block/auto_smelter_front - south: atlas:block/auto_smelter_back - east: atlas:block/auto_smelter_side - west: atlas:block/auto_smelter_side - up: atlas:block/auto_smelter_top_north - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 49 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_north: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ns - textures: - north: atlas:block/auto_smelter_front - south: atlas:block/auto_smelter_back - east: atlas:block/auto_smelter_side - west: atlas:block/auto_smelter_side - up: atlas:block/auto_smelter_top_north - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 50 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_south: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ns - textures: - north: atlas:block/auto_smelter_back - south: atlas:block/auto_smelter_front - east: atlas:block/auto_smelter_side - west: atlas:block/auto_smelter_side - up: atlas:block/auto_smelter_top_south - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 51 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_east: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ew - textures: - north: atlas:block/auto_smelter_side - south: atlas:block/auto_smelter_side - east: atlas:block/auto_smelter_front - west: atlas:block/auto_smelter_back - up: atlas:block/auto_smelter_top_east - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 52 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_west: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ew - textures: - north: atlas:block/auto_smelter_side - south: atlas:block/auto_smelter_side - east: atlas:block/auto_smelter_back - west: atlas:block/auto_smelter_front - up: atlas:block/auto_smelter_top_west - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 53 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_north_on: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ns_on - textures: - north: atlas:block/auto_smelter_front - south: atlas:block/auto_smelter_back - east: atlas:block/auto_smelter_side - west: atlas:block/auto_smelter_side - up: atlas:block/auto_smelter_top_north - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 54 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_south_on: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ns_on - textures: - north: atlas:block/auto_smelter_back - south: atlas:block/auto_smelter_front - east: atlas:block/auto_smelter_side - west: atlas:block/auto_smelter_side - up: atlas:block/auto_smelter_top_south - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 55 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_east_on: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ew_on - textures: - north: atlas:block/auto_smelter_side - south: atlas:block/auto_smelter_side - east: atlas:block/auto_smelter_front - west: atlas:block/auto_smelter_back - up: atlas:block/auto_smelter_top_east - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 56 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -auto_smelter_west_on: - itemname: "Auto Smelter" - material: paper - Pack: - generate_model: true - parent_model: atlas:block/auto_smelter_ew_on - textures: - north: atlas:block/auto_smelter_side - south: atlas:block/auto_smelter_side - east: atlas:block/auto_smelter_back - west: atlas:block/auto_smelter_front - up: atlas:block/auto_smelter_top_west - down: atlas:block/conveyor_belt_bottom - Mechanics: - custom_block: - type: CHORUSBLOCK - custom_variation: 57 - hardness: 3 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: auto_smelter - probability: 1.0 - -multi_power_cable: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube_all - textures: - all: atlas:block/multi_power_cable_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 154 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_north: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_front - south: atlas:block/multi_power_cable_back - east: atlas:block/multi_power_cable_side - west: atlas:block/multi_power_cable_side - up: atlas:block/multi_power_cable_cap - down: atlas:block/multi_power_cable_cap - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 155 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_south: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_back - south: atlas:block/multi_power_cable_front - east: atlas:block/multi_power_cable_side - west: atlas:block/multi_power_cable_side - up: atlas:block/multi_power_cable_cap - down: atlas:block/multi_power_cable_cap - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 156 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_east: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side - south: atlas:block/multi_power_cable_side - east: atlas:block/multi_power_cable_front - west: atlas:block/multi_power_cable_back - up: atlas:block/multi_power_cable_cap - down: atlas:block/multi_power_cable_cap - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 157 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_west: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side - south: atlas:block/multi_power_cable_side - east: atlas:block/multi_power_cable_back - west: atlas:block/multi_power_cable_front - up: atlas:block/multi_power_cable_cap - down: atlas:block/multi_power_cable_cap - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 158 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_up: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side - south: atlas:block/multi_power_cable_side - east: atlas:block/multi_power_cable_side - west: atlas:block/multi_power_cable_side - up: atlas:block/multi_power_cable_front - down: atlas:block/multi_power_cable_back - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 159 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_down: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side - south: atlas:block/multi_power_cable_side - east: atlas:block/multi_power_cable_side - west: atlas:block/multi_power_cable_side - up: atlas:block/multi_power_cable_back - down: atlas:block/multi_power_cable_front - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 160 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_north_powered: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_front_powered - south: atlas:block/multi_power_cable_back_powered - east: atlas:block/multi_power_cable_side_powered - west: atlas:block/multi_power_cable_side_powered - up: atlas:block/multi_power_cable_cap_powered - down: atlas:block/multi_power_cable_cap_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 161 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_south_powered: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_back_powered - south: atlas:block/multi_power_cable_front_powered - east: atlas:block/multi_power_cable_side_powered - west: atlas:block/multi_power_cable_side_powered - up: atlas:block/multi_power_cable_cap_powered - down: atlas:block/multi_power_cable_cap_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 162 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_east_powered: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side_powered - south: atlas:block/multi_power_cable_side_powered - east: atlas:block/multi_power_cable_front_powered - west: atlas:block/multi_power_cable_back_powered - up: atlas:block/multi_power_cable_cap_powered - down: atlas:block/multi_power_cable_cap_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 163 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_west_powered: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side_powered - south: atlas:block/multi_power_cable_side_powered - east: atlas:block/multi_power_cable_back_powered - west: atlas:block/multi_power_cable_front_powered - up: atlas:block/multi_power_cable_cap_powered - down: atlas:block/multi_power_cable_cap_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 164 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_up_powered: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side_powered - south: atlas:block/multi_power_cable_side_powered - east: atlas:block/multi_power_cable_side_powered - west: atlas:block/multi_power_cable_side_powered - up: atlas:block/multi_power_cable_front_powered - down: atlas:block/multi_power_cable_back_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 165 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.hit - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -multi_power_cable_down_powered: - itemname: "Multi Power Cable" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/multi_power_cable_side_powered - south: atlas:block/multi_power_cable_side_powered - east: atlas:block/multi_power_cable_side_powered - west: atlas:block/multi_power_cable_side_powered - up: atlas:block/multi_power_cable_back_powered - down: atlas:block/multi_power_cable_front_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 166 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: multi_power_cable - probability: 1.0 - -# ─── Cobblestone Factory ────────────────────────────────────── -cobblestone_factory: - itemname: "Cobblestone Factory" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/cobblestone_factory_side - south: atlas:block/cobblestone_factory_side - east: atlas:block/cobblestone_factory_side - west: atlas:block/cobblestone_factory_side - up: atlas:block/cobblestone_factory_top - down: atlas:block/cobblestone_factory_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 167 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: cobblestone_factory - probability: 1.0 - -cobblestone_factory_active: - itemname: "Cobblestone Factory" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/cobblestone_factory_side_active - south: atlas:block/cobblestone_factory_side_active - east: atlas:block/cobblestone_factory_side_active - west: atlas:block/cobblestone_factory_side_active - up: atlas:block/cobblestone_factory_top_active - down: atlas:block/cobblestone_factory_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 168 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: cobblestone_factory - probability: 1.0 - -# ─── Obsidian Factory ───────────────────────────────────────── -obsidian_factory: - itemname: "Obsidian Factory" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/obsidian_factory_side - south: atlas:block/obsidian_factory_side - east: atlas:block/obsidian_factory_side - west: atlas:block/obsidian_factory_side - up: atlas:block/obsidian_factory_top - down: atlas:block/obsidian_factory_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 169 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: obsidian_factory - probability: 1.0 - -obsidian_factory_active: - itemname: "Obsidian Factory" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/obsidian_factory_side_active - south: atlas:block/obsidian_factory_side_active - east: atlas:block/obsidian_factory_side_active - west: atlas:block/obsidian_factory_side_active - up: atlas:block/obsidian_factory_top_active - down: atlas:block/obsidian_factory_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 170 - hardness: 5 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: obsidian_factory - probability: 1.0 - -# ─── Power Merger ──────────────────────────────────────────────── -power_merger: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube_all - textures: - all: atlas:block/power_merger_side - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 171 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_north: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_front - south: atlas:block/power_merger_back - east: atlas:block/power_merger_side - west: atlas:block/power_merger_side - up: atlas:block/power_merger_top - down: atlas:block/power_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 172 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_south: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_back - south: atlas:block/power_merger_front - east: atlas:block/power_merger_side - west: atlas:block/power_merger_side - up: atlas:block/power_merger_top - down: atlas:block/power_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 173 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_east: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side - south: atlas:block/power_merger_side - east: atlas:block/power_merger_front - west: atlas:block/power_merger_back - up: atlas:block/power_merger_top - down: atlas:block/power_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 174 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_west: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side - south: atlas:block/power_merger_side - east: atlas:block/power_merger_back - west: atlas:block/power_merger_front - up: atlas:block/power_merger_top - down: atlas:block/power_merger_bottom - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 175 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_up: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side - south: atlas:block/power_merger_side - east: atlas:block/power_merger_side - west: atlas:block/power_merger_side - up: atlas:block/power_merger_front - down: atlas:block/power_merger_back - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 176 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_down: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side - south: atlas:block/power_merger_side - east: atlas:block/power_merger_side - west: atlas:block/power_merger_side - up: atlas:block/power_merger_back - down: atlas:block/power_merger_front - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 177 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_north_powered: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_front_powered - south: atlas:block/power_merger_back_powered - east: atlas:block/power_merger_side_powered - west: atlas:block/power_merger_side_powered - up: atlas:block/power_merger_top_powered - down: atlas:block/power_merger_bottom_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 178 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_south_powered: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_back_powered - south: atlas:block/power_merger_front_powered - east: atlas:block/power_merger_side_powered - west: atlas:block/power_merger_side_powered - up: atlas:block/power_merger_top_powered - down: atlas:block/power_merger_bottom_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 179 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_east_powered: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side_powered - south: atlas:block/power_merger_side_powered - east: atlas:block/power_merger_front_powered - west: atlas:block/power_merger_back_powered - up: atlas:block/power_merger_top_powered - down: atlas:block/power_merger_bottom_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 180 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_west_powered: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side_powered - south: atlas:block/power_merger_side_powered - east: atlas:block/power_merger_back_powered - west: atlas:block/power_merger_front_powered - up: atlas:block/power_merger_top_powered - down: atlas:block/power_merger_bottom_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 181 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_up_powered: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side_powered - south: atlas:block/power_merger_side_powered - east: atlas:block/power_merger_side_powered - west: atlas:block/power_merger_side_powered - up: atlas:block/power_merger_front_powered - down: atlas:block/power_merger_back_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 182 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 - -power_merger_down_powered: - itemname: "Power Merger" - material: paper - Pack: - generate_model: true - parent_model: block/cube - textures: - north: atlas:block/power_merger_side_powered - south: atlas:block/power_merger_side_powered - east: atlas:block/power_merger_side_powered - west: atlas:block/power_merger_side_powered - up: atlas:block/power_merger_back_powered - down: atlas:block/power_merger_front_powered - Mechanics: - custom_block: - type: NOTEBLOCK - custom_variation: 183 - hardness: 2 - block_sounds: - break_sound: block.metal.break - place_sound: block.metal.place - hit_sound: block.metal.hit - step_sound: block.metal.step - fall_sound: block.metal.fall - drop: - silktouch: false - loots: - - nexo_item: power_merger - probability: 1.0 diff --git a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew.json b/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew.json deleted file mode 100644 index e337731..0000000 --- a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "textures": { - "particle": "#up", - "fire": "atlas:block/auto_smelter_fire_off", - "housing": "atlas:block/auto_smelter_housing" - }, - "elements": [ - { - "from": [0, 0, 0], - "to": [16, 6, 16], - "faces": { - "north": { "texture": "#north", "uv": [0, 10, 16, 16] }, - "south": { "texture": "#south", "uv": [0, 10, 16, 16] }, - "east": { "texture": "#east", "uv": [0, 10, 16, 16] }, - "west": { "texture": "#west", "uv": [0, 10, 16, 16] }, - "up": { "texture": "#up" }, - "down": { "texture": "#down", "cullface": "down" } - } - }, - { - "from": [0, 6, 0], - "to": [16, 16, 4], - "faces": { - "north": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "south": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "east": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "west": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "up": { "texture": "#housing", "uv": [0, 0, 16, 4] } - } - }, - { - "from": [0, 6, 12], - "to": [16, 16, 16], - "faces": { - "north": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "south": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "east": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "west": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "up": { "texture": "#housing", "uv": [0, 12, 16, 16] } - } - }, - { - "from": [0, 14, 4], - "to": [16, 16, 12], - "faces": { - "east": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "west": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "up": { "texture": "#up", "uv": [0, 4, 16, 12] }, - "down": { "texture": "#fire", "uv": [0, 4, 16, 12] } - } - } - ] -} diff --git a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew_on.json b/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew_on.json deleted file mode 100644 index 75b6a5a..0000000 --- a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ew_on.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "textures": { - "particle": "#up", - "fire": "atlas:block/auto_smelter_fire", - "housing": "atlas:block/auto_smelter_housing" - }, - "elements": [ - { - "from": [0, 0, 0], - "to": [16, 6, 16], - "faces": { - "north": { "texture": "#north", "uv": [0, 10, 16, 16] }, - "south": { "texture": "#south", "uv": [0, 10, 16, 16] }, - "east": { "texture": "#east", "uv": [0, 10, 16, 16] }, - "west": { "texture": "#west", "uv": [0, 10, 16, 16] }, - "up": { "texture": "#up" }, - "down": { "texture": "#down", "cullface": "down" } - } - }, - { - "from": [0, 6, 0], - "to": [16, 16, 4], - "faces": { - "north": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "south": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "east": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "west": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "up": { "texture": "#housing", "uv": [0, 0, 16, 4] } - } - }, - { - "from": [0, 6, 12], - "to": [16, 16, 16], - "faces": { - "north": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "south": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "east": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "west": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "up": { "texture": "#housing", "uv": [0, 12, 16, 16] } - } - }, - { - "from": [0, 14, 4], - "to": [16, 16, 12], - "faces": { - "east": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "west": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "up": { "texture": "#up", "uv": [0, 4, 16, 12] }, - "down": { "texture": "#fire", "uv": [0, 4, 16, 12] } - } - } - ] -} diff --git a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns.json b/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns.json deleted file mode 100644 index ae0249f..0000000 --- a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "textures": { - "particle": "#up", - "fire": "atlas:block/auto_smelter_fire_off", - "housing": "atlas:block/auto_smelter_housing" - }, - "elements": [ - { - "from": [0, 0, 0], - "to": [16, 6, 16], - "faces": { - "north": { "texture": "#north", "uv": [0, 10, 16, 16] }, - "south": { "texture": "#south", "uv": [0, 10, 16, 16] }, - "east": { "texture": "#east", "uv": [0, 10, 16, 16] }, - "west": { "texture": "#west", "uv": [0, 10, 16, 16] }, - "up": { "texture": "#up" }, - "down": { "texture": "#down", "cullface": "down" } - } - }, - { - "from": [0, 6, 0], - "to": [4, 16, 16], - "faces": { - "north": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "south": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "east": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "west": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "up": { "texture": "#housing", "uv": [0, 0, 4, 16] } - } - }, - { - "from": [12, 6, 0], - "to": [16, 16, 16], - "faces": { - "north": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "south": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "east": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "west": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "up": { "texture": "#housing", "uv": [12, 0, 16, 16] } - } - }, - { - "from": [4, 14, 0], - "to": [12, 16, 16], - "faces": { - "north": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "south": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "up": { "texture": "#up", "uv": [4, 0, 12, 16] }, - "down": { "texture": "#fire", "uv": [4, 0, 12, 16] } - } - } - ] -} diff --git a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns_on.json b/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns_on.json deleted file mode 100644 index fce2d8a..0000000 --- a/src/main/resources/nexo/pack/assets/atlas/models/block/auto_smelter_ns_on.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "textures": { - "particle": "#up", - "fire": "atlas:block/auto_smelter_fire", - "housing": "atlas:block/auto_smelter_housing" - }, - "elements": [ - { - "from": [0, 0, 0], - "to": [16, 6, 16], - "faces": { - "north": { "texture": "#north", "uv": [0, 10, 16, 16] }, - "south": { "texture": "#south", "uv": [0, 10, 16, 16] }, - "east": { "texture": "#east", "uv": [0, 10, 16, 16] }, - "west": { "texture": "#west", "uv": [0, 10, 16, 16] }, - "up": { "texture": "#up" }, - "down": { "texture": "#down", "cullface": "down" } - } - }, - { - "from": [0, 6, 0], - "to": [4, 16, 16], - "faces": { - "north": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "south": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "east": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "west": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "up": { "texture": "#housing", "uv": [0, 0, 4, 16] } - } - }, - { - "from": [12, 6, 0], - "to": [16, 16, 16], - "faces": { - "north": { "texture": "#housing", "uv": [12, 0, 16, 10] }, - "south": { "texture": "#housing", "uv": [0, 0, 4, 10] }, - "east": { "texture": "#housing", "uv": [0, 0, 16, 10] }, - "west": { "texture": "#fire", "uv": [0, 0, 16, 10] }, - "up": { "texture": "#housing", "uv": [12, 0, 16, 16] } - } - }, - { - "from": [4, 14, 0], - "to": [12, 16, 16], - "faces": { - "north": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "south": { "texture": "#housing", "uv": [4, 0, 12, 2] }, - "up": { "texture": "#up", "uv": [4, 0, 12, 16] }, - "down": { "texture": "#fire", "uv": [4, 0, 12, 16] } - } - } - ] -} diff --git a/src/main/resources/nexo/pack/assets/atlas/models/block/conveyor_belt.json b/src/main/resources/nexo/pack/assets/atlas/models/block/conveyor_belt.json deleted file mode 100644 index ea82db7..0000000 --- a/src/main/resources/nexo/pack/assets/atlas/models/block/conveyor_belt.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "textures": { - "particle": "#up" - }, - "elements": [ - { - "from": [0, 0, 0], - "to": [16, 6, 16], - "faces": { - "north": { "texture": "#north", "uv": [0, 10, 16, 16] }, - "south": { "texture": "#south", "uv": [0, 10, 16, 16] }, - "east": { "texture": "#east", "uv": [0, 10, 16, 16] }, - "west": { "texture": "#west", "uv": [0, 10, 16, 16] }, - "up": { "texture": "#up" }, - "down": { "texture": "#down", "cullface": "down" } - } - } - ] -} diff --git a/src/main/resources/nexo/pack/assets/minecraft/font/default.json b/src/main/resources/nexo/pack/assets/minecraft/font/default.json deleted file mode 100644 index 5e5d6a8..0000000 --- a/src/main/resources/nexo/pack/assets/minecraft/font/default.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "providers": [ - { - "type": "bitmap", - "file": "atlas:block/guide_small_solar_panel.png", - "ascent": 7, - "height": 16, - "chars": ["\uE100"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_lava_generator.png", - "ascent": 7, - "height": 16, - "chars": ["\uE101"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_power_cable.png", - "ascent": 7, - "height": 16, - "chars": ["\uE102"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_small_battery.png", - "ascent": 7, - "height": 16, - "chars": ["\uE103"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_small_drill.png", - "ascent": 7, - "height": 16, - "chars": ["\uE104"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_fluid_pump.png", - "ascent": 7, - "height": 16, - "chars": ["\uE105"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_fluid_pipe.png", - "ascent": 7, - "height": 16, - "chars": ["\uE106"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_fluid_container.png", - "ascent": 7, - "height": 16, - "chars": ["\uE107"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_conveyor_belt.png", - "ascent": 7, - "height": 16, - "chars": ["\uE108"] - }, - { - "type": "bitmap", - "file": "atlas:block/guide_auto_smelter.png", - "ascent": 7, - "height": 16, - "chars": ["\uE109"] - } - ] -} diff --git a/src/main/resources/nexo/recipes/shapeless/atlas_recipes.yml b/src/main/resources/nexo/recipes/shapeless/atlas_recipes.yml deleted file mode 100644 index 01032ef..0000000 --- a/src/main/resources/nexo/recipes/shapeless/atlas_recipes.yml +++ /dev/null @@ -1,269 +0,0 @@ -# Atlas Custom Recipes - -small_solar_panel_recipe: - result: - nexo_item: small_solar_panel - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: LAPIS_LAZULI - E: - minecraft_type: LAPIS_LAZULI - F: - minecraft_type: LAPIS_LAZULI - G: - minecraft_type: REDSTONE - H: - minecraft_type: REDSTONE - I: - minecraft_type: REDSTONE - -power_cable_recipe: - result: - nexo_item: power_cable - amount: 1 - ingredients: - A: - minecraft_type: COPPER_INGOT - -small_drill_recipe: - result: - nexo_item: small_drill - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - G: - minecraft_type: DIAMOND - -small_battery_recipe: - result: - nexo_item: small_battery - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - G: - minecraft_type: COPPER_INGOT - -fluid_pump_recipe: - result: - nexo_item: fluid_pump - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - G: - minecraft_type: BUCKET - -fluid_pipe_recipe: - result: - nexo_item: fluid_pipe - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - -fluid_container_recipe: - result: - nexo_item: fluid_container - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: IRON_INGOT - E: - minecraft_type: GLASS - F: - minecraft_type: GLASS - G: - minecraft_type: GLASS - H: - minecraft_type: GLASS - I: - minecraft_type: BUCKET - -lava_generator_recipe: - result: - nexo_item: lava_generator - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - G: - minecraft_type: MAGMA_BLOCK - -conveyor_belt_recipe: - result: - nexo_item: conveyor_belt - amount: 4 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - -multi_power_cable_recipe: - result: - nexo_item: multi_power_cable - amount: 1 - ingredients: - A: - minecraft_type: COPPER_INGOT - B: - minecraft_type: COPPER_INGOT - C: - minecraft_type: COPPER_INGOT - D: - minecraft_type: COPPER_INGOT - -auto_smelter_recipe: - result: - nexo_item: auto_smelter - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - G: - minecraft_type: FURNACE - -cobblestone_factory_recipe: - result: - nexo_item: cobblestone_factory - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - G: - minecraft_type: COBBLESTONE - -fluid_merger_recipe: - result: - nexo_item: fluid_merger - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: IRON_INGOT - E: - minecraft_type: BUCKET - -power_merger_recipe: - result: - nexo_item: power_merger - amount: 1 - ingredients: - A: - minecraft_type: COPPER_INGOT - B: - minecraft_type: COPPER_INGOT - C: - minecraft_type: COPPER_INGOT - D: - minecraft_type: COPPER_INGOT - E: - minecraft_type: REDSTONE - -obsidian_factory_recipe: - result: - nexo_item: obsidian_factory - amount: 1 - ingredients: - A: - minecraft_type: IRON_INGOT - B: - minecraft_type: IRON_INGOT - C: - minecraft_type: IRON_INGOT - D: - minecraft_type: REDSTONE - E: - minecraft_type: REDSTONE - F: - minecraft_type: REDSTONE - G: - minecraft_type: OBSIDIAN diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index d517493..0f2f218 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -6,4 +6,4 @@ description: A power generation and transfer plugin author: CoderJoe depend: - - Nexo + - CraftEngine diff --git a/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt b/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt index 67a967b..09246c3 100644 --- a/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt @@ -32,21 +32,21 @@ class AtlasPluginTest { } @Test - fun `power system initializes with 27 block types`() { + fun `power system initializes with 17 block types`() { TestHelper.initPowerFactory() - assertEquals(55, PowerBlockFactory.getRegisteredBlockIds().size) + assertEquals(17, PowerBlockFactory.getRegisteredBlockIds().size) } @Test - fun `fluid system initializes with 63 block types`() { + fun `fluid system initializes with 6 block types`() { TestHelper.initFluidFactory() - assertEquals(81, FluidBlockFactory.getRegisteredBlockIds().size) + assertEquals(6, FluidBlockFactory.getRegisteredBlockIds().size) } @Test - fun `transport system initializes with 4 block types`() { + fun `transport system initializes with 1 block type`() { TestHelper.initTransportFactory() - assertEquals(4, TransportBlockFactory.getRegisteredBlockIds().size) + assertEquals(1, TransportBlockFactory.getRegisteredBlockIds().size) } @Test diff --git a/src/test/kotlin/com/coderjoe/atlas/CrossSystemIntegrationTest.kt b/src/test/kotlin/com/coderjoe/atlas/CrossSystemIntegrationTest.kt index 2247261..c40e4e6 100644 --- a/src/test/kotlin/com/coderjoe/atlas/CrossSystemIntegrationTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/CrossSystemIntegrationTest.kt @@ -44,11 +44,11 @@ class CrossSystemIntegrationTest { // Solar panel at (1,64,0) val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry(powerRegistry, solar, "atlas:small_solar_panel") // Pump at (0,64,0) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") + TestHelper.addToRegistry(fluidRegistry, pump, "atlas:fluid_pump") // Water cauldron to the NORTH val levelled = mockk(relaxed = true) @@ -74,7 +74,7 @@ class CrossSystemIntegrationTest { @Test fun `pump with no powered neighbors gets NO_POWER`() { val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") + TestHelper.addToRegistry(fluidRegistry, pump, "atlas:fluid_pump") // Water cauldron to the NORTH val cauldronBlock = mockk(relaxed = true) @@ -98,15 +98,15 @@ class CrossSystemIntegrationTest { // Solar at (0,64,0) - generates power val solar = SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 0.0)) - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry(powerRegistry, solar, "atlas:small_solar_panel") // Cable at (0,64,1) facing SOUTH - pulls from solar behind val cable = PowerCable(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) - TestHelper.addToRegistry(powerRegistry, cable, "power_cable_south") + TestHelper.addToRegistry(powerRegistry, cable, "atlas:power_cable") // Pump at (0,64,2) - adjacent to cable val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 2.0)) - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") + TestHelper.addToRegistry(fluidRegistry, pump, "atlas:fluid_pump") // Water cauldron at (0,64,3) = SOUTH of pump val levelled = mockk(relaxed = true) @@ -129,7 +129,7 @@ class CrossSystemIntegrationTest { // Actually let's just test the power flow + extraction parts // Pipe at (-1,64,2) facing EAST, pulls from pump behind it (WEST = x+1 = pump at 0,64,2) val pipe = FluidPipe(TestHelper.createLocation(-1.0, 64.0, 2.0), BlockFace.WEST) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_west") + TestHelper.addToRegistry(fluidRegistry, pipe, "atlas:fluid_pipe") // Step 1: solar generates solar.callPowerUpdate() @@ -161,10 +161,10 @@ class CrossSystemIntegrationTest { fun `pump extracts lava from lava cauldron with power`() { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry(powerRegistry, solar, "atlas:small_solar_panel") val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") + TestHelper.addToRegistry(fluidRegistry, pump, "atlas:fluid_pump") val cauldronBlock = mockk(relaxed = true) every { cauldronBlock.type } returns Material.LAVA_CAULDRON @@ -189,11 +189,11 @@ class CrossSystemIntegrationTest { // Solar at (1,64,0) val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry(powerRegistry, solar, "atlas:small_solar_panel") // Pump at (0,64,0) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") + TestHelper.addToRegistry(fluidRegistry, pump, "atlas:fluid_pump") // Water cauldron to the NORTH of pump val levelled = mockk(relaxed = true) @@ -226,7 +226,7 @@ class CrossSystemIntegrationTest { // pipe calls canRemoveFluidFrom(SOUTH), cauldronFace=NORTH, oppositeFace=SOUTH ✓ val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + TestHelper.addToRegistry(fluidRegistry, pipe, "atlas:fluid_pipe") // Step 2: Pipe pulls from pump pipe.callFluidUpdate() diff --git a/src/test/kotlin/com/coderjoe/atlas/NexoIntegrationTest.kt b/src/test/kotlin/com/coderjoe/atlas/NexoIntegrationTest.kt deleted file mode 100644 index e6a3ac1..0000000 --- a/src/test/kotlin/com/coderjoe/atlas/NexoIntegrationTest.kt +++ /dev/null @@ -1,54 +0,0 @@ -package com.coderjoe.atlas - -import io.mockk.every -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.Assertions.assertDoesNotThrow -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import java.io.File - -class NexoIntegrationTest { - @BeforeEach - fun setup() { - TestHelper.setup() - } - - @AfterEach - fun teardown() { - TestHelper.teardown() - } - - @Test - fun `initialize runs without errors when Nexo folder missing`() { - // Nexo folder doesn't exist in test environment - // Should log warning but not crash - assertDoesNotThrow { - val integration = NexoIntegration(TestHelper.mockPlugin) - integration.initialize() - } - } - - @Test - fun `initialize copies files when Nexo folders exist`() { - // Create Nexo folder structure - val nexoFolder = File(TestHelper.dataFolder.parentFile, "Nexo") - File(nexoFolder, "items").mkdirs() - File(nexoFolder, "pack/assets/atlas/textures/block").mkdirs() - File(nexoFolder, "recipes/shapeless").mkdirs() - - // Mock saveResource to create the source files - every { TestHelper.mockPlugin.saveResource(any(), any()) } answers { - val path = firstArg() - val file = File(TestHelper.dataFolder, path) - file.parentFile.mkdirs() - file.writeText("test-content") - } - // Use the actual test dataFolder's parent - every { TestHelper.mockPlugin.dataFolder } returns TestHelper.dataFolder - - val integration = NexoIntegration(TestHelper.mockPlugin) - assertDoesNotThrow { integration.initialize() } - - nexoFolder.deleteRecursively() - } -} diff --git a/src/test/kotlin/com/coderjoe/atlas/PlayerJoinListenerTest.kt b/src/test/kotlin/com/coderjoe/atlas/PlayerJoinListenerTest.kt index 4e1ae76..059e56a 100644 --- a/src/test/kotlin/com/coderjoe/atlas/PlayerJoinListenerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/PlayerJoinListenerTest.kt @@ -2,10 +2,10 @@ package com.coderjoe.atlas import io.mockk.every import io.mockk.mockk -import io.mockk.verify import org.bukkit.entity.Player import org.bukkit.event.player.PlayerJoinEvent import org.junit.jupiter.api.AfterEach +import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -21,30 +21,13 @@ class PlayerJoinListenerTest { } @Test - fun `onPlayerJoin sends pack when configured`() { - val manager = mockk(relaxed = true) - every { manager.isConfigured() } returns true - - val listener = PlayerJoinListener(manager) - val player = mockk(relaxed = true) - val event = mockk(relaxed = true) - every { event.player } returns player - - listener.onPlayerJoin(event) - verify(exactly = 1) { manager.sendToPlayer(player) } - } - - @Test - fun `onPlayerJoin does not send when not configured`() { - val manager = mockk(relaxed = true) - every { manager.isConfigured() } returns false - - val listener = PlayerJoinListener(manager) + fun `onPlayerJoin does not throw`() { + val listener = PlayerJoinListener() val player = mockk(relaxed = true) + every { player.server } returns TestHelper.mockServer val event = mockk(relaxed = true) every { event.player } returns player - listener.onPlayerJoin(event) - verify(exactly = 0) { manager.sendToPlayer(any()) } + assertDoesNotThrow { listener.onPlayerJoin(event) } } } diff --git a/src/test/kotlin/com/coderjoe/atlas/ResourcePackManagerTest.kt b/src/test/kotlin/com/coderjoe/atlas/ResourcePackManagerTest.kt deleted file mode 100644 index 781ead9..0000000 --- a/src/test/kotlin/com/coderjoe/atlas/ResourcePackManagerTest.kt +++ /dev/null @@ -1,80 +0,0 @@ -package com.coderjoe.atlas - -import io.mockk.every -import io.mockk.mockk -import io.mockk.verify -import net.kyori.adventure.resource.ResourcePackRequest -import org.bukkit.configuration.file.YamlConfiguration -import org.bukkit.entity.Player -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.Assertions.assertFalse -import org.junit.jupiter.api.Assertions.assertTrue -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test - -class ResourcePackManagerTest { - @BeforeEach - fun setup() { - TestHelper.setup() - } - - @AfterEach - fun teardown() { - TestHelper.teardown() - } - - private fun createManagerWithConfig( - enabled: Boolean, - url: String = "", - hash: String = "", - ): ResourcePackManager { - val config = YamlConfiguration() - config.set("resource-pack.enabled", enabled) - config.set("resource-pack.url", url) - config.set("resource-pack.hash", hash) - config.set("resource-pack.required", false) - config.set("resource-pack.prompt", "") - - every { TestHelper.mockPlugin.config } returns config - - val manager = ResourcePackManager(TestHelper.mockPlugin) - manager.load() - return manager - } - - @Test - fun `load disabled - isConfigured false`() { - val manager = createManagerWithConfig(enabled = false) - assertFalse(manager.isConfigured()) - } - - @Test - fun `load blank URL - isConfigured false`() { - val manager = createManagerWithConfig(enabled = true, url = "") - assertFalse(manager.isConfigured()) - } - - @Test - fun `load valid config - isConfigured true`() { - val manager = createManagerWithConfig(enabled = true, url = "https://example.com/pack.zip", hash = "abc123") - assertTrue(manager.isConfigured()) - } - - @Test - fun `sendToPlayer when not configured is no-op`() { - val manager = createManagerWithConfig(enabled = false) - val player = mockk(relaxed = true) - - manager.sendToPlayer(player) - verify(exactly = 0) { player.sendResourcePacks(any()) } - } - - @Test - fun `sendToPlayer when configured sends pack`() { - val manager = createManagerWithConfig(enabled = true, url = "https://example.com/pack.zip", hash = "abc123") - val player = mockk(relaxed = true) - - manager.sendToPlayer(player) - verify(exactly = 1) { player.sendResourcePacks(any()) } - } -} diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockDataTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockDataTest.kt index f594f10..ccd088a 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockDataTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockDataTest.kt @@ -26,9 +26,9 @@ class FluidBlockDataTest { fun `fromFluidBlock for FluidPump`() { val pump = FluidPump(TestHelper.createLocation(1.0, 2.0, 3.0)) pump.storeFluid(FluidType.WATER) - val data = FluidBlockData.fromFluidBlock(pump, "fluid_pump") + val data = FluidBlockData.fromFluidBlock(pump, "atlas:fluid_pump") - assertEquals("fluid_pump", data.blockId) + assertEquals("atlas:fluid_pump", data.blockId) assertEquals("world", data.world) assertEquals(1, data.x) assertEquals(2, data.y) @@ -40,7 +40,7 @@ class FluidBlockDataTest { @Test fun `fromFluidBlock for FluidPipe captures facing`() { val pipe = FluidPipe(TestHelper.createLocation(), BlockFace.EAST) - val data = FluidBlockData.fromFluidBlock(pipe, "fluid_pipe_east") + val data = FluidBlockData.fromFluidBlock(pipe, "atlas:fluid_pipe") assertEquals("EAST", data.facing) } @@ -106,9 +106,9 @@ class FluidBlockDataTest { fun `round-trip FluidPipe preserves all fields`() { val pipe = FluidPipe(TestHelper.createLocation(1.0, 2.0, 3.0), BlockFace.NORTH) pipe.storeFluid(FluidType.LAVA) - val data = FluidBlockData.fromFluidBlock(pipe, "fluid_pipe_north") + val data = FluidBlockData.fromFluidBlock(pipe, "atlas:fluid_pipe") - assertEquals("fluid_pipe_north", data.blockId) + assertEquals("atlas:fluid_pipe", data.blockId) assertEquals("NORTH", data.facing) assertEquals("LAVA", data.fluidType) assertEquals(BlockFace.NORTH, data.toBlockFace()) diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockFactoryTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockFactoryTest.kt index 0e31271..48015a5 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockFactoryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockFactoryTest.kt @@ -25,8 +25,8 @@ class FluidBlockFactoryTest { @Test fun `register and isRegistered returns true`() { - FluidBlockFactory.register("fluid_pump") { loc, _ -> FluidPump(loc) } - assertTrue(FluidBlockFactory.isRegistered("fluid_pump")) + FluidBlockFactory.register("atlas:fluid_pump") { loc, _ -> FluidPump(loc) } + assertTrue(FluidBlockFactory.isRegistered("atlas:fluid_pump")) } @Test @@ -36,8 +36,8 @@ class FluidBlockFactoryTest { @Test fun `createFluidBlock returns correct instance`() { - FluidBlockFactory.register("fluid_pump") { loc, _ -> FluidPump(loc) } - val block = FluidBlockFactory.createFluidBlock("fluid_pump", TestHelper.createLocation()) + FluidBlockFactory.register("atlas:fluid_pump") { loc, _ -> FluidPump(loc) } + val block = FluidBlockFactory.createFluidBlock("atlas:fluid_pump", TestHelper.createLocation()) assertNotNull(block) assertTrue(block is FluidPump) } diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt index f63d5b3..b611c33 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt @@ -26,8 +26,12 @@ class FluidBlockInitializerTest { TestHelper.initFluidFactory() val ids = FluidBlockFactory.getRegisteredBlockIds() - // 3 pump + 6 directional pipe + 6 water-filled + 6 lava-filled + 42 container + 18 fluid merger = 81 - assertEquals(81, ids.size) + // FluidPump: 3 (base + active + active_lava) + // FluidPipe: 1 (base only) + // FluidContainer: 1 (base only) + // FluidMerger: 1 (base only) + // Total: 6 + assertEquals(6, ids.size) } @Test @@ -39,40 +43,29 @@ class FluidBlockInitializerTest { } @Test - fun `all pipe directional IDs are registered`() { + fun `pipe base ID is registered`() { TestHelper.initFluidFactory() - for (id in FluidPipe.DIRECTIONAL_IDS.values) { - assertTrue(FluidBlockFactory.isRegistered(id), "Missing: $id") - } - } - - @Test - fun `all pipe water-filled IDs are registered`() { - TestHelper.initFluidFactory() - for (id in FluidPipe.WATER_FILLED_IDS.values) { - assertTrue(FluidBlockFactory.isRegistered(id), "Missing: $id") - } - } - - @Test - fun `all pipe lava-filled IDs are registered`() { - TestHelper.initFluidFactory() - for (id in FluidPipe.LAVA_FILLED_IDS.values) { - assertTrue(FluidBlockFactory.isRegistered(id), "Missing: $id") - } + assertTrue(FluidBlockFactory.isRegistered(FluidPipe.BLOCK_ID)) } @Test fun `pump ID creates FluidPump`() { TestHelper.initFluidFactory() - val block = FluidBlockFactory.createFluidBlock("fluid_pump", TestHelper.createLocation()) + val block = FluidBlockFactory.createFluidBlock( + "atlas:fluid_pump", + TestHelper.createLocation() + ) assertTrue(block is FluidPump) } @Test fun `pipe ID creates FluidPipe`() { TestHelper.initFluidFactory() - val block = FluidBlockFactory.createFluidBlock("fluid_pipe_north", TestHelper.createLocation(), BlockFace.NORTH) + val block = FluidBlockFactory.createFluidBlock( + "atlas:fluid_pipe", + TestHelper.createLocation(), + BlockFace.NORTH + ) assertTrue(block is FluidPipe) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockListenerTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockListenerTest.kt index 9bffad3..a14c446 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockListenerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockListenerTest.kt @@ -8,7 +8,6 @@ import io.mockk.every import io.mockk.mockk import io.mockk.verify import org.bukkit.block.Block -import org.bukkit.block.BlockFace import org.bukkit.entity.Player import org.bukkit.event.block.Action import org.bukkit.event.block.BlockBreakEvent @@ -16,7 +15,6 @@ import org.bukkit.event.block.BlockPlaceEvent import org.bukkit.event.player.PlayerInteractEvent import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertDoesNotThrow -import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -78,7 +76,7 @@ class FluidBlockListenerTest { fun `onBlockBreak unregisters fluid block`() { val loc = TestHelper.createLocation() val pump = FluidPump(loc) - TestHelper.addToRegistry(registry, pump, "fluid_pump") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") val block = mockk(relaxed = true) every { block.location } returns loc @@ -141,88 +139,4 @@ class FluidBlockListenerTest { listener.onPlayerInteract(event) verify(exactly = 0) { event.isCancelled = true } } - - @Test - fun `getPlayerFacing returns UP when dy positive`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 65.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.UP, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns EAST when dx positive`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(1.0, 64.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.EAST, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns DOWN when dy negative`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 63.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.DOWN, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns WEST when dx negative`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(-1.0, 64.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.WEST, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns SOUTH when dz positive`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 64.0, 1.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.SOUTH, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns NORTH when dz negative`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 64.0, -1.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.NORTH, AtlasBlockListener.getPlayerFacing(event)) - } } diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt index 0a9be62..7c3e7ff 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt @@ -15,7 +15,6 @@ import org.bukkit.block.data.Levelled import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertFalse -import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -88,21 +87,24 @@ class FluidBlockLogicTest { @Test fun `pump visual state NONE`() { val pump = FluidPump(TestHelper.createLocation()) - assertEquals("fluid_pump", pump.getVisualStateBlockId()) + assertEquals("atlas:fluid_pump", pump.getVisualStateBlockId()) } @Test fun `pump visual state WATER`() { val pump = FluidPump(TestHelper.createLocation()) pump.storeFluid(FluidType.WATER) - assertEquals("fluid_pump_active", pump.getVisualStateBlockId()) + assertEquals("atlas:fluid_pump_active", pump.getVisualStateBlockId()) } @Test fun `pump visual state LAVA`() { val pump = FluidPump(TestHelper.createLocation()) pump.storeFluid(FluidType.LAVA) - assertEquals("fluid_pump_active_lava", pump.getVisualStateBlockId()) + assertEquals( + "atlas:fluid_pump_active_lava", + pump.getVisualStateBlockId() + ) } @Test @@ -133,12 +135,18 @@ class FluidBlockLogicTest { val powerRegistry = PowerBlockRegistry(TestHelper.mockPlugin) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - // Mock all 6 adjacent blocks as non-cauldron - for (face in listOf(BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + for (face in listOf( + BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, + BlockFace.WEST, BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } pump.callFluidUpdate() @@ -150,17 +158,24 @@ class FluidBlockLogicTest { val powerRegistry = PowerBlockRegistry(TestHelper.mockPlugin) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - // Water cauldron to the NORTH val cauldronBlock = mockk(relaxed = true) every { cauldronBlock.type } returns Material.WATER_CAULDRON - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns cauldronBlock - - // All other directions are air - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns cauldronBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } pump.callFluidUpdate() @@ -172,26 +187,34 @@ class FluidBlockLogicTest { val powerRegistry = PowerBlockRegistry(TestHelper.mockPlugin) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - // Water cauldron to the NORTH val levelled = mockk(relaxed = true) every { levelled.level } returns 3 val cauldronBlock = mockk(relaxed = true) every { cauldronBlock.type } returns Material.WATER_CAULDRON every { cauldronBlock.blockData } returns levelled - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns cauldronBlock - - // Other directions are air - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns cauldronBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } - // Add a powered block adjacent val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() assertEquals(FluidPump.PumpStatus.EXTRACTING, pump.pumpStatus) @@ -206,18 +229,29 @@ class FluidBlockLogicTest { val cauldronBlock = mockk(relaxed = true) every { cauldronBlock.type } returns Material.LAVA_CAULDRON - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns cauldronBlock - - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns cauldronBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() assertEquals(FluidType.LAVA, pump.storedFluid) @@ -228,8 +262,8 @@ class FluidBlockLogicTest { fun `pump canRemoveFluidFrom returns true when direction matches`() { val pump = FluidPump(TestHelper.createLocation()) pump.storeFluid(FluidType.WATER) - // Set cauldronFace to NORTH so oppositeFace = SOUTH - val field = FluidPump::class.java.getDeclaredField("cauldronFace") + val field = + FluidPump::class.java.getDeclaredField("cauldronFace") field.isAccessible = true field.set(pump, BlockFace.NORTH) @@ -240,7 +274,8 @@ class FluidBlockLogicTest { fun `pump canRemoveFluidFrom returns false for wrong direction`() { val pump = FluidPump(TestHelper.createLocation()) pump.storeFluid(FluidType.WATER) - val field = FluidPump::class.java.getDeclaredField("cauldronFace") + val field = + FluidPump::class.java.getDeclaredField("cauldronFace") field.isAccessible = true field.set(pump, BlockFace.NORTH) @@ -250,7 +285,8 @@ class FluidBlockLogicTest { @Test fun `pump canRemoveFluidFrom returns false when no fluid`() { val pump = FluidPump(TestHelper.createLocation()) - val field = FluidPump::class.java.getDeclaredField("cauldronFace") + val field = + FluidPump::class.java.getDeclaredField("cauldronFace") field.isAccessible = true field.set(pump, BlockFace.NORTH) @@ -261,11 +297,13 @@ class FluidBlockLogicTest { fun `pump isPowered reflects adjacent power blocks`() { val powerRegistry = PowerBlockRegistry(TestHelper.mockPlugin) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) - pump.storeFluid(FluidType.WATER) // so it hits IDLE and returns early after checking power + pump.storeFluid(FluidType.WATER) val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() assertTrue(pump.isPowered) @@ -291,22 +329,35 @@ class FluidBlockLogicTest { val cauldronBlock = mockk(relaxed = true) every { cauldronBlock.type } returns Material.WATER_CAULDRON every { cauldronBlock.blockData } returns levelled - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns cauldronBlock - - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns cauldronBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() assertEquals(FluidType.WATER, pump.storedFluid) - io.mockk.verify { cauldronBlock.setType(Material.CAULDRON, false) } + io.mockk.verify { + cauldronBlock.setType(Material.CAULDRON, false) + } } @Test @@ -319,18 +370,29 @@ class FluidBlockLogicTest { val cauldronBlock = mockk(relaxed = true) every { cauldronBlock.type } returns Material.WATER_CAULDRON every { cauldronBlock.blockData } returns levelled - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns cauldronBlock - - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns cauldronBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() io.mockk.verify { levelled.level = 2 } @@ -344,22 +406,35 @@ class FluidBlockLogicTest { val cauldronBlock = mockk(relaxed = true) every { cauldronBlock.type } returns Material.LAVA_CAULDRON - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns cauldronBlock - - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns cauldronBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() assertEquals(FluidType.LAVA, pump.storedFluid) - io.mockk.verify { cauldronBlock.setType(Material.CAULDRON, false) } + io.mockk.verify { + cauldronBlock.setType(Material.CAULDRON, false) + } } @Test @@ -372,18 +447,29 @@ class FluidBlockLogicTest { every { waterBlock.type } returns Material.WATER every { waterBlock.blockData } returns levelled every { levelled.level } returns 0 - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns waterBlock - - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns waterBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() assertEquals(FluidType.WATER, pump.storedFluid) @@ -401,18 +487,29 @@ class FluidBlockLogicTest { every { lavaBlock.type } returns Material.LAVA every { lavaBlock.blockData } returns levelled every { levelled.level } returns 0 - every { TestHelper.mockWorld.getBlockAt(0, 64, -1) } returns lavaBlock - - for (face in listOf(BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + every { + TestHelper.mockWorld.getBlockAt(0, 64, -1) + } returns lavaBlock + + for (face in listOf( + BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, + BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, solar, "small_solar_panel") + TestHelper.addToRegistry( + powerRegistry, solar, "atlas:small_solar_panel" + ) pump.callFluidUpdate() assertEquals(FluidType.LAVA, pump.storedFluid) @@ -431,14 +528,25 @@ class FluidBlockLogicTest { every { flowingBlock.blockData } returns levelled every { levelled.level } returns 3 - for (face in listOf(BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, BlockFace.UP, BlockFace.DOWN)) { + for (face in listOf( + BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, + BlockFace.WEST, BlockFace.UP, BlockFace.DOWN + )) { val offset = face.direction if (face == BlockFace.NORTH) { - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns flowingBlock + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns flowingBlock } else { val block = mockk(relaxed = true) every { block.type } returns Material.AIR - every { TestHelper.mockWorld.getBlockAt(offset.blockX, 64 + offset.blockY, offset.blockZ) } returns block + every { + TestHelper.mockWorld.getBlockAt( + offset.blockX, 64 + offset.blockY, offset.blockZ + ) + } returns block } } @@ -450,41 +558,16 @@ class FluidBlockLogicTest { // --- FluidPipe specifics --- @Test - fun `pipe visual state empty for all directions`() { - for ((face, id) in FluidPipe.DIRECTIONAL_IDS) { - val pipe = FluidPipe(TestHelper.createLocation(), face) - assertEquals(id, pipe.getVisualStateBlockId()) - } - } - - @Test - fun `pipe visual state water-filled for all directions`() { - for ((face, id) in FluidPipe.WATER_FILLED_IDS) { - val pipe = FluidPipe(TestHelper.createLocation(), face) - pipe.storeFluid(FluidType.WATER) - assertEquals(id, pipe.getVisualStateBlockId()) - } - } - - @Test - fun `pipe visual state lava-filled for all directions`() { - for ((face, id) in FluidPipe.LAVA_FILLED_IDS) { - val pipe = FluidPipe(TestHelper.createLocation(), face) - pipe.storeFluid(FluidType.LAVA) - assertEquals(id, pipe.getVisualStateBlockId()) - } - } - - @Test - fun `pipe facingFromBlockId returns correct BlockFace`() { - for ((face, id) in FluidPipe.DIRECTIONAL_IDS) { - assertEquals(face, FluidPipe.facingFromBlockId(id)) - } + fun `pipe visual state returns BLOCK_ID`() { + val pipe = FluidPipe(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals("atlas:fluid_pipe", pipe.getVisualStateBlockId()) } @Test - fun `pipe facingFromBlockId returns null for unknown`() { - assertNull(FluidPipe.facingFromBlockId("unknown_pipe_id")) + fun `pipe visual state returns BLOCK_ID regardless of fluid`() { + val pipe = FluidPipe(TestHelper.createLocation(), BlockFace.EAST) + pipe.storeFluid(FluidType.WATER) + assertEquals("atlas:fluid_pipe", pipe.getVisualStateBlockId()) } @Test @@ -501,20 +584,23 @@ class FluidBlockLogicTest { fun `pipe pulls from FluidPump behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - // Pipe facing SOUTH, pulls from behind (NORTH = z-1) - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, -1.0)) pump.storeFluid(FluidType.WATER) - // Set pump's cauldronFace so canRemoveFluidFrom works - // canRemoveFluidFrom(SOUTH) checks if SOUTH == cauldronFace.oppositeFace - // So if cauldronFace = NORTH, oppositeFace = SOUTH ✓ - val cauldronFaceField = FluidPump::class.java.getDeclaredField("cauldronFace") + val cauldronFaceField = + FluidPump::class.java.getDeclaredField("cauldronFace") cauldronFaceField.isAccessible = true cauldronFaceField.set(pump, BlockFace.NORTH) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) + TestHelper.addToRegistry( + fluidRegistry, pump, "atlas:fluid_pump" + ) pipe.callFluidUpdate() assertEquals(FluidType.WATER, pipe.storedFluid) @@ -525,12 +611,20 @@ class FluidBlockLogicTest { fun `pipe pulls from FluidPipe behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val pipe1 = FluidPipe(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) - val pipe2 = FluidPipe(TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH) + val pipe1 = FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) + val pipe2 = FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH + ) pipe2.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe1, "fluid_pipe_south") - TestHelper.addToRegistry(fluidRegistry, pipe2, "fluid_pipe_south") + TestHelper.addToRegistry( + fluidRegistry, pipe1, "atlas:fluid_pipe" + ) + TestHelper.addToRegistry( + fluidRegistry, pipe2, "atlas:fluid_pipe" + ) pipe1.callFluidUpdate() assertEquals(FluidType.LAVA, pipe1.storedFluid) @@ -541,12 +635,19 @@ class FluidBlockLogicTest { fun `pipe does nothing when source has no fluid`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) - val sourcePipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH) - // source has no fluid + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) + val sourcePipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH + ) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") - TestHelper.addToRegistry(fluidRegistry, sourcePipe, "fluid_pipe_south") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) + TestHelper.addToRegistry( + fluidRegistry, sourcePipe, "atlas:fluid_pipe" + ) pipe.callFluidUpdate() assertEquals(FluidType.NONE, pipe.storedFluid) @@ -556,8 +657,12 @@ class FluidBlockLogicTest { fun `pipe does nothing when no fluid block behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) pipe.callFluidUpdate() assertEquals(FluidType.NONE, pipe.storedFluid) diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockPersistenceTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockPersistenceTest.kt index 0d62e26..a08f341 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockPersistenceTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockPersistenceTest.kt @@ -32,7 +32,7 @@ class FluidBlockPersistenceTest { fun `save and load round-trip`() { val pump = FluidPump(TestHelper.createLocation(1.0, 64.0, 2.0)) pump.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(registry, pump, "fluid_pump") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") persistence.save(registry) @@ -41,7 +41,7 @@ class FluidBlockPersistenceTest { val loaded = loadRegistry.getAllFluidBlocksWithIds() assertEquals(1, loaded.size) - assertEquals("fluid_pump", loaded[0].second) + assertEquals("atlas:fluid_pump", loaded[0].second) assertEquals(FluidType.WATER, loaded[0].first.storedFluid) } @@ -56,7 +56,7 @@ class FluidBlockPersistenceTest { fun `fluid type LAVA persists correctly`() { val pump = FluidPump(TestHelper.createLocation()) pump.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(registry, pump, "fluid_pump") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") persistence.save(registry) @@ -70,7 +70,7 @@ class FluidBlockPersistenceTest { fun `fluid type NONE persists correctly`() { val pump = FluidPump(TestHelper.createLocation()) // storedFluid defaults to NONE - TestHelper.addToRegistry(registry, pump, "fluid_pump") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") persistence.save(registry) @@ -83,7 +83,7 @@ class FluidBlockPersistenceTest { @Test fun `facing direction persists for pipes`() { val pipe = FluidPipe(TestHelper.createLocation(), BlockFace.EAST) - TestHelper.addToRegistry(registry, pipe, "fluid_pipe_east") + TestHelper.addToRegistry(registry, pipe, "atlas:fluid_pipe") persistence.save(registry) @@ -101,8 +101,8 @@ class FluidBlockPersistenceTest { val pipe = FluidPipe(TestHelper.createLocation(1.0, 64.0, 0.0), BlockFace.NORTH) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(registry, pump, "fluid_pump") - TestHelper.addToRegistry(registry, pipe, "fluid_pipe_north") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") + TestHelper.addToRegistry(registry, pipe, "atlas:fluid_pipe") persistence.save(registry) diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockRegistryTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockRegistryTest.kt index 4b545be..d2896df 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockRegistryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockRegistryTest.kt @@ -36,7 +36,7 @@ class FluidBlockRegistryTest { fun `register and get returns block`() { val loc = TestHelper.createLocation() val pump = FluidPump(loc) - TestHelper.addToRegistry(registry, pump, "fluid_pump") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") assertSame(pump, registry.getFluidBlock(loc)) } @@ -45,7 +45,7 @@ class FluidBlockRegistryTest { fun `unregister removes and returns block`() { val loc = TestHelper.createLocation() val pump = FluidPump(loc) - TestHelper.addToRegistry(registry, pump, "fluid_pump") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") val removed = registry.unregisterFluidBlock(loc) assertSame(pump, removed) @@ -61,7 +61,7 @@ class FluidBlockRegistryTest { fun `getAdjacentFluidBlock returns block in correct direction`() { val neighborLoc = TestHelper.createLocation(0.0, 64.0, -1.0) // NORTH val pump = FluidPump(neighborLoc) - TestHelper.addToRegistry(registry, pump, "fluid_pump") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") val adjacent = registry.getAdjacentFluidBlock(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH) assertSame(pump, adjacent) @@ -72,18 +72,18 @@ class FluidBlockRegistryTest { val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) val pipe = FluidPipe(TestHelper.createLocation(1.0, 64.0, 0.0), BlockFace.NORTH) - TestHelper.addToRegistry(registry, pump, "fluid_pump") - TestHelper.addToRegistry(registry, pipe, "fluid_pipe_north") + TestHelper.addToRegistry(registry, pump, "atlas:fluid_pump") + TestHelper.addToRegistry(registry, pipe, "atlas:fluid_pipe") val pairs = registry.getAllFluidBlocksWithIds() assertEquals(2, pairs.size) - assertTrue(pairs.any { it.first === pump && it.second == "fluid_pump" }) - assertTrue(pairs.any { it.first === pipe && it.second == "fluid_pipe_north" }) + assertTrue(pairs.any { it.first === pump && it.second == "atlas:fluid_pump" }) + assertTrue(pairs.any { it.first === pipe && it.second == "atlas:fluid_pipe" }) } @Test fun `stopAll clears registry`() { - TestHelper.addToRegistry(registry, FluidPump(TestHelper.createLocation()), "fluid_pump") + TestHelper.addToRegistry(registry, FluidPump(TestHelper.createLocation()), "atlas:fluid_pump") registry.stopAll() assertEquals(0, registry.getAllFluidBlocksWithIds().size) } @@ -104,8 +104,8 @@ class FluidBlockRegistryTest { val loc = TestHelper.createLocation() val pump1 = FluidPump(loc) val pump2 = FluidPump(loc) - TestHelper.addToRegistry(registry, pump1, "fluid_pump") - TestHelper.addToRegistry(registry, pump2, "fluid_pump") + TestHelper.addToRegistry(registry, pump1, "atlas:fluid_pump") + TestHelper.addToRegistry(registry, pump2, "atlas:fluid_pump") assertSame(pump2, registry.getFluidBlock(loc)) } diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt index 7ddd834..ca8cb3e 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt @@ -9,7 +9,6 @@ import org.bukkit.block.BlockFace import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertFalse -import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -29,7 +28,8 @@ class FluidContainerTest { @Test fun `store fluid increments amount`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) assertTrue(container.storeFluid(FluidType.WATER)) assertEquals(1, container.storedAmount) assertEquals(FluidType.WATER, container.storedFluid) @@ -37,7 +37,8 @@ class FluidContainerTest { @Test fun `store multiple units of same fluid`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) for (i in 1..5) { assertTrue(container.storeFluid(FluidType.WATER)) } @@ -46,7 +47,8 @@ class FluidContainerTest { @Test fun `store up to max capacity`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) for (i in 1..FluidContainer.MAX_CAPACITY) { assertTrue(container.storeFluid(FluidType.WATER)) } @@ -55,7 +57,8 @@ class FluidContainerTest { @Test fun `store rejects when full`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) for (i in 1..FluidContainer.MAX_CAPACITY) { container.storeFluid(FluidType.WATER) } @@ -65,7 +68,8 @@ class FluidContainerTest { @Test fun `store rejects different fluid type`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.storeFluid(FluidType.WATER) assertFalse(container.storeFluid(FluidType.LAVA)) assertEquals(1, container.storedAmount) @@ -74,7 +78,8 @@ class FluidContainerTest { @Test fun `remove fluid decrements amount`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.storeFluid(FluidType.WATER) container.storeFluid(FluidType.WATER) container.storeFluid(FluidType.WATER) @@ -86,7 +91,8 @@ class FluidContainerTest { @Test fun `remove fluid clears type at zero`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.storeFluid(FluidType.WATER) val removed = container.removeFluid() @@ -97,13 +103,15 @@ class FluidContainerTest { @Test fun `remove from empty returns NONE`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(FluidType.NONE, container.removeFluid()) } @Test fun `hasFluid returns true when amount greater than zero`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) assertFalse(container.hasFluid()) container.storeFluid(FluidType.WATER) assertTrue(container.hasFluid()) @@ -113,14 +121,16 @@ class FluidContainerTest { @Test fun `canRemoveFluidFrom returns true for front face`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.storeFluid(FluidType.WATER) assertTrue(container.canRemoveFluidFrom(BlockFace.NORTH)) } @Test fun `canRemoveFluidFrom returns false for non-front face`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.storeFluid(FluidType.WATER) assertFalse(container.canRemoveFluidFrom(BlockFace.SOUTH)) assertFalse(container.canRemoveFluidFrom(BlockFace.EAST)) @@ -128,123 +138,86 @@ class FluidContainerTest { @Test fun `canRemoveFluidFrom returns false when empty`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) assertFalse(container.canRemoveFluidFrom(BlockFace.NORTH)) } - // --- Fill level --- + // --- Fill level (now returns Int: 0, 1, 2, 3) --- @Test - fun `fill level empty at 0`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) - assertEquals("empty", container.getFillLevel()) + fun `fill level 0 at empty`() { + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals(0, container.getFillLevel()) } @Test - fun `fill level low at 1 to 3`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + fun `fill level 1 at 1 to 3`() { + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) for (i in 1..3) { container.storeFluid(FluidType.WATER) - assertEquals("low", container.getFillLevel(), "Expected low at amount $i") + assertEquals( + 1, container.getFillLevel(), + "Expected 1 at amount $i" + ) } } @Test - fun `fill level medium at 4 to 7`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + fun `fill level 2 at 4 to 7`() { + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) repeat(4) { container.storeFluid(FluidType.WATER) } - assertEquals("medium", container.getFillLevel()) + assertEquals(2, container.getFillLevel()) repeat(3) { container.storeFluid(FluidType.WATER) } - assertEquals("medium", container.getFillLevel()) + assertEquals(2, container.getFillLevel()) } @Test - fun `fill level full at 8 to 10`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + fun `fill level 3 at 8 to 10`() { + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) repeat(8) { container.storeFluid(FluidType.WATER) } - assertEquals("full", container.getFillLevel()) + assertEquals(3, container.getFillLevel()) repeat(2) { container.storeFluid(FluidType.WATER) } - assertEquals("full", container.getFillLevel()) + assertEquals(3, container.getFillLevel()) } - // --- Visual state --- + // --- Visual state (now always returns BLOCK_ID) --- @Test - fun `visual state empty for all directions`() { - for ((face, id) in FluidContainer.DIRECTIONAL_IDS) { - val container = FluidContainer(TestHelper.createLocation(), face) - assertEquals(id, container.getVisualStateBlockId()) - } + fun `visual state always returns BLOCK_ID`() { + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals( + "atlas:fluid_container", + container.getVisualStateBlockId() + ) } @Test - fun `visual state water low`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + fun `visual state returns BLOCK_ID with water`() { + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.storeFluid(FluidType.WATER) - assertEquals("fluid_container_north_water_low", container.getVisualStateBlockId()) - } - - @Test - fun `visual state water medium`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.SOUTH) - repeat(5) { container.storeFluid(FluidType.WATER) } - assertEquals("fluid_container_south_water_medium", container.getVisualStateBlockId()) - } - - @Test - fun `visual state water full`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.EAST) - repeat(10) { container.storeFluid(FluidType.WATER) } - assertEquals("fluid_container_east_water_full", container.getVisualStateBlockId()) + assertEquals( + "atlas:fluid_container", + container.getVisualStateBlockId() + ) } @Test - fun `visual state lava low`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.WEST) - container.storeFluid(FluidType.LAVA) - assertEquals("fluid_container_west_lava_low", container.getVisualStateBlockId()) - } - - @Test - fun `visual state returns empty after draining all fluid`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.UP) + fun `visual state returns BLOCK_ID after draining`() { + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.UP) container.storeFluid(FluidType.WATER) container.removeFluid() - assertEquals("fluid_container_up", container.getVisualStateBlockId()) - } - - // --- facingFromBlockId --- - - @Test - fun `facingFromBlockId returns correct face for directional IDs`() { - for ((face, id) in FluidContainer.DIRECTIONAL_IDS) { - assertEquals(face, FluidContainer.facingFromBlockId(id)) - } - } - - @Test - fun `facingFromBlockId returns correct face for filled variant IDs`() { - assertEquals(BlockFace.NORTH, FluidContainer.facingFromBlockId("fluid_container_north_water_low")) - assertEquals(BlockFace.SOUTH, FluidContainer.facingFromBlockId("fluid_container_south_lava_full")) - } - - @Test - fun `facingFromBlockId returns null for unknown`() { - assertNull(FluidContainer.facingFromBlockId("unknown_block")) - } - - // --- ALL_VARIANT_IDS --- - - @Test - fun `ALL_VARIANT_IDS contains 42 entries`() { - assertEquals(42, FluidContainer.ALL_VARIANT_IDS.size) - } - - @Test - fun `ALL_VARIANT_IDS contains all directional IDs`() { - for (id in FluidContainer.DIRECTIONAL_IDS.values) { - assertTrue(id in FluidContainer.ALL_VARIANT_IDS, "Missing $id") - } + assertEquals( + "atlas:fluid_container", + container.getVisualStateBlockId() + ) } // --- Directional pull --- @@ -253,12 +226,20 @@ class FluidContainerTest { fun `container pulls from pipe behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH) + val container = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH + ) pipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_south") - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) container.callFluidUpdate() assertEquals(FluidType.WATER, container.storedFluid) @@ -270,16 +251,23 @@ class FluidContainerTest { fun `container pulls from pump behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) + val container = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH + ) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) pump.storeFluid(FluidType.WATER) - val cauldronField = FluidPump::class.java.getDeclaredField("cauldronFace") + val cauldronField = + FluidPump::class.java.getDeclaredField("cauldronFace") cauldronField.isAccessible = true cauldronField.set(pump, BlockFace.NORTH) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_south") - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) + TestHelper.addToRegistry( + fluidRegistry, pump, "atlas:fluid_pump" + ) container.callFluidUpdate() assertEquals(FluidType.WATER, container.storedFluid) @@ -290,13 +278,21 @@ class FluidContainerTest { fun `container pulls from another container behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container1 = FluidContainer(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) + val container1 = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) container1.storeFluid(FluidType.LAVA) - val container2 = FluidContainer(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) + val container2 = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH + ) - TestHelper.addToRegistry(fluidRegistry, container1, "fluid_container_south") - TestHelper.addToRegistry(fluidRegistry, container2, "fluid_container_south") + TestHelper.addToRegistry( + fluidRegistry, container1, "atlas:fluid_container" + ) + TestHelper.addToRegistry( + fluidRegistry, container2, "atlas:fluid_container" + ) container2.callFluidUpdate() assertEquals(FluidType.LAVA, container2.storedFluid) @@ -308,14 +304,24 @@ class FluidContainerTest { fun `container does not pull when full`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) - repeat(FluidContainer.MAX_CAPACITY) { container.storeFluid(FluidType.WATER) } + val container = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) + repeat(FluidContainer.MAX_CAPACITY) { + container.storeFluid(FluidType.WATER) + } - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH) + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH + ) pipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_south") - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) container.callFluidUpdate() assertTrue(pipe.hasFluid()) // pipe still has fluid @@ -325,17 +331,25 @@ class FluidContainerTest { fun `container rejects mismatched fluid from pipe`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) + val container = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) container.storeFluid(FluidType.WATER) - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH) + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH + ) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_south") - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) container.callFluidUpdate() - assertTrue(pipe.hasFluid()) // pipe keeps its lava since container rejected it + assertTrue(pipe.hasFluid()) assertEquals(1, container.storedAmount) // container unchanged } @@ -345,14 +359,21 @@ class FluidContainerTest { fun `pipe pulls from container front face`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - // Container facing SOUTH (front=SOUTH), pipe at z=1 facing SOUTH (pulls from NORTH=z-1=container) - val container = FluidContainer(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) + val container = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) container.storeFluid(FluidType.WATER) - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH + ) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_south") - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) pipe.callFluidUpdate() assertEquals(FluidType.WATER, pipe.storedFluid) @@ -363,17 +384,21 @@ class FluidContainerTest { fun `pipe cannot pull from container non-front face`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - // Container facing NORTH (front=NORTH), pipe behind at z=1 facing SOUTH pulls from NORTH=z-1 - // But container faces NORTH, so front is NORTH. Pipe pulling from SOUTH direction won't match. - val container = FluidContainer(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH) + val container = FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH + ) container.storeFluid(FluidType.WATER) - // Pipe at z=1, facing SOUTH, pulls from behind (NORTH side = z-1 = container) - // It calls canRemoveFluidFrom(SOUTH) on container — container facing NORTH, so front is NORTH, not SOUTH - val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) + val pipe = FluidPipe( + TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH + ) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_north") - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) pipe.callFluidUpdate() assertEquals(FluidType.NONE, pipe.storedFluid) // could not pull @@ -384,7 +409,8 @@ class FluidContainerTest { @Test fun `restoreState sets type and amount`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.restoreState(FluidType.LAVA, 7) assertEquals(FluidType.LAVA, container.storedFluid) assertEquals(7, container.storedAmount) @@ -392,17 +418,21 @@ class FluidContainerTest { @Test fun `restoreState clamps to max capacity`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) container.restoreState(FluidType.WATER, 99) assertEquals(FluidContainer.MAX_CAPACITY, container.storedAmount) } @Test fun `FluidBlockData captures container facing and storedAmount`() { - val container = FluidContainer(TestHelper.createLocation(), BlockFace.EAST) + val container = + FluidContainer(TestHelper.createLocation(), BlockFace.EAST) repeat(5) { container.storeFluid(FluidType.WATER) } - val data = FluidBlockData.fromFluidBlock(container, "fluid_container_east") + val data = FluidBlockData.fromFluidBlock( + container, "atlas:fluid_container" + ) assertEquals("EAST", data.facing) assertEquals(5, data.storedAmount) assertEquals("WATER", data.fluidType) diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt index 4fb8cfd..9c1de68 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt @@ -27,44 +27,49 @@ class FluidMergerTest { } @Test - fun `visual state empty when no fluid`() { - val merger = FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) - assertEquals("fluid_merger_north", merger.getVisualStateBlockId()) + fun `visual state always returns BLOCK_ID`() { + val merger = + FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals( + "atlas:fluid_merger", merger.getVisualStateBlockId() + ) } @Test - fun `visual state water when holding water`() { - val merger = FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) + fun `visual state returns BLOCK_ID when holding water`() { + val merger = + FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) merger.storeFluid(FluidType.WATER) - assertEquals("fluid_merger_north_filled", merger.getVisualStateBlockId()) + assertEquals( + "atlas:fluid_merger", merger.getVisualStateBlockId() + ) } @Test - fun `visual state lava when holding lava`() { - val merger = FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) + fun `visual state returns BLOCK_ID when holding lava`() { + val merger = + FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) merger.storeFluid(FluidType.LAVA) - assertEquals("fluid_merger_north_filled_lava", merger.getVisualStateBlockId()) - } - - @Test - fun `visual state varies by facing direction`() { - for ((face, expectedId) in FluidMerger.DIRECTIONAL_IDS) { - val merger = FluidMerger(TestHelper.createLocation(), face) - assertEquals(expectedId, merger.getVisualStateBlockId()) - } + assertEquals( + "atlas:fluid_merger", merger.getVisualStateBlockId() + ) } @Test fun `pulls fluid from non-facing pipe`() { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) - TestHelper.addToRegistry(registry, merger, "fluid_merger_north") + TestHelper.addToRegistry( + registry, merger, "atlas:fluid_merger" + ) // Pipe to the south (not facing direction) val pipeLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val pipe = FluidPipe(pipeLoc, BlockFace.NORTH) pipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(registry, pipe, "fluid_pipe_north_filled") + TestHelper.addToRegistry( + registry, pipe, "atlas:fluid_pipe" + ) merger.callFluidUpdate() @@ -77,13 +82,17 @@ class FluidMergerTest { fun `does not pull fluid from facing direction`() { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) - TestHelper.addToRegistry(registry, merger, "fluid_merger_north") + TestHelper.addToRegistry( + registry, merger, "atlas:fluid_merger" + ) - // Pipe to the north (facing direction — should NOT pull from here) + // Pipe to the north (facing direction) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(registry, pipe, "fluid_pipe_south_filled") + TestHelper.addToRegistry( + registry, pipe, "atlas:fluid_pipe" + ) merger.callFluidUpdate() @@ -96,12 +105,16 @@ class FluidMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) merger.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(registry, merger, "fluid_merger_north_filled") + TestHelper.addToRegistry( + registry, merger, "atlas:fluid_merger" + ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val pipe = FluidPipe(pipeLoc, BlockFace.NORTH) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(registry, pipe, "fluid_pipe_north_filled_lava") + TestHelper.addToRegistry( + registry, pipe, "atlas:fluid_pipe" + ) merger.callFluidUpdate() @@ -111,15 +124,18 @@ class FluidMergerTest { @Test fun `pulls from multiple input directions`() { - // First pull from east val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) - TestHelper.addToRegistry(registry, merger, "fluid_merger_north") + TestHelper.addToRegistry( + registry, merger, "atlas:fluid_merger" + ) val pipeLoc = TestHelper.createLocation(1.0, 64.0, 0.0) val pipe = FluidPipe(pipeLoc, BlockFace.WEST) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(registry, pipe, "fluid_pipe_west_filled_lava") + TestHelper.addToRegistry( + registry, pipe, "atlas:fluid_pipe" + ) merger.callFluidUpdate() @@ -133,9 +149,10 @@ class FluidMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) merger.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(registry, merger, "fluid_merger_north_filled") + TestHelper.addToRegistry( + registry, merger, "atlas:fluid_merger" + ) - // Merger holds fluid; downstream blocks pull via their own update assertTrue(merger.hasFluid()) val fluid = merger.removeFluid() assertEquals(FluidType.WATER, fluid) @@ -145,11 +162,7 @@ class FluidMergerTest { @Test fun `descriptor has correct properties`() { val desc = FluidMerger.descriptor - assertEquals("fluid_merger", desc.baseBlockId) + assertEquals("atlas:fluid_merger", desc.baseBlockId) assertEquals("Fluid Merger", desc.displayName) - assertEquals(18, desc.allRegistrableIds.size) - assertTrue(desc.allRegistrableIds.contains("fluid_merger_north")) - assertTrue(desc.allRegistrableIds.contains("fluid_merger_north_filled")) - assertTrue(desc.allRegistrableIds.contains("fluid_merger_north_filled_lava")) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidNetworkIntegrationTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidNetworkIntegrationTest.kt index f2e8489..f3c1263 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidNetworkIntegrationTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidNetworkIntegrationTest.kt @@ -37,8 +37,8 @@ class FluidNetworkIntegrationTest { // Pipe at z=1, facing SOUTH (pulls from NORTH = z-1 = pump) val pipe = FluidPipe(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south") + TestHelper.addToRegistry(fluidRegistry, pump, "atlas:fluid_pump") + TestHelper.addToRegistry(fluidRegistry, pipe, "atlas:fluid_pipe") pipe.callFluidUpdate() assertEquals(FluidType.WATER, pipe.storedFluid) @@ -52,8 +52,8 @@ class FluidNetworkIntegrationTest { val pipe2 = FluidPipe(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) - TestHelper.addToRegistry(fluidRegistry, pipe1, "fluid_pipe_south") - TestHelper.addToRegistry(fluidRegistry, pipe2, "fluid_pipe_south") + TestHelper.addToRegistry(fluidRegistry, pipe1, "atlas:fluid_pipe") + TestHelper.addToRegistry(fluidRegistry, pipe2, "atlas:fluid_pipe") pipe2.callFluidUpdate() assertEquals(FluidType.LAVA, pipe2.storedFluid) @@ -69,8 +69,8 @@ class FluidNetworkIntegrationTest { val source = FluidPipe(TestHelper.createLocation(1.0, 64.0, 0.0), BlockFace.NORTH) source.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_north") - TestHelper.addToRegistry(fluidRegistry, source, "fluid_pipe_north") + TestHelper.addToRegistry(fluidRegistry, pipe, "atlas:fluid_pipe") + TestHelper.addToRegistry(fluidRegistry, source, "atlas:fluid_pipe") pipe.callFluidUpdate() assertEquals(FluidType.NONE, pipe.storedFluid) // did not pull from side @@ -83,8 +83,8 @@ class FluidNetworkIntegrationTest { val pipe2 = FluidPipe(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) - TestHelper.addToRegistry(fluidRegistry, pipe1, "fluid_pipe_south") - TestHelper.addToRegistry(fluidRegistry, pipe2, "fluid_pipe_south") + TestHelper.addToRegistry(fluidRegistry, pipe1, "atlas:fluid_pipe") + TestHelper.addToRegistry(fluidRegistry, pipe2, "atlas:fluid_pipe") pipe2.callFluidUpdate() assertEquals(FluidType.WATER, pipe2.storedFluid) // same type @@ -101,9 +101,9 @@ class FluidNetworkIntegrationTest { val pipe1 = FluidPipe(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) val pipe2 = FluidPipe(TestHelper.createLocation(0.0, 64.0, 2.0), BlockFace.SOUTH) - TestHelper.addToRegistry(fluidRegistry, pump, "fluid_pump") - TestHelper.addToRegistry(fluidRegistry, pipe1, "fluid_pipe_south") - TestHelper.addToRegistry(fluidRegistry, pipe2, "fluid_pipe_south") + TestHelper.addToRegistry(fluidRegistry, pump, "atlas:fluid_pump") + TestHelper.addToRegistry(fluidRegistry, pipe1, "atlas:fluid_pipe") + TestHelper.addToRegistry(fluidRegistry, pipe2, "atlas:fluid_pipe") // Tick 1: pipe1 pulls from pump pipe1.callFluidUpdate() diff --git a/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt index 1112f3c..4893124 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt @@ -41,14 +41,19 @@ class LavaGeneratorTest { @Test fun `lava generator visual state idle when no power`() { val gen = LavaGenerator(TestHelper.createLocation()) - assertEquals("lava_generator", gen.getVisualStateBlockId()) + assertEquals( + "atlas:lava_generator", gen.getVisualStateBlockId() + ) } @Test fun `lava generator visual state active when has power`() { val gen = LavaGenerator(TestHelper.createLocation()) gen.currentPower = 5 - assertEquals("lava_generator_active", gen.getVisualStateBlockId()) + assertEquals( + "atlas:lava_generator_active", + gen.getVisualStateBlockId() + ) } @Test @@ -58,13 +63,16 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) - TestHelper.addToRegistry(powerRegistry, gen, "lava_generator") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:lava_generator" + ) - // Place a lava-filled pipe to the north (z-1) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -79,12 +87,16 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) - TestHelper.addToRegistry(powerRegistry, gen, "lava_generator") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:lava_generator" + ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -99,13 +111,16 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) - TestHelper.addToRegistry(powerRegistry, gen, "lava_generator") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:lava_generator" + ) - // Container to the south (z+1) facing north (toward generator) val containerLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val container = FluidContainer(containerLoc, BlockFace.NORTH) container.restoreState(FluidType.LAVA, 3) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_north_lava_low") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) gen.callPowerUpdate() @@ -120,13 +135,16 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) - TestHelper.addToRegistry(powerRegistry, gen, "lava_generator") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:lava_generator" + ) - // Container to the south (z+1) facing south (away from generator) val containerLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val container = FluidContainer(containerLoc, BlockFace.SOUTH) container.restoreState(FluidType.LAVA, 3) - TestHelper.addToRegistry(fluidRegistry, container, "fluid_container_south_lava_low") + TestHelper.addToRegistry( + fluidRegistry, container, "atlas:fluid_container" + ) gen.callPowerUpdate() @@ -142,17 +160,19 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) gen.currentPower = 48 - TestHelper.addToRegistry(powerRegistry, gen, "lava_generator") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:lava_generator" + ) - // Two lava pipes adjacent - only one should be consumed (48 + 5 = 53 > 50, but 48+5=53, wait no - space is 2, less than 5) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() - // Should NOT consume because space (2) < POWER_PER_LAVA (5) assertEquals(48, gen.currentPower) assertTrue(pipe.hasFluid()) } @@ -164,19 +184,23 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) - TestHelper.addToRegistry(powerRegistry, gen, "lava_generator") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:lava_generator" + ) - // Pipe to the north val pipe1Loc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe1 = FluidPipe(pipe1Loc, BlockFace.SOUTH) pipe1.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe1, "fluid_pipe_south_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, pipe1, "atlas:fluid_pipe" + ) - // Pipe to the south val pipe2Loc = TestHelper.createLocation(0.0, 64.0, 1.0) val pipe2 = FluidPipe(pipe2Loc, BlockFace.NORTH) pipe2.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe2, "fluid_pipe_north_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, pipe2, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -205,12 +229,16 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) gen.currentPower = 50 - TestHelper.addToRegistry(powerRegistry, gen, "lava_generator") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:lava_generator" + ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -221,10 +249,13 @@ class LavaGeneratorTest { @Test fun `lava generator descriptor has correct properties`() { val desc = LavaGenerator.descriptor - assertEquals("lava_generator", desc.baseBlockId) + assertEquals("atlas:lava_generator", desc.baseBlockId) assertEquals("Lava Generator", desc.displayName) - assertEquals(2, desc.allRegistrableIds.size) - assertTrue(desc.allRegistrableIds.contains("lava_generator")) - assertTrue(desc.allRegistrableIds.contains("lava_generator_active")) + assertEquals(1, desc.additionalBlockIds.size) + assertTrue( + desc.additionalBlockIds.contains( + "atlas:lava_generator_active" + ) + ) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt index c95f57f..9a754f2 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt @@ -8,7 +8,6 @@ import org.bukkit.block.BlockFace import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -26,108 +25,74 @@ class MultiPowerCableTest { @Test fun `multi power cable has correct facing`() { - val cable = MultiPowerCable(TestHelper.createLocation(), BlockFace.NORTH) + val cable = + MultiPowerCable(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(BlockFace.NORTH, cable.facing) } @Test - fun `visual state unpowered matches facing`() { - for ((face, id) in MultiPowerCable.DIRECTIONAL_IDS) { - val cable = MultiPowerCable(TestHelper.createLocation(), face) - cable.currentPower = 0 - assertEquals(id, cable.getVisualStateBlockId()) - } - } - - @Test - fun `visual state powered matches facing`() { - for ((face, id) in MultiPowerCable.POWERED_IDS) { - val cable = MultiPowerCable(TestHelper.createLocation(), face) - cable.currentPower = 5 - assertEquals(id, cable.getVisualStateBlockId()) - } + fun `visual state always returns BLOCK_ID`() { + val cable = + MultiPowerCable(TestHelper.createLocation(), BlockFace.NORTH) + cable.currentPower = 0 + assertEquals( + "atlas:multi_power_cable", + cable.getVisualStateBlockId() + ) + cable.currentPower = 5 + assertEquals( + "atlas:multi_power_cable", + cable.getVisualStateBlockId() + ) } @Test - fun `base block ID is multi_power_cable`() { - val cable = MultiPowerCable(TestHelper.createLocation(), BlockFace.SOUTH) - assertEquals("multi_power_cable", cable.baseBlockId) + fun `base block ID is atlas multi_power_cable`() { + val cable = + MultiPowerCable(TestHelper.createLocation(), BlockFace.SOUTH) + assertEquals("atlas:multi_power_cable", cable.baseBlockId) } @Test fun `descriptor has correct properties`() { val desc = MultiPowerCable.descriptor - assertEquals("multi_power_cable", desc.baseBlockId) + assertEquals("atlas:multi_power_cable", desc.baseBlockId) assertEquals("Multi Power Cable", desc.displayName) - assertEquals(12, desc.allRegistrableIds.size) - for (id in MultiPowerCable.DIRECTIONAL_IDS.values) { - assertTrue(desc.allRegistrableIds.contains(id), "Missing unpowered ID: $id") - } - for (id in MultiPowerCable.POWERED_IDS.values) { - assertTrue(desc.allRegistrableIds.contains(id), "Missing powered ID: $id") - } } @Test fun `descriptor has directional placement`() { val desc = MultiPowerCable.descriptor - assertEquals(com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, desc.placementType) - assertEquals(6, desc.directionalVariants.size) - } - - @Test - fun `facingFromBlockId returns correct facing for unpowered IDs`() { - assertEquals(BlockFace.NORTH, MultiPowerCable.facingFromBlockId("multi_power_cable_north")) - assertEquals(BlockFace.SOUTH, MultiPowerCable.facingFromBlockId("multi_power_cable_south")) - assertEquals(BlockFace.EAST, MultiPowerCable.facingFromBlockId("multi_power_cable_east")) - assertEquals(BlockFace.WEST, MultiPowerCable.facingFromBlockId("multi_power_cable_west")) - assertEquals(BlockFace.UP, MultiPowerCable.facingFromBlockId("multi_power_cable_up")) - assertEquals(BlockFace.DOWN, MultiPowerCable.facingFromBlockId("multi_power_cable_down")) - } - - @Test - fun `facingFromBlockId returns correct facing for powered IDs`() { - assertEquals(BlockFace.NORTH, MultiPowerCable.facingFromBlockId("multi_power_cable_north_powered")) - assertEquals(BlockFace.SOUTH, MultiPowerCable.facingFromBlockId("multi_power_cable_south_powered")) - assertEquals(BlockFace.EAST, MultiPowerCable.facingFromBlockId("multi_power_cable_east_powered")) - assertEquals(BlockFace.WEST, MultiPowerCable.facingFromBlockId("multi_power_cable_west_powered")) - assertEquals(BlockFace.UP, MultiPowerCable.facingFromBlockId("multi_power_cable_up_powered")) - assertEquals(BlockFace.DOWN, MultiPowerCable.facingFromBlockId("multi_power_cable_down_powered")) - } - - @Test - fun `facingFromBlockId returns null for unknown ID`() { - assertNull(MultiPowerCable.facingFromBlockId("multi_power_cable_diagonal")) - assertNull(MultiPowerCable.facingFromBlockId("unknown")) - } - - @Test - fun `all directional IDs are registered`() { - TestHelper.initPowerFactory() - for (id in MultiPowerCable.DIRECTIONAL_IDS.values) { - assertTrue(PowerBlockFactory.isRegistered(id), "Missing multi power cable ID: $id") - } + assertEquals( + com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, + desc.placementType + ) } @Test - fun `all powered IDs are registered`() { + fun `base ID is registered`() { TestHelper.initPowerFactory() - for (id in MultiPowerCable.POWERED_IDS.values) { - assertTrue(PowerBlockFactory.isRegistered(id), "Missing multi power cable powered ID: $id") - } + assertTrue( + PowerBlockFactory.isRegistered("atlas:multi_power_cable") + ) } @Test - fun `factory creates MultiPowerCable from directional ID`() { + fun `factory creates MultiPowerCable from base ID`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock("multi_power_cable_north", TestHelper.createLocation(), BlockFace.NORTH) + val block = PowerBlockFactory.createPowerBlock( + "atlas:multi_power_cable", + TestHelper.createLocation(), + BlockFace.NORTH + ) assertTrue(block is MultiPowerCable) assertEquals(BlockFace.NORTH, block!!.facing) } @Test fun `max storage is 10`() { - val cable = MultiPowerCable(TestHelper.createLocation(), BlockFace.NORTH) + val cable = + MultiPowerCable(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(10, cable.maxStorage) } @@ -136,18 +101,21 @@ class MultiPowerCableTest { val registry = PowerBlockRegistry(TestHelper.mockPlugin) val cableLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val cable = MultiPowerCable(cableLoc, BlockFace.NORTH) - TestHelper.addToRegistry(registry, cable, "multi_power_cable_north") + TestHelper.addToRegistry( + registry, cable, "atlas:multi_power_cable" + ) - // Place a battery behind (south, opposite of north-facing) val batteryLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val battery = SmallBattery(batteryLoc, BlockFace.NORTH) battery.currentPower = 5 - TestHelper.addToRegistry(registry, battery, "small_battery") + TestHelper.addToRegistry( + registry, battery, "atlas:small_battery" + ) cable.callPowerUpdate() - assertTrue(cable.currentPower > 0, "Cable should have pulled power") - assertTrue(battery.currentPower < 5, "Battery should have less power") + assertTrue(cable.currentPower > 0) + assertTrue(battery.currentPower < 5) } @Test @@ -156,27 +124,38 @@ class MultiPowerCableTest { val cableLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val cable = MultiPowerCable(cableLoc, BlockFace.NORTH) cable.currentPower = 5 - TestHelper.addToRegistry(registry, cable, "multi_power_cable_north") + TestHelper.addToRegistry( + registry, cable, "atlas:multi_power_cable" + ) - // Place batteries on output faces (not behind/south) - val eastBatteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) + val eastBatteryLoc = + TestHelper.createLocation(1.0, 64.0, 0.0) val eastBattery = SmallBattery(eastBatteryLoc, BlockFace.WEST) - TestHelper.addToRegistry(registry, eastBattery, "small_battery") + TestHelper.addToRegistry( + registry, eastBattery, "atlas:small_battery" + ) - val westBatteryLoc = TestHelper.createLocation(-1.0, 64.0, 0.0) + val westBatteryLoc = + TestHelper.createLocation(-1.0, 64.0, 0.0) val westBattery = SmallBattery(westBatteryLoc, BlockFace.EAST) - TestHelper.addToRegistry(registry, westBattery, "small_battery_east") - - val northBatteryLoc = TestHelper.createLocation(0.0, 64.0, -1.0) - val northBattery = SmallBattery(northBatteryLoc, BlockFace.SOUTH) - TestHelper.addToRegistry(registry, northBattery, "small_battery_south") + TestHelper.addToRegistry( + registry, westBattery, "atlas:small_battery" + ) + + val northBatteryLoc = + TestHelper.createLocation(0.0, 64.0, -1.0) + val northBattery = + SmallBattery(northBatteryLoc, BlockFace.SOUTH) + TestHelper.addToRegistry( + registry, northBattery, "atlas:small_battery" + ) cable.callPowerUpdate() - assertTrue(eastBattery.currentPower > 0, "East battery should have received power") - assertTrue(westBattery.currentPower > 0, "West battery should have received power") - assertTrue(northBattery.currentPower > 0, "North battery should have received power") - assertEquals(2, cable.currentPower, "Cable should have distributed 3 power (1 to each)") + assertTrue(eastBattery.currentPower > 0) + assertTrue(westBattery.currentPower > 0) + assertTrue(northBattery.currentPower > 0) + assertEquals(2, cable.currentPower) } @Test @@ -184,24 +163,29 @@ class MultiPowerCableTest { val registry = PowerBlockRegistry(TestHelper.mockPlugin) val cableLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val cable = MultiPowerCable(cableLoc, BlockFace.NORTH) - cable.currentPower = 10 // Already full - TestHelper.addToRegistry(registry, cable, "multi_power_cable_north") + cable.currentPower = 10 + TestHelper.addToRegistry( + registry, cable, "atlas:multi_power_cable" + ) val batteryLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val battery = SmallBattery(batteryLoc, BlockFace.NORTH) battery.currentPower = 5 - TestHelper.addToRegistry(registry, battery, "small_battery") + TestHelper.addToRegistry( + registry, battery, "atlas:small_battery" + ) cable.callPowerUpdate() assertEquals(10, cable.maxStorage) - assertEquals(5, battery.currentPower, "Battery should not lose power when cable is full") + assertEquals(5, battery.currentPower) } @Test fun `does not crash with no adjacent blocks`() { PowerBlockRegistry(TestHelper.mockPlugin) - val cable = MultiPowerCable(TestHelper.createLocation(), BlockFace.NORTH) + val cable = + MultiPowerCable(TestHelper.createLocation(), BlockFace.NORTH) assertDoesNotThrow { cable.callPowerUpdate() diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockDataTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockDataTest.kt index 3ca17bf..447003e 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockDataTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockDataTest.kt @@ -29,9 +29,9 @@ class PowerBlockDataTest { val loc = TestHelper.createLocation(10.0, 64.0, 20.0) val panel = SmallSolarPanel(loc) panel.currentPower = 1 - val data = PowerBlockData.fromPowerBlock(panel, "small_solar_panel") + val data = PowerBlockData.fromPowerBlock(panel, "atlas:small_solar_panel") - assertEquals("small_solar_panel", data.blockId) + assertEquals("atlas:small_solar_panel", data.blockId) assertEquals("world", data.world) assertEquals(10, data.x) assertEquals(64, data.y) @@ -44,7 +44,7 @@ class PowerBlockDataTest { @Test fun `fromPowerBlock for PowerCable captures facing`() { val cable = PowerCable(TestHelper.createLocation(), BlockFace.EAST) - val data = PowerBlockData.fromPowerBlock(cable, "power_cable_east") + val data = PowerBlockData.fromPowerBlock(cable, "atlas:power_cable") assertEquals("EAST", data.facing) } @@ -52,7 +52,7 @@ class PowerBlockDataTest { fun `fromPowerBlock for SmallDrill captures facing and enabled`() { val drill = SmallDrill(TestHelper.createLocation(), BlockFace.NORTH) drill.enabled = false - val data = PowerBlockData.fromPowerBlock(drill, "small_drill_north") + val data = PowerBlockData.fromPowerBlock(drill, "atlas:small_drill") assertEquals("NORTH", data.facing) assertEquals(false, data.enabled) } @@ -60,7 +60,7 @@ class PowerBlockDataTest { @Test fun `fromPowerBlock for SmallBattery captures facing`() { val battery = SmallBattery(TestHelper.createLocation(), BlockFace.UP) - val data = PowerBlockData.fromPowerBlock(battery, "small_battery") + val data = PowerBlockData.fromPowerBlock(battery, "atlas:small_battery") assertEquals("UP", data.facing) } @@ -104,9 +104,9 @@ class PowerBlockDataTest { val loc = TestHelper.createLocation(1.0, 2.0, 3.0) val panel = SmallSolarPanel(loc) panel.currentPower = 1 - val data = PowerBlockData.fromPowerBlock(panel, "small_solar_panel") + val data = PowerBlockData.fromPowerBlock(panel, "atlas:small_solar_panel") - assertEquals("small_solar_panel", data.blockId) + assertEquals("atlas:small_solar_panel", data.blockId) assertEquals(1, data.x) assertEquals(2, data.y) assertEquals(3, data.z) @@ -118,7 +118,7 @@ class PowerBlockDataTest { val drill = SmallDrill(TestHelper.createLocation(), BlockFace.WEST) drill.enabled = true drill.currentPower = 5 - val data = PowerBlockData.fromPowerBlock(drill, "small_drill_west") + val data = PowerBlockData.fromPowerBlock(drill, "atlas:small_drill") assertEquals("WEST", data.facing) assertEquals(true, data.enabled) diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt index 066be77..3c40562 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt @@ -28,65 +28,102 @@ class PowerBlockInitializerTest { TestHelper.initPowerFactory() val ids = PowerBlockFactory.getRegisteredBlockIds() - // 1 solar + 6 drill + 4 battery + 6 cable + 2 lava generator + 8 auto smelter + 12 multi power cable + 2 cobblestone generator + 2 obsidian generator + 12 power merger = 55 - assertEquals(55, ids.size) + // SmallSolarPanel: 2 (base + full) + // SmallDrill: 1 + // SmallBattery: 4 (base + low + medium + full) + // PowerCable: 1 + // LavaGenerator: 2 (base + active) + // AutoSmelter: 1 + // MultiPowerCable: 1 + // CobblestoneFactory: 2 (base + active) + // ObsidianFactory: 2 (base + active) + // PowerMerger: 1 + // Total: 17 + assertEquals(17, ids.size) } @Test fun `solar panel ID is registered`() { TestHelper.initPowerFactory() - assertTrue(PowerBlockFactory.isRegistered("small_solar_panel")) + assertTrue( + PowerBlockFactory.isRegistered("atlas:small_solar_panel") + ) } @Test - fun `all drill directional IDs are registered`() { + fun `drill base ID is registered`() { TestHelper.initPowerFactory() - for (id in SmallDrill.ALL_DIRECTIONAL_IDS) { - assertTrue(PowerBlockFactory.isRegistered(id), "Missing drill ID: $id") - } + assertTrue( + PowerBlockFactory.isRegistered("atlas:small_drill") + ) } @Test - fun `all battery variant IDs are registered`() { + fun `battery base and variant IDs are registered`() { TestHelper.initPowerFactory() - for (id in SmallBattery.ALL_VARIANT_IDS) { - assertTrue(PowerBlockFactory.isRegistered(id), "Missing battery ID: $id") - } + assertTrue( + PowerBlockFactory.isRegistered("atlas:small_battery") + ) + assertTrue( + PowerBlockFactory.isRegistered("atlas:small_battery_low") + ) + assertTrue( + PowerBlockFactory.isRegistered( + "atlas:small_battery_medium" + ) + ) + assertTrue( + PowerBlockFactory.isRegistered("atlas:small_battery_full") + ) } @Test - fun `all cable directional IDs are registered`() { + fun `cable base ID is registered`() { TestHelper.initPowerFactory() - for (id in PowerCable.DIRECTIONAL_IDS.values) { - assertTrue(PowerBlockFactory.isRegistered(id), "Missing cable ID: $id") - } + assertTrue( + PowerBlockFactory.isRegistered("atlas:power_cable") + ) } @Test fun `solar panel ID creates SmallSolarPanel`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock("small_solar_panel", TestHelper.createLocation()) + val block = PowerBlockFactory.createPowerBlock( + "atlas:small_solar_panel", TestHelper.createLocation() + ) assertTrue(block is SmallSolarPanel) } @Test fun `drill ID creates SmallDrill`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock("small_drill_north", TestHelper.createLocation(), BlockFace.NORTH) + val block = PowerBlockFactory.createPowerBlock( + "atlas:small_drill", + TestHelper.createLocation(), + BlockFace.NORTH + ) assertTrue(block is SmallDrill) } @Test fun `battery ID creates SmallBattery`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock("small_battery", TestHelper.createLocation(), BlockFace.DOWN) + val block = PowerBlockFactory.createPowerBlock( + "atlas:small_battery", + TestHelper.createLocation(), + BlockFace.DOWN + ) assertTrue(block is SmallBattery) } @Test fun `cable ID creates PowerCable`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock("power_cable_north", TestHelper.createLocation(), BlockFace.NORTH) + val block = PowerBlockFactory.createPowerBlock( + "atlas:power_cable", + TestHelper.createLocation(), + BlockFace.NORTH + ) assertTrue(block is PowerCable) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt index 49650ee..f06e103 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt @@ -8,14 +8,12 @@ import io.mockk.every import io.mockk.mockk import io.mockk.verify import org.bukkit.block.Block -import org.bukkit.block.BlockFace import org.bukkit.entity.Player import org.bukkit.event.block.Action import org.bukkit.event.block.BlockBreakEvent import org.bukkit.event.block.BlockPlaceEvent import org.bukkit.event.player.PlayerInteractEvent import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -36,7 +34,8 @@ class PowerBlockListenerTest { descriptors = emptyMap(), showDialog = { _, _ -> }, ) - listener = AtlasBlockListener(TestHelper.mockPlugin, listOf(system)) + listener = + AtlasBlockListener(TestHelper.mockPlugin, listOf(system)) } @AfterEach @@ -77,7 +76,9 @@ class PowerBlockListenerTest { fun `onBlockBreak unregisters power block`() { val loc = TestHelper.createLocation() val panel = SmallSolarPanel(loc) - TestHelper.addToRegistry(registry, panel, "small_solar_panel") + TestHelper.addToRegistry( + registry, panel, "atlas:small_solar_panel" + ) val block = mockk(relaxed = true) every { block.location } returns loc @@ -130,7 +131,9 @@ class PowerBlockListenerTest { val player = mockk(relaxed = true) every { player.isSneaking } returns false val block = mockk(relaxed = true) - every { block.location } returns TestHelper.createLocation(99.0, 99.0, 99.0) + every { block.location } returns TestHelper.createLocation( + 99.0, 99.0, 99.0 + ) val event = mockk(relaxed = true) every { event.action } returns Action.RIGHT_CLICK_BLOCK @@ -140,88 +143,4 @@ class PowerBlockListenerTest { listener.onPlayerInteract(event) verify(exactly = 0) { event.isCancelled = true } } - - @Test - fun `getPlayerFacing returns UP when dy positive`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 65.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.UP, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns DOWN when dy negative`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 63.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.DOWN, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns EAST when dx positive`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(1.0, 64.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.EAST, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns WEST when dx negative`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(-1.0, 64.0, 0.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.WEST, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns SOUTH when dz positive`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 64.0, 1.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.SOUTH, AtlasBlockListener.getPlayerFacing(event)) - } - - @Test - fun `getPlayerFacing returns NORTH when dz negative`() { - val placed = mockk(relaxed = true) - val against = mockk(relaxed = true) - every { placed.location } returns TestHelper.createLocation(0.0, 64.0, -1.0) - every { against.location } returns TestHelper.createLocation(0.0, 64.0, 0.0) - - val event = mockk(relaxed = true) - every { event.block } returns placed - every { event.blockAgainst } returns against - - assertEquals(BlockFace.NORTH, AtlasBlockListener.getPlayerFacing(event)) - } } diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt index 9b06cfe..c664794 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt @@ -11,7 +11,6 @@ import org.bukkit.block.BlockFace import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertFalse -import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -31,7 +30,8 @@ class PowerBlockLogicTest { @Test fun `addPower on empty block returns amount added`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) val added = block.addPower(5) assertEquals(5, added) assertEquals(5, block.currentPower) @@ -39,7 +39,8 @@ class PowerBlockLogicTest { @Test fun `addPower caps at maxStorage`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) val added = block.addPower(15) assertEquals(10, added) assertEquals(10, block.currentPower) @@ -47,7 +48,8 @@ class PowerBlockLogicTest { @Test fun `addPower with partial space returns space available`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) block.currentPower = 8 val added = block.addPower(3) assertEquals(2, added) @@ -56,7 +58,8 @@ class PowerBlockLogicTest { @Test fun `removePower returns amount removed`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) block.currentPower = 5 val removed = block.removePower(3) assertEquals(3, removed) @@ -65,7 +68,8 @@ class PowerBlockLogicTest { @Test fun `removePower caps at currentPower`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) block.currentPower = 3 val removed = block.removePower(10) assertEquals(3, removed) @@ -74,7 +78,8 @@ class PowerBlockLogicTest { @Test fun `removePower on empty block returns 0`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) val removed = block.removePower(1) assertEquals(0, removed) assertEquals(0, block.currentPower) @@ -82,26 +87,30 @@ class PowerBlockLogicTest { @Test fun `hasPower returns true when power greater than 0`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) block.currentPower = 1 assertTrue(block.hasPower()) } @Test fun `hasPower returns false when power is 0`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) assertFalse(block.hasPower()) } @Test fun `canAcceptPower returns true when below max and canReceivePower`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) assertTrue(block.canAcceptPower()) } @Test fun `canAcceptPower returns false when full`() { - val block = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val block = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) block.currentPower = 10 assertFalse(block.canAcceptPower()) } @@ -129,14 +138,20 @@ class PowerBlockLogicTest { @Test fun `solar panel visual state empty when no power`() { val panel = SmallSolarPanel(TestHelper.createLocation()) - assertEquals("small_solar_panel", panel.getVisualStateBlockId()) + assertEquals( + "atlas:small_solar_panel", + panel.getVisualStateBlockId() + ) } @Test fun `solar panel visual state full when has power`() { val panel = SmallSolarPanel(TestHelper.createLocation()) panel.currentPower = 1 - assertEquals("small_solar_panel_full", panel.getVisualStateBlockId()) + assertEquals( + "atlas:small_solar_panel_full", + panel.getVisualStateBlockId() + ) } @Test @@ -168,46 +183,67 @@ class PowerBlockLogicTest { @Test fun `battery maxStorage is 10`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(10, battery.maxStorage) } @Test fun `battery facing defaults to DOWN when SELF`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.SELF) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.SELF) assertEquals(BlockFace.DOWN, battery.facing) } @Test fun `battery visual state empty when power 0`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) - assertEquals("small_battery", battery.getVisualStateBlockId()) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals( + "atlas:small_battery", + battery.getVisualStateBlockId() + ) } @Test fun `battery visual state low when power 1-3`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) for (p in 1..3) { battery.currentPower = p - assertEquals("small_battery_low", battery.getVisualStateBlockId(), "Failed for power=$p") + assertEquals( + "atlas:small_battery_low", + battery.getVisualStateBlockId(), + "Failed for power=$p" + ) } } @Test fun `battery visual state medium when power 4-7`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) for (p in 4..7) { battery.currentPower = p - assertEquals("small_battery_medium", battery.getVisualStateBlockId(), "Failed for power=$p") + assertEquals( + "atlas:small_battery_medium", + battery.getVisualStateBlockId(), + "Failed for power=$p" + ) } } @Test fun `battery visual state full when power 8-10`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) for (p in 8..10) { battery.currentPower = p - assertEquals("small_battery_full", battery.getVisualStateBlockId(), "Failed for power=$p") + assertEquals( + "atlas:small_battery_full", + battery.getVisualStateBlockId(), + "Failed for power=$p" + ) } } @@ -217,13 +253,16 @@ class PowerBlockLogicTest { val batteryLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val battery = SmallBattery(batteryLoc, BlockFace.NORTH) - // Behind NORTH is SOUTH (oppositeFace), so source at z+1 val sourceLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val source = SmallSolarPanel(sourceLoc) source.currentPower = 1 - TestHelper.addToRegistry(registry, battery, "small_battery") - TestHelper.addToRegistry(registry, source, "small_solar_panel") + TestHelper.addToRegistry( + registry, battery, "atlas:small_battery" + ) + TestHelper.addToRegistry( + registry, source, "atlas:small_solar_panel" + ) battery.callPowerUpdate() assertEquals(1, battery.currentPower) @@ -233,7 +272,8 @@ class PowerBlockLogicTest { @Test fun `battery does not pull when already full`() { val registry = PowerBlockRegistry(TestHelper.mockPlugin) - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) battery.currentPower = 10 battery.callPowerUpdate() @@ -244,21 +284,22 @@ class PowerBlockLogicTest { @Test fun `cable maxStorage is 1`() { - val cable = PowerCable(TestHelper.createLocation(), BlockFace.NORTH) + val cable = + PowerCable(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(1, cable.maxStorage) } @Test - fun `cable visual state powered when has power`() { - val cable = PowerCable(TestHelper.createLocation(), BlockFace.NORTH) + fun `cable visual state always returns BLOCK_ID`() { + val cable = + PowerCable(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals( + "atlas:power_cable", cable.getVisualStateBlockId() + ) cable.currentPower = 1 - assertEquals("power_cable_north_powered", cable.getVisualStateBlockId()) - } - - @Test - fun `cable visual state unpowered when empty`() { - val cable = PowerCable(TestHelper.createLocation(), BlockFace.NORTH) - assertEquals("power_cable_north", cable.getVisualStateBlockId()) + assertEquals( + "atlas:power_cable", cable.getVisualStateBlockId() + ) } @Test @@ -267,13 +308,16 @@ class PowerBlockLogicTest { val cableLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val cable = PowerCable(cableLoc, BlockFace.NORTH) - // Behind NORTH is SOUTH, so source at z+1 val sourceLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val source = SmallSolarPanel(sourceLoc) source.currentPower = 1 - TestHelper.addToRegistry(registry, cable, "power_cable_north") - TestHelper.addToRegistry(registry, source, "small_solar_panel") + TestHelper.addToRegistry( + registry, cable, "atlas:power_cable" + ) + TestHelper.addToRegistry( + registry, source, "atlas:small_solar_panel" + ) cable.callPowerUpdate() assertEquals(1, cable.currentPower) @@ -286,29 +330,22 @@ class PowerBlockLogicTest { val cableLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val cable = PowerCable(cableLoc, BlockFace.NORTH) - // Place source to the EAST (not behind) val sourceLoc = TestHelper.createLocation(1.0, 64.0, 0.0) val source = SmallSolarPanel(sourceLoc) source.currentPower = 1 - TestHelper.addToRegistry(registry, cable, "power_cable_north") - TestHelper.addToRegistry(registry, source, "small_solar_panel") + TestHelper.addToRegistry( + registry, cable, "atlas:power_cable" + ) + TestHelper.addToRegistry( + registry, source, "atlas:small_solar_panel" + ) cable.callPowerUpdate() assertEquals(0, cable.currentPower) assertEquals(1, source.currentPower) } - @Test - fun `cable visual states for all directions`() { - for ((face, id) in PowerCable.DIRECTIONAL_IDS) { - val cable = PowerCable(TestHelper.createLocation(), face) - assertEquals(id, cable.getVisualStateBlockId()) - cable.currentPower = 1 - assertEquals(PowerCable.POWERED_IDS[face], cable.getVisualStateBlockId()) - } - } - // --- SmallDrill specifics --- @Test @@ -335,33 +372,25 @@ class PowerBlockLogicTest { @Test fun `drill miningDirection defaults to DOWN when SELF`() { - val drill = SmallDrill(TestHelper.createLocation(), BlockFace.SELF) + val drill = + SmallDrill(TestHelper.createLocation(), BlockFace.SELF) assertEquals(BlockFace.DOWN, drill.miningDirection) } @Test - fun `drill visual state returns correct directional variant`() { - for ((face, id) in SmallDrill.DIRECTIONAL_IDS) { - val drill = SmallDrill(TestHelper.createLocation(), face) - assertEquals(id, drill.getVisualStateBlockId()) - } - } - - @Test - fun `drill has all 6 directional IDs`() { - assertEquals(6, SmallDrill.DIRECTIONAL_IDS.size) - assertTrue(SmallDrill.DIRECTIONAL_IDS.containsKey(BlockFace.NORTH)) - assertTrue(SmallDrill.DIRECTIONAL_IDS.containsKey(BlockFace.SOUTH)) - assertTrue(SmallDrill.DIRECTIONAL_IDS.containsKey(BlockFace.EAST)) - assertTrue(SmallDrill.DIRECTIONAL_IDS.containsKey(BlockFace.WEST)) - assertTrue(SmallDrill.DIRECTIONAL_IDS.containsKey(BlockFace.UP)) - assertTrue(SmallDrill.DIRECTIONAL_IDS.containsKey(BlockFace.DOWN)) + fun `drill visual state always returns BLOCK_ID`() { + val drill = + SmallDrill(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals( + "atlas:small_drill", drill.getVisualStateBlockId() + ) } @Test fun `drill disabled does nothing on powerUpdate`() { val registry = PowerBlockRegistry(TestHelper.mockPlugin) - val drill = SmallDrill(TestHelper.createLocation(), BlockFace.DOWN) + val drill = + SmallDrill(TestHelper.createLocation(), BlockFace.DOWN) drill.enabled = false drill.currentPower = 10 @@ -399,19 +428,22 @@ class PowerBlockLogicTest { @Test fun `battery facing preserves NORTH`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(BlockFace.NORTH, battery.facing) } @Test fun `battery facing preserves EAST`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.EAST) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.EAST) assertEquals(BlockFace.EAST, battery.facing) } @Test fun `battery facing preserves UP`() { - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.UP) + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.UP) assertEquals(BlockFace.UP, battery.facing) } @@ -427,8 +459,12 @@ class PowerBlockLogicTest { val source = SmallSolarPanel(sourceLoc) source.currentPower = 0 - TestHelper.addToRegistry(registry, battery, "small_battery") - TestHelper.addToRegistry(registry, source, "small_solar_panel") + TestHelper.addToRegistry( + registry, battery, "atlas:small_battery" + ) + TestHelper.addToRegistry( + registry, source, "atlas:small_solar_panel" + ) battery.callPowerUpdate() assertEquals(0, battery.currentPower) @@ -437,24 +473,13 @@ class PowerBlockLogicTest { @Test fun `battery powerUpdate when no block behind it`() { val registry = PowerBlockRegistry(TestHelper.mockPlugin) - val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) - TestHelper.addToRegistry(registry, battery, "small_battery") + val battery = + SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) + TestHelper.addToRegistry( + registry, battery, "atlas:small_battery" + ) battery.callPowerUpdate() assertEquals(0, battery.currentPower) } - - // --- PowerCable.facingFromBlockId --- - - @Test - fun `cable facingFromBlockId returns correct faces`() { - for ((face, id) in PowerCable.DIRECTIONAL_IDS) { - assertEquals(face, PowerCable.facingFromBlockId(id)) - } - } - - @Test - fun `cable facingFromBlockId returns null for unknown`() { - assertNull(PowerCable.facingFromBlockId("unknown_cable_id")) - } } diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockPersistenceTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockPersistenceTest.kt index 0651669..6a9280c 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockPersistenceTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockPersistenceTest.kt @@ -45,7 +45,7 @@ class PowerBlockPersistenceTest { fun `save and load round-trip preserves data`() { val panel = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 2.0)) panel.currentPower = 1 - TestHelper.addToRegistry(registry, panel, "small_solar_panel") + TestHelper.addToRegistry(registry, panel, "atlas:small_solar_panel") persistence.save(registry) @@ -55,7 +55,7 @@ class PowerBlockPersistenceTest { val loaded = loadRegistry.getAllPowerBlocksWithIds() assertEquals(1, loaded.size) - assertEquals("small_solar_panel", loaded[0].second) + assertEquals("atlas:small_solar_panel", loaded[0].second) assertEquals(1, loaded[0].first.currentPower) } @@ -71,7 +71,7 @@ class PowerBlockPersistenceTest { val drill = SmallDrill(TestHelper.createLocation(), BlockFace.DOWN) drill.enabled = true drill.currentPower = 5 - TestHelper.addToRegistry(registry, drill, "small_drill_down") + TestHelper.addToRegistry(registry, drill, "atlas:small_drill") persistence.save(registry) @@ -88,7 +88,7 @@ class PowerBlockPersistenceTest { fun `drill enabled false persists correctly`() { val drill = SmallDrill(TestHelper.createLocation(), BlockFace.NORTH) drill.enabled = false - TestHelper.addToRegistry(registry, drill, "small_drill_north") + TestHelper.addToRegistry(registry, drill, "atlas:small_drill") persistence.save(registry) @@ -102,7 +102,7 @@ class PowerBlockPersistenceTest { @Test fun `facing direction persists for cables`() { val cable = PowerCable(TestHelper.createLocation(), BlockFace.EAST) - TestHelper.addToRegistry(registry, cable, "power_cable_east") + TestHelper.addToRegistry(registry, cable, "atlas:power_cable") persistence.save(registry) @@ -117,7 +117,7 @@ class PowerBlockPersistenceTest { fun `current power level persists accurately`() { val drill = SmallDrill(TestHelper.createLocation(), BlockFace.DOWN) drill.currentPower = 7 - TestHelper.addToRegistry(registry, drill, "small_drill_down") + TestHelper.addToRegistry(registry, drill, "atlas:small_drill") persistence.save(registry) @@ -131,7 +131,7 @@ class PowerBlockPersistenceTest { fun `battery round-trip preserves facing and power`() { val battery = SmallBattery(TestHelper.createLocation(5.0, 64.0, 3.0), BlockFace.EAST) battery.currentPower = 7 - TestHelper.addToRegistry(registry, battery, "small_battery") + TestHelper.addToRegistry(registry, battery, "atlas:small_battery") persistence.save(registry) @@ -153,9 +153,9 @@ class PowerBlockPersistenceTest { val drill = SmallDrill(TestHelper.createLocation(2.0, 64.0, 0.0), BlockFace.DOWN) drill.currentPower = 5 - TestHelper.addToRegistry(registry, panel, "small_solar_panel") - TestHelper.addToRegistry(registry, cable, "power_cable_north") - TestHelper.addToRegistry(registry, drill, "small_drill_down") + TestHelper.addToRegistry(registry, panel, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, cable, "atlas:power_cable") + TestHelper.addToRegistry(registry, drill, "atlas:small_drill") persistence.save(registry) diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockRegistryTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockRegistryTest.kt index d4eec65..d2ba47c 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockRegistryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockRegistryTest.kt @@ -37,7 +37,7 @@ class PowerBlockRegistryTest { fun `register and get returns block`() { val loc = TestHelper.createLocation() val block = SmallSolarPanel(loc) - TestHelper.addToRegistry(registry, block, "small_solar_panel") + TestHelper.addToRegistry(registry, block, "atlas:small_solar_panel") val retrieved = registry.getPowerBlock(loc) assertSame(block, retrieved) @@ -47,7 +47,7 @@ class PowerBlockRegistryTest { fun `unregisterPowerBlock removes and returns block`() { val loc = TestHelper.createLocation() val block = SmallSolarPanel(loc) - TestHelper.addToRegistry(registry, block, "small_solar_panel") + TestHelper.addToRegistry(registry, block, "atlas:small_solar_panel") val removed = registry.unregisterPowerBlock(loc) assertSame(block, removed) @@ -65,7 +65,7 @@ class PowerBlockRegistryTest { val loc = TestHelper.createLocation(0.0, 64.0, 0.0) val northLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val northBlock = SmallSolarPanel(northLoc) - TestHelper.addToRegistry(registry, northBlock, "small_solar_panel") + TestHelper.addToRegistry(registry, northBlock, "atlas:small_solar_panel") val adjacent = registry.getAdjacentPowerBlock(loc, BlockFace.NORTH) assertSame(northBlock, adjacent) @@ -94,7 +94,7 @@ class PowerBlockRegistryTest { for ((dx, dy, dz) in offsets) { val neighborLoc = TestHelper.createLocation(dx, 64.0 + dy, dz) - TestHelper.addToRegistry(registry, SmallSolarPanel(neighborLoc), "small_solar_panel") + TestHelper.addToRegistry(registry, SmallSolarPanel(neighborLoc), "atlas:small_solar_panel") } val adjacent = registry.getAdjacentPowerBlocks(loc) @@ -108,13 +108,13 @@ class PowerBlockRegistryTest { val block1 = SmallSolarPanel(loc1) val block2 = SmallBattery(loc2, BlockFace.NORTH) - TestHelper.addToRegistry(registry, block1, "small_solar_panel") - TestHelper.addToRegistry(registry, block2, "small_battery") + TestHelper.addToRegistry(registry, block1, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, block2, "atlas:small_battery") val pairs = registry.getAllPowerBlocksWithIds() assertEquals(2, pairs.size) - assertTrue(pairs.any { it.first === block1 && it.second == "small_solar_panel" }) - assertTrue(pairs.any { it.first === block2 && it.second == "small_battery" }) + assertTrue(pairs.any { it.first === block1 && it.second == "atlas:small_solar_panel" }) + assertTrue(pairs.any { it.first === block2 && it.second == "atlas:small_battery" }) } @Test @@ -154,8 +154,8 @@ class PowerBlockRegistryTest { val loc = TestHelper.createLocation() val block1 = SmallSolarPanel(loc) val block2 = SmallSolarPanel(loc) - TestHelper.addToRegistry(registry, block1, "small_solar_panel") - TestHelper.addToRegistry(registry, block2, "small_solar_panel") + TestHelper.addToRegistry(registry, block1, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, block2, "atlas:small_solar_panel") assertSame(block2, registry.getPowerBlock(loc)) } diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt index 7f4afe0..96fd8dd 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt @@ -28,53 +28,52 @@ class PowerMergerTest { @Test fun `maxStorage is 2`() { - val merger = PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) + val merger = + PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(2, merger.maxStorage) } @Test fun `canReceivePower is false`() { - // PowerMerger does not use canReceivePower — it pulls manually from non-facing sides - val merger = PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) + val merger = + PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) assertFalse(merger.canAcceptPower()) } @Test - fun `visual state unpowered when no power`() { - val merger = PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) - assertEquals("power_merger_north", merger.getVisualStateBlockId()) - } - - @Test - fun `visual state powered when has power`() { - val merger = PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) + fun `visual state always returns BLOCK_ID`() { + val merger = + PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals( + "atlas:power_merger", merger.getVisualStateBlockId() + ) merger.currentPower = 1 - assertEquals("power_merger_north_powered", merger.getVisualStateBlockId()) - } - - @Test - fun `visual state varies by facing direction`() { - for ((face, expectedId) in PowerMerger.DIRECTIONAL_IDS) { - val merger = PowerMerger(TestHelper.createLocation(), face) - assertEquals(expectedId, merger.getVisualStateBlockId()) - } + assertEquals( + "atlas:power_merger", merger.getVisualStateBlockId() + ) } @Test fun `pulls power from non-facing sides`() { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = PowerMerger(mergerLoc, BlockFace.NORTH) - TestHelper.addToRegistry(registry, merger, "power_merger_north") + TestHelper.addToRegistry( + registry, merger, "atlas:power_merger" + ) - // Source to the south (opposite of facing — behind) - val source1 = SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 1.0)) + val source1 = + SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 1.0)) source1.currentPower = 1 - TestHelper.addToRegistry(registry, source1, "small_solar_panel") + TestHelper.addToRegistry( + registry, source1, "atlas:small_solar_panel" + ) - // Source to the east (side) - val source2 = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) + val source2 = + SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) source2.currentPower = 1 - TestHelper.addToRegistry(registry, source2, "small_solar_panel") + TestHelper.addToRegistry( + registry, source2, "atlas:small_solar_panel" + ) merger.callPowerUpdate() @@ -87,12 +86,17 @@ class PowerMergerTest { fun `does not pull power from facing direction`() { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = PowerMerger(mergerLoc, BlockFace.NORTH) - TestHelper.addToRegistry(registry, merger, "power_merger_north") + TestHelper.addToRegistry( + registry, merger, "atlas:power_merger" + ) - // Source to the north (facing direction — should NOT pull from here) - val source = SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, -1.0)) + val source = SmallSolarPanel( + TestHelper.createLocation(0.0, 64.0, -1.0) + ) source.currentPower = 1 - TestHelper.addToRegistry(registry, source, "small_solar_panel") + TestHelper.addToRegistry( + registry, source, "atlas:small_solar_panel" + ) merger.callPowerUpdate() @@ -105,11 +109,16 @@ class PowerMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = PowerMerger(mergerLoc, BlockFace.NORTH) merger.currentPower = 2 - TestHelper.addToRegistry(registry, merger, "power_merger_north") + TestHelper.addToRegistry( + registry, merger, "atlas:power_merger" + ) - val source = SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 1.0)) + val source = + SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 1.0)) source.currentPower = 1 - TestHelper.addToRegistry(registry, source, "small_solar_panel") + TestHelper.addToRegistry( + registry, source, "atlas:small_solar_panel" + ) merger.callPowerUpdate() @@ -120,11 +129,8 @@ class PowerMergerTest { @Test fun `descriptor has correct properties`() { val desc = PowerMerger.descriptor - assertEquals("power_merger", desc.baseBlockId) + assertEquals("atlas:power_merger", desc.baseBlockId) assertEquals("Power Merger", desc.displayName) - assertEquals(12, desc.allRegistrableIds.size) - assertTrue(desc.allRegistrableIds.contains("power_merger_north")) - assertTrue(desc.allRegistrableIds.contains("power_merger_north_powered")) } @Test @@ -132,13 +138,17 @@ class PowerMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = PowerMerger(mergerLoc, BlockFace.NORTH) merger.currentPower = 2 - TestHelper.addToRegistry(registry, merger, "power_merger_north") + TestHelper.addToRegistry( + registry, merger, "atlas:power_merger" + ) - // Consumer to the north (facing direction) that pulls from adjacent - val consumer = com.coderjoe.atlas.utility.block.SmallDrill(TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.DOWN) - TestHelper.addToRegistry(registry, consumer, "small_drill_down") + val consumer = com.coderjoe.atlas.utility.block.SmallDrill( + TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.DOWN + ) + TestHelper.addToRegistry( + registry, consumer, "atlas:small_drill" + ) - // The merger stores power; downstream blocks pull from it via their own update assertTrue(merger.hasPower()) val pulled = merger.removePower(1) assertEquals(1, pulled) diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerNetworkIntegrationTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerNetworkIntegrationTest.kt index 8f66af1..7b6884a 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerNetworkIntegrationTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerNetworkIntegrationTest.kt @@ -40,8 +40,8 @@ class PowerNetworkIntegrationTest { // Cable at (0,64,1) facing SOUTH (pulls from NORTH = behind = z-1 = solar) val cable = PowerCable(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) - TestHelper.addToRegistry(registry, solar, "small_solar_panel") - TestHelper.addToRegistry(registry, cable, "power_cable_south") + TestHelper.addToRegistry(registry, solar, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, cable, "atlas:power_cable") // Solar generates solar.callPowerUpdate() @@ -61,9 +61,9 @@ class PowerNetworkIntegrationTest { val cable1 = PowerCable(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) val cable2 = PowerCable(TestHelper.createLocation(0.0, 64.0, 2.0), BlockFace.SOUTH) - TestHelper.addToRegistry(registry, solar, "small_solar_panel") - TestHelper.addToRegistry(registry, cable1, "power_cable_south") - TestHelper.addToRegistry(registry, cable2, "power_cable_south") + TestHelper.addToRegistry(registry, solar, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, cable1, "atlas:power_cable") + TestHelper.addToRegistry(registry, cable2, "atlas:power_cable") // Tick 1: solar generates solar.callPowerUpdate() @@ -87,8 +87,8 @@ class PowerNetworkIntegrationTest { // Battery facing SOUTH, pulls from behind (NORTH = z-1 = solar) val battery = SmallBattery(TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH) - TestHelper.addToRegistry(registry, solar, "small_solar_panel") - TestHelper.addToRegistry(registry, battery, "small_battery") + TestHelper.addToRegistry(registry, solar, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, battery, "atlas:small_battery") // Tick 1: solar generates, battery pulls solar.callPowerUpdate() @@ -109,8 +109,8 @@ class PowerNetworkIntegrationTest { val source = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) source.currentPower = 1 - TestHelper.addToRegistry(registry, cable, "power_cable_north") - TestHelper.addToRegistry(registry, source, "small_solar_panel") + TestHelper.addToRegistry(registry, cable, "atlas:power_cable") + TestHelper.addToRegistry(registry, source, "atlas:small_solar_panel") cable.callPowerUpdate() assertEquals(0, cable.currentPower) // did not pull @@ -130,10 +130,10 @@ class PowerNetworkIntegrationTest { val source3 = SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 1.0)) source3.currentPower = 1 - TestHelper.addToRegistry(registry, drill, "small_drill_down") - TestHelper.addToRegistry(registry, source1, "small_solar_panel") - TestHelper.addToRegistry(registry, source2, "small_solar_panel") - TestHelper.addToRegistry(registry, source3, "small_solar_panel") + TestHelper.addToRegistry(registry, drill, "atlas:small_drill") + TestHelper.addToRegistry(registry, source1, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, source2, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, source3, "atlas:small_solar_panel") // Mock blocks below so mining scan doesn't error for (y in 63 downTo -64) { @@ -155,10 +155,10 @@ class PowerNetworkIntegrationTest { val cable2 = PowerCable(TestHelper.createLocation(0.0, 64.0, 2.0), BlockFace.SOUTH) val battery = SmallBattery(TestHelper.createLocation(0.0, 64.0, 3.0), BlockFace.SOUTH) - TestHelper.addToRegistry(registry, solar, "small_solar_panel") - TestHelper.addToRegistry(registry, cable1, "power_cable_south") - TestHelper.addToRegistry(registry, cable2, "power_cable_south") - TestHelper.addToRegistry(registry, battery, "small_battery") + TestHelper.addToRegistry(registry, solar, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, cable1, "atlas:power_cable") + TestHelper.addToRegistry(registry, cable2, "atlas:power_cable") + TestHelper.addToRegistry(registry, battery, "atlas:small_battery") // Simulate several ticks of power flowing through the chain repeat(3) { diff --git a/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt b/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt index cb78bb8..1e55d7c 100644 --- a/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt @@ -12,7 +12,6 @@ import org.bukkit.entity.Item import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -31,69 +30,59 @@ class ConveyorBeltTest { @Test fun `conveyor belt has correct facing`() { - val belt = ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) + val belt = + ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(BlockFace.NORTH, belt.facing) } @Test - fun `conveyor belt visual state matches facing`() { - for ((face, id) in ConveyorBelt.DIRECTIONAL_IDS) { - val belt = ConveyorBelt(TestHelper.createLocation(), face) - assertEquals(id, belt.getVisualStateBlockId()) - } + fun `conveyor belt visual state always returns BLOCK_ID`() { + val belt = + ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) + assertEquals( + "atlas:conveyor_belt", belt.getVisualStateBlockId() + ) } @Test - fun `conveyor belt base block ID is conveyor_belt`() { - val belt = ConveyorBelt(TestHelper.createLocation(), BlockFace.SOUTH) - assertEquals("conveyor_belt", belt.baseBlockId) + fun `conveyor belt base block ID is atlas conveyor_belt`() { + val belt = + ConveyorBelt(TestHelper.createLocation(), BlockFace.SOUTH) + assertEquals("atlas:conveyor_belt", belt.baseBlockId) } @Test fun `conveyor belt descriptor has correct properties`() { val desc = ConveyorBelt.descriptor - assertEquals("conveyor_belt", desc.baseBlockId) + assertEquals("atlas:conveyor_belt", desc.baseBlockId) assertEquals("Conveyor Belt", desc.displayName) - assertEquals(4, desc.allRegistrableIds.size) - assertTrue(desc.allRegistrableIds.contains("conveyor_belt_north")) - assertTrue(desc.allRegistrableIds.contains("conveyor_belt_south")) - assertTrue(desc.allRegistrableIds.contains("conveyor_belt_east")) - assertTrue(desc.allRegistrableIds.contains("conveyor_belt_west")) } @Test fun `conveyor belt descriptor has directional placement`() { val desc = ConveyorBelt.descriptor - assertEquals(com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, desc.placementType) - assertEquals(4, desc.directionalVariants.size) - } - - @Test - fun `facingFromBlockId returns correct facing`() { - assertEquals(BlockFace.NORTH, ConveyorBelt.facingFromBlockId("conveyor_belt_north")) - assertEquals(BlockFace.SOUTH, ConveyorBelt.facingFromBlockId("conveyor_belt_south")) - assertEquals(BlockFace.EAST, ConveyorBelt.facingFromBlockId("conveyor_belt_east")) - assertEquals(BlockFace.WEST, ConveyorBelt.facingFromBlockId("conveyor_belt_west")) + assertEquals( + com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, + desc.placementType + ) } @Test - fun `facingFromBlockId returns null for unknown ID`() { - assertNull(ConveyorBelt.facingFromBlockId("conveyor_belt_up")) - assertNull(ConveyorBelt.facingFromBlockId("unknown")) - } - - @Test - fun `all directional IDs are registered`() { + fun `base ID is registered`() { TestHelper.initTransportFactory() - for (id in ConveyorBelt.DIRECTIONAL_IDS.values) { - assertTrue(TransportBlockFactory.isRegistered(id), "Missing conveyor belt ID: $id") - } + assertTrue( + TransportBlockFactory.isRegistered("atlas:conveyor_belt") + ) } @Test - fun `factory creates ConveyorBelt from directional ID`() { + fun `factory creates ConveyorBelt from base ID`() { TestHelper.initTransportFactory() - val block = TransportBlockFactory.createTransportBlock("conveyor_belt_north", TestHelper.createLocation(), BlockFace.NORTH) + val block = TransportBlockFactory.createTransportBlock( + "atlas:conveyor_belt", + TestHelper.createLocation(), + BlockFace.NORTH + ) assertTrue(block is ConveyorBelt) assertEquals(BlockFace.NORTH, block!!.facing) } @@ -101,9 +90,14 @@ class ConveyorBeltTest { @Test fun `transport update does not throw with no nearby entities`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) + val belt = + ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns emptyList() + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns emptyList() assertDoesNotThrow { belt.callTransportUpdate() @@ -113,14 +107,22 @@ class ConveyorBeltTest { @Test fun `transport update moves item north`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH) + val belt = ConveyorBelt( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH + ) - val itemLoc = Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) + val itemLoc = + Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) val mockItem = mockk(relaxed = true) every { mockItem.location } returns itemLoc - every { mockItem.teleportAsync(any()) } returns CompletableFuture.completedFuture(true) + every { mockItem.teleportAsync(any()) } returns + CompletableFuture.completedFuture(true) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns listOf(mockItem) + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns listOf(mockItem) belt.callTransportUpdate() @@ -136,14 +138,22 @@ class ConveyorBeltTest { @Test fun `transport update moves item east`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.EAST) + val belt = ConveyorBelt( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.EAST + ) - val itemLoc = Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) + val itemLoc = + Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) val mockItem = mockk(relaxed = true) every { mockItem.location } returns itemLoc - every { mockItem.teleportAsync(any()) } returns CompletableFuture.completedFuture(true) + every { mockItem.teleportAsync(any()) } returns + CompletableFuture.completedFuture(true) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns listOf(mockItem) + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns listOf(mockItem) belt.callTransportUpdate() @@ -159,16 +169,26 @@ class ConveyorBeltTest { @Test fun `transport update moves multiple items`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH) + val belt = ConveyorBelt( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH + ) val item1 = mockk(relaxed = true) val item2 = mockk(relaxed = true) - every { item1.location } returns Location(TestHelper.mockWorld, 0.3, 64.4, 0.3) - every { item2.location } returns Location(TestHelper.mockWorld, 0.7, 64.4, 0.7) - every { item1.teleportAsync(any()) } returns CompletableFuture.completedFuture(true) - every { item2.teleportAsync(any()) } returns CompletableFuture.completedFuture(true) - - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns listOf(item1, item2) + every { item1.location } returns + Location(TestHelper.mockWorld, 0.3, 64.4, 0.3) + every { item2.location } returns + Location(TestHelper.mockWorld, 0.7, 64.4, 0.7) + every { item1.teleportAsync(any()) } returns + CompletableFuture.completedFuture(true) + every { item2.teleportAsync(any()) } returns + CompletableFuture.completedFuture(true) + + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns listOf(item1, item2) belt.callTransportUpdate() @@ -179,10 +199,16 @@ class ConveyorBeltTest { @Test fun `transport update ignores non-item entities`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) - - val mockPlayer = mockk(relaxed = true) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns listOf(mockPlayer) + val belt = + ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) + + val mockPlayer = + mockk(relaxed = true) + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns listOf(mockPlayer) assertDoesNotThrow { belt.callTransportUpdate() @@ -191,6 +217,8 @@ class ConveyorBeltTest { @Test fun `descriptor description mentions direction`() { - assertTrue(ConveyorBelt.descriptor.description.contains("forward")) + assertTrue( + ConveyorBelt.descriptor.description.contains("forward") + ) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt index 458eb82..f3e2ca4 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt @@ -14,7 +14,6 @@ import org.bukkit.entity.Item import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -33,107 +32,86 @@ class AutoSmelterTest { @Test fun `auto smelter has correct facing`() { - val smelter = AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) + val smelter = + AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(BlockFace.NORTH, smelter.facing) } @Test - fun `auto smelter visual state unpowered matches facing`() { - for ((face, id) in AutoSmelter.DIRECTIONAL_IDS) { - val smelter = AutoSmelter(TestHelper.createLocation(), face) - smelter.currentPower = 0 - assertEquals(id, smelter.getVisualStateBlockId()) - } - } - - @Test - fun `auto smelter visual state powered matches facing`() { - for ((face, id) in AutoSmelter.POWERED_IDS) { - val smelter = AutoSmelter(TestHelper.createLocation(), face) - smelter.currentPower = 2 - assertEquals(id, smelter.getVisualStateBlockId()) - } + fun `auto smelter visual state always returns BLOCK_ID`() { + val smelter = + AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) + smelter.currentPower = 0 + assertEquals( + "atlas:auto_smelter", smelter.getVisualStateBlockId() + ) + smelter.currentPower = 2 + assertEquals( + "atlas:auto_smelter", smelter.getVisualStateBlockId() + ) } @Test - fun `auto smelter base block ID is auto_smelter`() { - val smelter = AutoSmelter(TestHelper.createLocation(), BlockFace.SOUTH) - assertEquals("auto_smelter", smelter.baseBlockId) + fun `auto smelter base block ID is atlas auto_smelter`() { + val smelter = + AutoSmelter(TestHelper.createLocation(), BlockFace.SOUTH) + assertEquals("atlas:auto_smelter", smelter.baseBlockId) } @Test fun `auto smelter descriptor has correct properties`() { val desc = AutoSmelter.descriptor - assertEquals("auto_smelter", desc.baseBlockId) + assertEquals("atlas:auto_smelter", desc.baseBlockId) assertEquals("Auto Smelter", desc.displayName) - assertEquals(8, desc.allRegistrableIds.size) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_north")) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_south")) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_east")) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_west")) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_north_on")) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_south_on")) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_east_on")) - assertTrue(desc.allRegistrableIds.contains("auto_smelter_west_on")) } @Test fun `auto smelter descriptor has directional placement`() { val desc = AutoSmelter.descriptor - assertEquals(com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, desc.placementType) - assertEquals(4, desc.directionalVariants.size) - } - - @Test - fun `facingFromBlockId returns correct facing`() { - assertEquals(BlockFace.NORTH, AutoSmelter.facingFromBlockId("auto_smelter_north")) - assertEquals(BlockFace.SOUTH, AutoSmelter.facingFromBlockId("auto_smelter_south")) - assertEquals(BlockFace.EAST, AutoSmelter.facingFromBlockId("auto_smelter_east")) - assertEquals(BlockFace.WEST, AutoSmelter.facingFromBlockId("auto_smelter_west")) - } - - @Test - fun `facingFromBlockId returns correct facing for powered IDs`() { - assertEquals(BlockFace.NORTH, AutoSmelter.facingFromBlockId("auto_smelter_north_on")) - assertEquals(BlockFace.SOUTH, AutoSmelter.facingFromBlockId("auto_smelter_south_on")) - assertEquals(BlockFace.EAST, AutoSmelter.facingFromBlockId("auto_smelter_east_on")) - assertEquals(BlockFace.WEST, AutoSmelter.facingFromBlockId("auto_smelter_west_on")) + assertEquals( + com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, + desc.placementType + ) } @Test - fun `facingFromBlockId returns null for unknown ID`() { - assertNull(AutoSmelter.facingFromBlockId("auto_smelter_up")) - assertNull(AutoSmelter.facingFromBlockId("unknown")) - } - - @Test - fun `all directional IDs are registered`() { + fun `base ID is registered`() { TestHelper.initPowerFactory() - for (id in AutoSmelter.DIRECTIONAL_IDS.values) { - assertTrue(PowerBlockFactory.isRegistered(id), "Missing auto smelter ID: $id") - } + assertTrue( + PowerBlockFactory.isRegistered("atlas:auto_smelter") + ) } @Test - fun `factory creates AutoSmelter from directional ID`() { + fun `factory creates AutoSmelter from base ID`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock("auto_smelter_north", TestHelper.createLocation(), BlockFace.NORTH) + val block = PowerBlockFactory.createPowerBlock( + "atlas:auto_smelter", + TestHelper.createLocation(), + BlockFace.NORTH + ) assertTrue(block is AutoSmelter) assertEquals(BlockFace.NORTH, block!!.facing) } @Test fun `max storage is 2`() { - val smelter = AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) + val smelter = + AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) assertEquals(2, smelter.maxStorage) } @Test fun `power update does not throw with no nearby entities`() { PowerBlockRegistry(TestHelper.mockPlugin) - val smelter = AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) + val smelter = + AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns emptyList() + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns emptyList() assertDoesNotThrow { smelter.callPowerUpdate() @@ -143,15 +121,23 @@ class AutoSmelterTest { @Test fun `power update moves item forward without smelting when no power`() { PowerBlockRegistry(TestHelper.mockPlugin) - val smelter = AutoSmelter(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH) + val smelter = AutoSmelter( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH + ) smelter.currentPower = 0 - val itemLoc = Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) + val itemLoc = + Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) val mockItem = mockk(relaxed = true) every { mockItem.location } returns itemLoc - every { mockItem.teleportAsync(any()) } returns CompletableFuture.completedFuture(true) + every { mockItem.teleportAsync(any()) } returns + CompletableFuture.completedFuture(true) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns listOf(mockItem) + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns listOf(mockItem) smelter.callPowerUpdate() @@ -167,15 +153,23 @@ class AutoSmelterTest { @Test fun `power update moves item east`() { PowerBlockRegistry(TestHelper.mockPlugin) - val smelter = AutoSmelter(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.EAST) + val smelter = AutoSmelter( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.EAST + ) smelter.currentPower = 0 - val itemLoc = Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) + val itemLoc = + Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) val mockItem = mockk(relaxed = true) every { mockItem.location } returns itemLoc - every { mockItem.teleportAsync(any()) } returns CompletableFuture.completedFuture(true) + every { mockItem.teleportAsync(any()) } returns + CompletableFuture.completedFuture(true) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns listOf(mockItem) + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns listOf(mockItem) smelter.callPowerUpdate() @@ -189,22 +183,28 @@ class AutoSmelterTest { } @Test - fun `items still move forward when powered but no smelting recipe available`() { + fun `items still move forward when powered but no smelting recipe`() { PowerBlockRegistry(TestHelper.mockPlugin) - val smelter = AutoSmelter(TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH) + val smelter = AutoSmelter( + TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH + ) smelter.currentPower = 2 - val itemLoc = Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) + val itemLoc = + Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) val mockItem = mockk(relaxed = true) every { mockItem.location } returns itemLoc - every { mockItem.teleportAsync(any()) } returns CompletableFuture.completedFuture(true) - // itemStack getter not mocked, so getSmeltingResult will catch the exception and return null + every { mockItem.teleportAsync(any()) } returns + CompletableFuture.completedFuture(true) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns listOf(mockItem) + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns listOf(mockItem) smelter.callPowerUpdate() - // Item should still be moved forward even without smelting verify { mockItem.teleportAsync( match { loc -> @@ -212,7 +212,6 @@ class AutoSmelterTest { }, ) } - // Power should not be consumed since no recipe was found assertEquals(2, smelter.currentPower) } @@ -221,20 +220,29 @@ class AutoSmelterTest { val registry = PowerBlockRegistry(TestHelper.mockPlugin) val smelterLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val smelter = AutoSmelter(smelterLoc, BlockFace.NORTH) - TestHelper.addToRegistry(registry, smelter, "auto_smelter_north") + TestHelper.addToRegistry( + registry, smelter, "atlas:auto_smelter" + ) - // Place a battery with power adjacent val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery(batteryLoc, BlockFace.WEST) + val battery = com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, BlockFace.WEST + ) battery.currentPower = 5 - TestHelper.addToRegistry(registry, battery, "small_battery") + TestHelper.addToRegistry( + registry, battery, "atlas:small_battery" + ) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns emptyList() + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns emptyList() smelter.callPowerUpdate() - assertTrue(smelter.currentPower > 0, "Smelter should have pulled power") - assertTrue(battery.currentPower < 5, "Battery should have less power") + assertTrue(smelter.currentPower > 0) + assertTrue(battery.currentPower < 5) } @Test @@ -242,19 +250,29 @@ class AutoSmelterTest { val registry = PowerBlockRegistry(TestHelper.mockPlugin) val smelterLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val smelter = AutoSmelter(smelterLoc, BlockFace.NORTH) - smelter.currentPower = 2 // Already full - TestHelper.addToRegistry(registry, smelter, "auto_smelter_north") + smelter.currentPower = 2 + TestHelper.addToRegistry( + registry, smelter, "atlas:auto_smelter" + ) val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery(batteryLoc, BlockFace.WEST) + val battery = com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, BlockFace.WEST + ) battery.currentPower = 5 - TestHelper.addToRegistry(registry, battery, "small_battery") + TestHelper.addToRegistry( + registry, battery, "atlas:small_battery" + ) - every { TestHelper.mockWorld.getNearbyEntities(any(), any(), any(), any()) } returns emptyList() + every { + TestHelper.mockWorld.getNearbyEntities( + any(), any(), any(), any() + ) + } returns emptyList() smelter.callPowerUpdate() - assertEquals(2, smelter.currentPower, "Should not exceed max storage") - assertEquals(5, battery.currentPower, "Battery should not lose power when smelter is full") + assertEquals(2, smelter.currentPower) + assertEquals(5, battery.currentPower) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt index 65e678b..05bf5e8 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt @@ -41,14 +41,20 @@ class CobblestoneFactoryTest { @Test fun `visual state idle when insufficient power`() { val gen = CobblestoneFactory(TestHelper.createLocation()) - assertEquals("cobblestone_factory", gen.getVisualStateBlockId()) + assertEquals( + "atlas:cobblestone_factory", + gen.getVisualStateBlockId() + ) } @Test fun `visual state active when power at cost`() { val gen = CobblestoneFactory(TestHelper.createLocation()) gen.currentPower = 2 - assertEquals("cobblestone_factory_active", gen.getVisualStateBlockId()) + assertEquals( + "atlas:cobblestone_factory_active", + gen.getVisualStateBlockId() + ) } @Test @@ -59,12 +65,16 @@ class CobblestoneFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = CobblestoneFactory(genLoc) gen.currentPower = 2 - TestHelper.addToRegistry(powerRegistry, gen, "cobblestone_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:cobblestone_factory" + ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled_water") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -80,12 +90,16 @@ class CobblestoneFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = CobblestoneFactory(genLoc) gen.currentPower = 2 - TestHelper.addToRegistry(powerRegistry, gen, "cobblestone_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:cobblestone_factory" + ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -101,17 +115,25 @@ class CobblestoneFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = CobblestoneFactory(genLoc) gen.currentPower = 1 - TestHelper.addToRegistry(powerRegistry, gen, "cobblestone_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:cobblestone_factory" + ) - val waterPipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) + val waterPipeLoc = + TestHelper.createLocation(0.0, 64.0, -1.0) val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, waterPipe, "fluid_pipe_south_filled_water") + TestHelper.addToRegistry( + fluidRegistry, waterPipe, "atlas:fluid_pipe" + ) - val lavaPipeLoc = TestHelper.createLocation(0.0, 64.0, 1.0) + val lavaPipeLoc = + TestHelper.createLocation(0.0, 64.0, 1.0) val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, lavaPipe, "fluid_pipe_north_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, lavaPipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -128,22 +150,30 @@ class CobblestoneFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = CobblestoneFactory(genLoc) gen.currentPower = 2 - TestHelper.addToRegistry(powerRegistry, gen, "cobblestone_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:cobblestone_factory" + ) - val waterPipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) + val waterPipeLoc = + TestHelper.createLocation(0.0, 64.0, -1.0) val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, waterPipe, "fluid_pipe_south_filled_water") + TestHelper.addToRegistry( + fluidRegistry, waterPipe, "atlas:fluid_pipe" + ) - val lavaPipeLoc = TestHelper.createLocation(0.0, 64.0, 1.0) + val lavaPipeLoc = + TestHelper.createLocation(0.0, 64.0, 1.0) val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, lavaPipe, "fluid_pipe_north_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, lavaPipe, "atlas:fluid_pipe" + ) try { gen.callPowerUpdate() } catch (_: Throwable) { - // ItemStack constructor triggers Registry init in test environment + // ItemStack constructor triggers Registry init } assertEquals(0, gen.currentPower) @@ -154,11 +184,14 @@ class CobblestoneFactoryTest { @Test fun `descriptor has correct properties`() { val desc = CobblestoneFactory.descriptor - assertEquals("cobblestone_factory", desc.baseBlockId) + assertEquals("atlas:cobblestone_factory", desc.baseBlockId) assertEquals("Cobblestone Factory", desc.displayName) - assertEquals(2, desc.allRegistrableIds.size) - assertTrue(desc.allRegistrableIds.contains("cobblestone_factory")) - assertTrue(desc.allRegistrableIds.contains("cobblestone_factory_active")) + assertEquals(1, desc.additionalBlockIds.size) + assertTrue( + desc.additionalBlockIds.contains( + "atlas:cobblestone_factory_active" + ) + ) } @Test @@ -168,16 +201,21 @@ class CobblestoneFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = CobblestoneFactory(genLoc) - TestHelper.addToRegistry(powerRegistry, gen, "cobblestone_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:cobblestone_factory" + ) val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery(batteryLoc, BlockFace.DOWN) + val battery = com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, BlockFace.DOWN + ) battery.currentPower = 5 - TestHelper.addToRegistry(powerRegistry, battery, "small_battery") + TestHelper.addToRegistry( + powerRegistry, battery, "atlas:small_battery" + ) gen.callPowerUpdate() - // Pulls 1 power per neighbor per tick assertEquals(1, gen.currentPower) assertEquals(4, battery.currentPower) } diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt index 28c174c..9e78064 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt @@ -42,14 +42,19 @@ class ObsidianFactoryTest { fun `visual state idle when insufficient power`() { val gen = ObsidianFactory(TestHelper.createLocation()) gen.currentPower = 99 - assertEquals("obsidian_factory", gen.getVisualStateBlockId()) + assertEquals( + "atlas:obsidian_factory", gen.getVisualStateBlockId() + ) } @Test fun `visual state active when power at cost`() { val gen = ObsidianFactory(TestHelper.createLocation()) gen.currentPower = 100 - assertEquals("obsidian_factory_active", gen.getVisualStateBlockId()) + assertEquals( + "atlas:obsidian_factory_active", + gen.getVisualStateBlockId() + ) } @Test @@ -60,12 +65,16 @@ class ObsidianFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = ObsidianFactory(genLoc) gen.currentPower = 100 - TestHelper.addToRegistry(powerRegistry, gen, "obsidian_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:obsidian_factory" + ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled_water") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -81,12 +90,16 @@ class ObsidianFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = ObsidianFactory(genLoc) gen.currentPower = 100 - TestHelper.addToRegistry(powerRegistry, gen, "obsidian_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:obsidian_factory" + ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, pipe, "fluid_pipe_south_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, pipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -102,17 +115,25 @@ class ObsidianFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = ObsidianFactory(genLoc) gen.currentPower = 99 - TestHelper.addToRegistry(powerRegistry, gen, "obsidian_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:obsidian_factory" + ) - val waterPipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) + val waterPipeLoc = + TestHelper.createLocation(0.0, 64.0, -1.0) val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, waterPipe, "fluid_pipe_south_filled_water") + TestHelper.addToRegistry( + fluidRegistry, waterPipe, "atlas:fluid_pipe" + ) - val lavaPipeLoc = TestHelper.createLocation(0.0, 64.0, 1.0) + val lavaPipeLoc = + TestHelper.createLocation(0.0, 64.0, 1.0) val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, lavaPipe, "fluid_pipe_north_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, lavaPipe, "atlas:fluid_pipe" + ) gen.callPowerUpdate() @@ -129,22 +150,30 @@ class ObsidianFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = ObsidianFactory(genLoc) gen.currentPower = 100 - TestHelper.addToRegistry(powerRegistry, gen, "obsidian_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:obsidian_factory" + ) - val waterPipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) + val waterPipeLoc = + TestHelper.createLocation(0.0, 64.0, -1.0) val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) - TestHelper.addToRegistry(fluidRegistry, waterPipe, "fluid_pipe_south_filled_water") + TestHelper.addToRegistry( + fluidRegistry, waterPipe, "atlas:fluid_pipe" + ) - val lavaPipeLoc = TestHelper.createLocation(0.0, 64.0, 1.0) + val lavaPipeLoc = + TestHelper.createLocation(0.0, 64.0, 1.0) val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) - TestHelper.addToRegistry(fluidRegistry, lavaPipe, "fluid_pipe_north_filled_lava") + TestHelper.addToRegistry( + fluidRegistry, lavaPipe, "atlas:fluid_pipe" + ) try { gen.callPowerUpdate() } catch (_: Throwable) { - // ItemStack constructor triggers Registry init in test environment + // ItemStack constructor triggers Registry init } assertEquals(0, gen.currentPower) @@ -155,11 +184,14 @@ class ObsidianFactoryTest { @Test fun `descriptor has correct properties`() { val desc = ObsidianFactory.descriptor - assertEquals("obsidian_factory", desc.baseBlockId) + assertEquals("atlas:obsidian_factory", desc.baseBlockId) assertEquals("Obsidian Factory", desc.displayName) - assertEquals(2, desc.allRegistrableIds.size) - assertTrue(desc.allRegistrableIds.contains("obsidian_factory")) - assertTrue(desc.allRegistrableIds.contains("obsidian_factory_active")) + assertEquals(1, desc.additionalBlockIds.size) + assertTrue( + desc.additionalBlockIds.contains( + "atlas:obsidian_factory_active" + ) + ) } @Test @@ -169,16 +201,21 @@ class ObsidianFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = ObsidianFactory(genLoc) - TestHelper.addToRegistry(powerRegistry, gen, "obsidian_factory") + TestHelper.addToRegistry( + powerRegistry, gen, "atlas:obsidian_factory" + ) val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery(batteryLoc, BlockFace.DOWN) + val battery = com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, BlockFace.DOWN + ) battery.currentPower = 10 - TestHelper.addToRegistry(powerRegistry, battery, "small_battery") + TestHelper.addToRegistry( + powerRegistry, battery, "atlas:small_battery" + ) gen.callPowerUpdate() - // Should pull power but not yet have enough to generate assertTrue(gen.currentPower > 0) assertTrue(gen.currentPower < 100) } diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/SmallDrillMiningTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/SmallDrillMiningTest.kt index efdf372..c2a04b7 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/SmallDrillMiningTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/SmallDrillMiningTest.kt @@ -146,9 +146,9 @@ class SmallDrillMiningTest { val source2 = SmallSolarPanel(TestHelper.createLocation(-1.0, 64.0, 0.0)) source2.currentPower = 1 - TestHelper.addToRegistry(registry, drill, "small_drill_down") - TestHelper.addToRegistry(registry, source1, "small_solar_panel") - TestHelper.addToRegistry(registry, source2, "small_solar_panel") + TestHelper.addToRegistry(registry, drill, "atlas:small_drill") + TestHelper.addToRegistry(registry, source1, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, source2, "atlas:small_solar_panel") // Mock blocks below so drill doesn't crash during mining scan for (y in 63 downTo -64) { @@ -235,9 +235,9 @@ class SmallDrillMiningTest { val source2 = SmallSolarPanel(TestHelper.createLocation(-1.0, 64.0, 0.0)) source2.currentPower = 1 - TestHelper.addToRegistry(registry, drill, "small_drill_down") - TestHelper.addToRegistry(registry, source1, "small_solar_panel") - TestHelper.addToRegistry(registry, source2, "small_solar_panel") + TestHelper.addToRegistry(registry, drill, "atlas:small_drill") + TestHelper.addToRegistry(registry, source1, "atlas:small_solar_panel") + TestHelper.addToRegistry(registry, source2, "atlas:small_solar_panel") // Mock blocks below - stone at 63 so it mines val stoneBlock = mockBlockAt(0, 63, 0, Material.STONE) From 8ab4b84a369988d42be531b5be9ae9bd2bd55332 Mon Sep 17 00:00:00 2001 From: CoderJoe Date: Sun, 15 Mar 2026 06:26:16 -0500 Subject: [PATCH 2/2] Refactor code for improved readability and consistency in Fluid and Power classes --- .../com/coderjoe/atlas/PlayerJoinListener.kt | 24 ++- .../com/coderjoe/atlas/core/AtlasBlock.kt | 2 +- .../coderjoe/atlas/core/AtlasBlockListener.kt | 22 +- .../coderjoe/atlas/core/CraftEngineHelper.kt | 55 +++-- .../atlas/fluid/block/FluidContainer.kt | 20 +- .../coderjoe/atlas/fluid/block/FluidMerger.kt | 11 +- .../coderjoe/atlas/fluid/block/FluidPipe.kt | 11 +- .../atlas/fluid/FluidBlockInitializerTest.kt | 20 +- .../atlas/fluid/FluidBlockLogicTest.kt | 204 ++++++++++++------ .../atlas/fluid/FluidContainerTest.kt | 179 +++++++++------ .../coderjoe/atlas/fluid/FluidMergerTest.kt | 45 ++-- .../coderjoe/atlas/power/LavaGeneratorTest.kt | 69 ++++-- .../atlas/power/MultiPowerCableTest.kt | 51 +++-- .../atlas/power/PowerBlockInitializerTest.kt | 57 ++--- .../atlas/power/PowerBlockListenerTest.kt | 11 +- .../atlas/power/PowerBlockLogicTest.kt | 57 +++-- .../coderjoe/atlas/power/PowerMergerTest.kt | 57 +++-- .../atlas/transport/ConveyorBeltTest.kt | 54 +++-- .../coderjoe/atlas/utility/AutoSmelterTest.kt | 89 +++++--- .../atlas/utility/CobblestoneFactoryTest.kt | 64 ++++-- .../atlas/utility/ObsidianFactoryTest.kt | 65 ++++-- 21 files changed, 768 insertions(+), 399 deletions(-) diff --git a/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt b/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt index 2750af8..76bfcfd 100644 --- a/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt +++ b/src/main/kotlin/com/coderjoe/atlas/PlayerJoinListener.kt @@ -11,17 +11,21 @@ class PlayerJoinListener : Listener { fun onPlayerJoin(event: PlayerJoinEvent) { val player = event.player val plugin = player.server.pluginManager.getPlugin("Atlas") ?: return - player.server.scheduler.runTaskLater(plugin, Runnable { - val iterator = Bukkit.recipeIterator() - while (iterator.hasNext()) { - val recipe = iterator.next() - if (recipe is Keyed) { - val key = recipe.key - if (key.namespace == "atlas") { - player.discoverRecipe(key) + player.server.scheduler.runTaskLater( + plugin, + Runnable { + val iterator = Bukkit.recipeIterator() + while (iterator.hasNext()) { + val recipe = iterator.next() + if (recipe is Keyed) { + val key = recipe.key + if (key.namespace == "atlas") { + player.discoverRecipe(key) + } } } - } - }, 20L) + }, + 20L, + ) } } diff --git a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt index 522d052..a5c82f6 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlock.kt @@ -42,7 +42,7 @@ abstract class AtlasBlock( currentVisualState = newState } catch (e: Throwable) { plugin.logger.warning( - "Failed to update visual state at ${location.blockX},${location.blockY},${location.blockZ}: ${e.message}" + "Failed to update visual state at ${location.blockX},${location.blockY},${location.blockZ}: ${e.message}", ) } finally { registry.updatingLocations.remove(key) diff --git a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt index eeb29f3..8404bed 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/AtlasBlockListener.kt @@ -49,10 +49,13 @@ class AtlasBlockListener( plugin.server.scheduler.runTask( plugin, Runnable { - val actualFacing = if (CraftEngineHelper.setFacing(location, facing)) facing else { - CraftEngineHelper.setFacing(location, playerFacing) - playerFacing - } + val actualFacing = + if (CraftEngineHelper.setFacing(location, facing)) { + facing + } else { + CraftEngineHelper.setFacing(location, playerFacing) + playerFacing + } createAndRegister(system, descriptor.baseBlockId, location, actualFacing) }, ) @@ -63,10 +66,13 @@ class AtlasBlockListener( plugin.server.scheduler.runTask( plugin, Runnable { - val actualFacing = if (CraftEngineHelper.setFacing(location, facing)) facing else { - CraftEngineHelper.setFacing(location, playerFacing) - playerFacing - } + val actualFacing = + if (CraftEngineHelper.setFacing(location, facing)) { + facing + } else { + CraftEngineHelper.setFacing(location, playerFacing) + playerFacing + } createAndRegister(system, descriptor.baseBlockId, location, actualFacing) }, ) diff --git a/src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt b/src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt index 99311da..85d76fb 100644 --- a/src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt +++ b/src/main/kotlin/com/coderjoe/atlas/core/CraftEngineHelper.kt @@ -7,14 +7,15 @@ import org.bukkit.block.Block import org.bukkit.block.BlockFace object CraftEngineHelper { - private val CE_FACING_TO_BLOCK_FACE = mapOf( - "north" to BlockFace.NORTH, - "south" to BlockFace.SOUTH, - "east" to BlockFace.EAST, - "west" to BlockFace.WEST, - "up" to BlockFace.UP, - "down" to BlockFace.DOWN, - ) + private val CE_FACING_TO_BLOCK_FACE = + mapOf( + "north" to BlockFace.NORTH, + "south" to BlockFace.SOUTH, + "east" to BlockFace.EAST, + "west" to BlockFace.WEST, + "up" to BlockFace.UP, + "down" to BlockFace.DOWN, + ) fun getBlockId(block: Block): String? { return try { @@ -37,7 +38,10 @@ object CraftEngineHelper { } } - fun setFacing(location: Location, facing: BlockFace): Boolean { + fun setFacing( + location: Location, + facing: BlockFace, + ): Boolean { return try { val block = location.block val state = CraftEngineBlocks.getCustomBlockState(block) ?: return false @@ -49,9 +53,10 @@ object CraftEngineHelper { @Suppress("UNCHECKED_CAST") val typedProp = facingProp as Property>> val possibleValues = typedProp.possibleValues() - val targetValue = possibleValues.find { - typedProp.valueName(it) == targetFacing - } ?: return false + val targetValue = + possibleValues.find { + typedProp.valueName(it) == targetFacing + } ?: return false val newState = state.with(typedProp, targetValue) CraftEngineBlocks.place(location, newState, false) } @@ -61,7 +66,11 @@ object CraftEngineHelper { } } - fun setBooleanProperty(location: Location, propertyName: String, value: Boolean) { + fun setBooleanProperty( + location: Location, + propertyName: String, + value: Boolean, + ) { try { val block = location.block val state = CraftEngineBlocks.getCustomBlockState(block) ?: return @@ -79,18 +88,24 @@ object CraftEngineHelper { } } - fun setStringProperty(location: Location, propertyName: String, value: String) { + fun setStringProperty( + location: Location, + propertyName: String, + value: String, + ) { try { val block = location.block val state = CraftEngineBlocks.getCustomBlockState(block) ?: return val customBlock = state.owner().value() val prop = customBlock.getProperty(propertyName) ?: return + @Suppress("UNCHECKED_CAST") val typedProp = prop as Property>> val possibleValues = typedProp.possibleValues() - val targetValue = possibleValues.find { - typedProp.valueName(it) == value - } ?: return + val targetValue = + possibleValues.find { + typedProp.valueName(it) == value + } ?: return val currentValue = state.get(typedProp) if (currentValue != targetValue) { val newState = state.with(typedProp, targetValue) @@ -101,7 +116,11 @@ object CraftEngineHelper { } } - fun setIntProperty(location: Location, propertyName: String, value: Int) { + fun setIntProperty( + location: Location, + propertyName: String, + value: Int, + ) { try { val block = location.block val state = CraftEngineBlocks.getCustomBlockState(block) ?: return diff --git a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt index cc73af5..d777f9e 100644 --- a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt +++ b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidContainer.kt @@ -67,11 +67,12 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid override fun getVisualStateBlockId(): String = BLOCK_ID private fun updateProperties() { - val fluidValue = when (storedFluid) { - FluidType.WATER -> "water" - FluidType.LAVA -> "lava" - FluidType.NONE -> "none" - } + val fluidValue = + when (storedFluid) { + FluidType.WATER -> "water" + FluidType.LAVA -> "lava" + FluidType.NONE -> "none" + } CraftEngineHelper.setStringProperty(location, "fluid", fluidValue) CraftEngineHelper.setIntProperty(location, "fill_level", getFillLevel()) } @@ -84,10 +85,11 @@ class FluidContainer(location: Location, override val facing: BlockFace) : Fluid val registry = FluidBlockRegistry.instance ?: return val behind = facing.oppositeFace - val source = registry.getAdjacentFluidBlock(location, behind) ?: run { - updateProperties() - return - } + val source = + registry.getAdjacentFluidBlock(location, behind) ?: run { + updateProperties() + return + } when (source) { is FluidPump -> { diff --git a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt index 523cf7c..419f6cf 100644 --- a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt +++ b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidMerger.kt @@ -31,11 +31,12 @@ class FluidMerger(location: Location, override val facing: BlockFace) : FluidBlo override fun getVisualStateBlockId(): String = BLOCK_ID private fun updateFluidState() { - val fluidValue = when (storedFluid) { - FluidType.WATER -> "water" - FluidType.LAVA -> "lava" - FluidType.NONE -> "none" - } + val fluidValue = + when (storedFluid) { + FluidType.WATER -> "water" + FluidType.LAVA -> "lava" + FluidType.NONE -> "none" + } CraftEngineHelper.setStringProperty(location, "fluid", fluidValue) } diff --git a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt index a24e52b..a459c99 100644 --- a/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt +++ b/src/main/kotlin/com/coderjoe/atlas/fluid/block/FluidPipe.kt @@ -31,11 +31,12 @@ class FluidPipe(location: Location, override val facing: BlockFace) : FluidBlock override fun getVisualStateBlockId(): String = BLOCK_ID private fun updateFluidState() { - val fluidValue = when (storedFluid) { - FluidType.WATER -> "water" - FluidType.LAVA -> "lava" - FluidType.NONE -> "none" - } + val fluidValue = + when (storedFluid) { + FluidType.WATER -> "water" + FluidType.LAVA -> "lava" + FluidType.NONE -> "none" + } CraftEngineHelper.setStringProperty(location, "fluid", fluidValue) } diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt index b611c33..8bae9fe 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockInitializerTest.kt @@ -51,21 +51,23 @@ class FluidBlockInitializerTest { @Test fun `pump ID creates FluidPump`() { TestHelper.initFluidFactory() - val block = FluidBlockFactory.createFluidBlock( - "atlas:fluid_pump", - TestHelper.createLocation() - ) + val block = + FluidBlockFactory.createFluidBlock( + "atlas:fluid_pump", + TestHelper.createLocation(), + ) assertTrue(block is FluidPump) } @Test fun `pipe ID creates FluidPipe`() { TestHelper.initFluidFactory() - val block = FluidBlockFactory.createFluidBlock( - "atlas:fluid_pipe", - TestHelper.createLocation(), - BlockFace.NORTH - ) + val block = + FluidBlockFactory.createFluidBlock( + "atlas:fluid_pipe", + TestHelper.createLocation(), + BlockFace.NORTH, + ) assertTrue(block is FluidPipe) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt index 7c3e7ff..eef02bf 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidBlockLogicTest.kt @@ -103,7 +103,7 @@ class FluidBlockLogicTest { pump.storeFluid(FluidType.LAVA) assertEquals( "atlas:fluid_pump_active_lava", - pump.getVisualStateBlockId() + pump.getVisualStateBlockId(), ) } @@ -136,15 +136,19 @@ class FluidBlockLogicTest { val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) for (face in listOf( - BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, - BlockFace.WEST, BlockFace.UP, BlockFace.DOWN + BlockFace.NORTH, + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -165,15 +169,18 @@ class FluidBlockLogicTest { } returns cauldronBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -197,15 +204,18 @@ class FluidBlockLogicTest { } returns cauldronBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -213,7 +223,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -234,15 +246,18 @@ class FluidBlockLogicTest { } returns cauldronBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -250,7 +265,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -302,7 +319,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -334,15 +353,18 @@ class FluidBlockLogicTest { } returns cauldronBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -350,7 +372,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -375,15 +399,18 @@ class FluidBlockLogicTest { } returns cauldronBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -391,7 +418,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -411,15 +440,18 @@ class FluidBlockLogicTest { } returns cauldronBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -427,7 +459,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -452,15 +486,18 @@ class FluidBlockLogicTest { } returns waterBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -468,7 +505,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -492,15 +531,18 @@ class FluidBlockLogicTest { } returns lavaBlock for (face in listOf( - BlockFace.SOUTH, BlockFace.EAST, BlockFace.WEST, - BlockFace.UP, BlockFace.DOWN + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction val block = mockk(relaxed = true) every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -508,7 +550,9 @@ class FluidBlockLogicTest { val solar = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) solar.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, solar, "atlas:small_solar_panel" + powerRegistry, + solar, + "atlas:small_solar_panel", ) pump.callFluidUpdate() @@ -529,14 +573,18 @@ class FluidBlockLogicTest { every { levelled.level } returns 3 for (face in listOf( - BlockFace.NORTH, BlockFace.SOUTH, BlockFace.EAST, - BlockFace.WEST, BlockFace.UP, BlockFace.DOWN + BlockFace.NORTH, + BlockFace.SOUTH, + BlockFace.EAST, + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, )) { val offset = face.direction if (face == BlockFace.NORTH) { every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns flowingBlock } else { @@ -544,7 +592,7 @@ class FluidBlockLogicTest { every { block.type } returns Material.AIR every { TestHelper.mockWorld.getBlockAt( - offset.blockX, 64 + offset.blockY, offset.blockZ + offset.blockX, 64 + offset.blockY, offset.blockZ, ) } returns block } @@ -584,9 +632,11 @@ class FluidBlockLogicTest { fun `pipe pulls from FluidPump behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, -1.0)) pump.storeFluid(FluidType.WATER) @@ -596,10 +646,14 @@ class FluidBlockLogicTest { cauldronFaceField.set(pump, BlockFace.NORTH) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) TestHelper.addToRegistry( - fluidRegistry, pump, "atlas:fluid_pump" + fluidRegistry, + pump, + "atlas:fluid_pump", ) pipe.callFluidUpdate() @@ -611,19 +665,27 @@ class FluidBlockLogicTest { fun `pipe pulls from FluidPipe behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val pipe1 = FluidPipe( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) - val pipe2 = FluidPipe( - TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH - ) + val pipe1 = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) + val pipe2 = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), + BlockFace.SOUTH, + ) pipe2.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe1, "atlas:fluid_pipe" + fluidRegistry, + pipe1, + "atlas:fluid_pipe", ) TestHelper.addToRegistry( - fluidRegistry, pipe2, "atlas:fluid_pipe" + fluidRegistry, + pipe2, + "atlas:fluid_pipe", ) pipe1.callFluidUpdate() @@ -635,18 +697,26 @@ class FluidBlockLogicTest { fun `pipe does nothing when source has no fluid`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) - val sourcePipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH - ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) + val sourcePipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), + BlockFace.SOUTH, + ) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) TestHelper.addToRegistry( - fluidRegistry, sourcePipe, "atlas:fluid_pipe" + fluidRegistry, + sourcePipe, + "atlas:fluid_pipe", ) pipe.callFluidUpdate() @@ -657,11 +727,15 @@ class FluidBlockLogicTest { fun `pipe does nothing when no fluid block behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) pipe.callFluidUpdate() diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt index ca8cb3e..1df2472 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidContainerTest.kt @@ -159,8 +159,9 @@ class FluidContainerTest { for (i in 1..3) { container.storeFluid(FluidType.WATER) assertEquals( - 1, container.getFillLevel(), - "Expected 1 at amount $i" + 1, + container.getFillLevel(), + "Expected 1 at amount $i", ) } } @@ -193,7 +194,7 @@ class FluidContainerTest { FluidContainer(TestHelper.createLocation(), BlockFace.NORTH) assertEquals( "atlas:fluid_container", - container.getVisualStateBlockId() + container.getVisualStateBlockId(), ) } @@ -204,7 +205,7 @@ class FluidContainerTest { container.storeFluid(FluidType.WATER) assertEquals( "atlas:fluid_container", - container.getVisualStateBlockId() + container.getVisualStateBlockId(), ) } @@ -216,7 +217,7 @@ class FluidContainerTest { container.removeFluid() assertEquals( "atlas:fluid_container", - container.getVisualStateBlockId() + container.getVisualStateBlockId(), ) } @@ -226,19 +227,27 @@ class FluidContainerTest { fun `container pulls from pipe behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH - ) + val container = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), + BlockFace.SOUTH, + ) pipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) container.callFluidUpdate() @@ -251,9 +260,11 @@ class FluidContainerTest { fun `container pulls from pump behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH - ) + val container = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 1.0), + BlockFace.SOUTH, + ) val pump = FluidPump(TestHelper.createLocation(0.0, 64.0, 0.0)) pump.storeFluid(FluidType.WATER) @@ -263,10 +274,14 @@ class FluidContainerTest { cauldronField.set(pump, BlockFace.NORTH) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) TestHelper.addToRegistry( - fluidRegistry, pump, "atlas:fluid_pump" + fluidRegistry, + pump, + "atlas:fluid_pump", ) container.callFluidUpdate() @@ -278,20 +293,28 @@ class FluidContainerTest { fun `container pulls from another container behind it`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container1 = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) + val container1 = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) container1.storeFluid(FluidType.LAVA) - val container2 = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH - ) + val container2 = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 1.0), + BlockFace.SOUTH, + ) TestHelper.addToRegistry( - fluidRegistry, container1, "atlas:fluid_container" + fluidRegistry, + container1, + "atlas:fluid_container", ) TestHelper.addToRegistry( - fluidRegistry, container2, "atlas:fluid_container" + fluidRegistry, + container2, + "atlas:fluid_container", ) container2.callFluidUpdate() @@ -304,23 +327,31 @@ class FluidContainerTest { fun `container does not pull when full`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) + val container = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) repeat(FluidContainer.MAX_CAPACITY) { container.storeFluid(FluidType.WATER) } - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH - ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), + BlockFace.SOUTH, + ) pipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) container.callFluidUpdate() @@ -331,21 +362,29 @@ class FluidContainerTest { fun `container rejects mismatched fluid from pipe`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) + val container = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) container.storeFluid(FluidType.WATER) - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.SOUTH - ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, -1.0), + BlockFace.SOUTH, + ) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) container.callFluidUpdate() @@ -359,20 +398,28 @@ class FluidContainerTest { fun `pipe pulls from container front face`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) + val container = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) container.storeFluid(FluidType.WATER) - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH - ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, 1.0), + BlockFace.SOUTH, + ) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) pipe.callFluidUpdate() @@ -384,20 +431,28 @@ class FluidContainerTest { fun `pipe cannot pull from container non-front face`() { val fluidRegistry = FluidBlockRegistry(TestHelper.mockPlugin) - val container = FluidContainer( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH - ) + val container = + FluidContainer( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.NORTH, + ) container.storeFluid(FluidType.WATER) - val pipe = FluidPipe( - TestHelper.createLocation(0.0, 64.0, 1.0), BlockFace.SOUTH - ) + val pipe = + FluidPipe( + TestHelper.createLocation(0.0, 64.0, 1.0), + BlockFace.SOUTH, + ) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) pipe.callFluidUpdate() @@ -430,9 +485,11 @@ class FluidContainerTest { FluidContainer(TestHelper.createLocation(), BlockFace.EAST) repeat(5) { container.storeFluid(FluidType.WATER) } - val data = FluidBlockData.fromFluidBlock( - container, "atlas:fluid_container" - ) + val data = + FluidBlockData.fromFluidBlock( + container, + "atlas:fluid_container", + ) assertEquals("EAST", data.facing) assertEquals(5, data.storedAmount) assertEquals("WATER", data.fluidType) diff --git a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt index 9c1de68..0da9bc0 100644 --- a/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/fluid/FluidMergerTest.kt @@ -31,7 +31,8 @@ class FluidMergerTest { val merger = FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) assertEquals( - "atlas:fluid_merger", merger.getVisualStateBlockId() + "atlas:fluid_merger", + merger.getVisualStateBlockId(), ) } @@ -41,7 +42,8 @@ class FluidMergerTest { FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) merger.storeFluid(FluidType.WATER) assertEquals( - "atlas:fluid_merger", merger.getVisualStateBlockId() + "atlas:fluid_merger", + merger.getVisualStateBlockId(), ) } @@ -51,7 +53,8 @@ class FluidMergerTest { FluidMerger(TestHelper.createLocation(), BlockFace.NORTH) merger.storeFluid(FluidType.LAVA) assertEquals( - "atlas:fluid_merger", merger.getVisualStateBlockId() + "atlas:fluid_merger", + merger.getVisualStateBlockId(), ) } @@ -60,7 +63,9 @@ class FluidMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) TestHelper.addToRegistry( - registry, merger, "atlas:fluid_merger" + registry, + merger, + "atlas:fluid_merger", ) // Pipe to the south (not facing direction) @@ -68,7 +73,9 @@ class FluidMergerTest { val pipe = FluidPipe(pipeLoc, BlockFace.NORTH) pipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - registry, pipe, "atlas:fluid_pipe" + registry, + pipe, + "atlas:fluid_pipe", ) merger.callFluidUpdate() @@ -83,7 +90,9 @@ class FluidMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) TestHelper.addToRegistry( - registry, merger, "atlas:fluid_merger" + registry, + merger, + "atlas:fluid_merger", ) // Pipe to the north (facing direction) @@ -91,7 +100,9 @@ class FluidMergerTest { val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - registry, pipe, "atlas:fluid_pipe" + registry, + pipe, + "atlas:fluid_pipe", ) merger.callFluidUpdate() @@ -106,14 +117,18 @@ class FluidMergerTest { val merger = FluidMerger(mergerLoc, BlockFace.NORTH) merger.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - registry, merger, "atlas:fluid_merger" + registry, + merger, + "atlas:fluid_merger", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val pipe = FluidPipe(pipeLoc, BlockFace.NORTH) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - registry, pipe, "atlas:fluid_pipe" + registry, + pipe, + "atlas:fluid_pipe", ) merger.callFluidUpdate() @@ -127,14 +142,18 @@ class FluidMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = FluidMerger(mergerLoc, BlockFace.NORTH) TestHelper.addToRegistry( - registry, merger, "atlas:fluid_merger" + registry, + merger, + "atlas:fluid_merger", ) val pipeLoc = TestHelper.createLocation(1.0, 64.0, 0.0) val pipe = FluidPipe(pipeLoc, BlockFace.WEST) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - registry, pipe, "atlas:fluid_pipe" + registry, + pipe, + "atlas:fluid_pipe", ) merger.callFluidUpdate() @@ -150,7 +169,9 @@ class FluidMergerTest { val merger = FluidMerger(mergerLoc, BlockFace.NORTH) merger.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - registry, merger, "atlas:fluid_merger" + registry, + merger, + "atlas:fluid_merger", ) assertTrue(merger.hasFluid()) diff --git a/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt index 4893124..140ffa7 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/LavaGeneratorTest.kt @@ -42,7 +42,8 @@ class LavaGeneratorTest { fun `lava generator visual state idle when no power`() { val gen = LavaGenerator(TestHelper.createLocation()) assertEquals( - "atlas:lava_generator", gen.getVisualStateBlockId() + "atlas:lava_generator", + gen.getVisualStateBlockId(), ) } @@ -52,7 +53,7 @@ class LavaGeneratorTest { gen.currentPower = 5 assertEquals( "atlas:lava_generator_active", - gen.getVisualStateBlockId() + gen.getVisualStateBlockId(), ) } @@ -64,14 +65,18 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) TestHelper.addToRegistry( - powerRegistry, gen, "atlas:lava_generator" + powerRegistry, + gen, + "atlas:lava_generator", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -88,14 +93,18 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) TestHelper.addToRegistry( - powerRegistry, gen, "atlas:lava_generator" + powerRegistry, + gen, + "atlas:lava_generator", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -112,14 +121,18 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) TestHelper.addToRegistry( - powerRegistry, gen, "atlas:lava_generator" + powerRegistry, + gen, + "atlas:lava_generator", ) val containerLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val container = FluidContainer(containerLoc, BlockFace.NORTH) container.restoreState(FluidType.LAVA, 3) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) gen.callPowerUpdate() @@ -136,14 +149,18 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) TestHelper.addToRegistry( - powerRegistry, gen, "atlas:lava_generator" + powerRegistry, + gen, + "atlas:lava_generator", ) val containerLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val container = FluidContainer(containerLoc, BlockFace.SOUTH) container.restoreState(FluidType.LAVA, 3) TestHelper.addToRegistry( - fluidRegistry, container, "atlas:fluid_container" + fluidRegistry, + container, + "atlas:fluid_container", ) gen.callPowerUpdate() @@ -161,14 +178,18 @@ class LavaGeneratorTest { val gen = LavaGenerator(genLoc) gen.currentPower = 48 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:lava_generator" + powerRegistry, + gen, + "atlas:lava_generator", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -185,21 +206,27 @@ class LavaGeneratorTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = LavaGenerator(genLoc) TestHelper.addToRegistry( - powerRegistry, gen, "atlas:lava_generator" + powerRegistry, + gen, + "atlas:lava_generator", ) val pipe1Loc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe1 = FluidPipe(pipe1Loc, BlockFace.SOUTH) pipe1.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe1, "atlas:fluid_pipe" + fluidRegistry, + pipe1, + "atlas:fluid_pipe", ) val pipe2Loc = TestHelper.createLocation(0.0, 64.0, 1.0) val pipe2 = FluidPipe(pipe2Loc, BlockFace.NORTH) pipe2.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe2, "atlas:fluid_pipe" + fluidRegistry, + pipe2, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -230,14 +257,18 @@ class LavaGeneratorTest { val gen = LavaGenerator(genLoc) gen.currentPower = 50 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:lava_generator" + powerRegistry, + gen, + "atlas:lava_generator", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -254,8 +285,8 @@ class LavaGeneratorTest { assertEquals(1, desc.additionalBlockIds.size) assertTrue( desc.additionalBlockIds.contains( - "atlas:lava_generator_active" - ) + "atlas:lava_generator_active", + ), ) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt index 9a754f2..3928ec3 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/MultiPowerCableTest.kt @@ -37,12 +37,12 @@ class MultiPowerCableTest { cable.currentPower = 0 assertEquals( "atlas:multi_power_cable", - cable.getVisualStateBlockId() + cable.getVisualStateBlockId(), ) cable.currentPower = 5 assertEquals( "atlas:multi_power_cable", - cable.getVisualStateBlockId() + cable.getVisualStateBlockId(), ) } @@ -65,7 +65,7 @@ class MultiPowerCableTest { val desc = MultiPowerCable.descriptor assertEquals( com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, - desc.placementType + desc.placementType, ) } @@ -73,18 +73,19 @@ class MultiPowerCableTest { fun `base ID is registered`() { TestHelper.initPowerFactory() assertTrue( - PowerBlockFactory.isRegistered("atlas:multi_power_cable") + PowerBlockFactory.isRegistered("atlas:multi_power_cable"), ) } @Test fun `factory creates MultiPowerCable from base ID`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock( - "atlas:multi_power_cable", - TestHelper.createLocation(), - BlockFace.NORTH - ) + val block = + PowerBlockFactory.createPowerBlock( + "atlas:multi_power_cable", + TestHelper.createLocation(), + BlockFace.NORTH, + ) assertTrue(block is MultiPowerCable) assertEquals(BlockFace.NORTH, block!!.facing) } @@ -102,14 +103,18 @@ class MultiPowerCableTest { val cableLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val cable = MultiPowerCable(cableLoc, BlockFace.NORTH) TestHelper.addToRegistry( - registry, cable, "atlas:multi_power_cable" + registry, + cable, + "atlas:multi_power_cable", ) val batteryLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val battery = SmallBattery(batteryLoc, BlockFace.NORTH) battery.currentPower = 5 TestHelper.addToRegistry( - registry, battery, "atlas:small_battery" + registry, + battery, + "atlas:small_battery", ) cable.callPowerUpdate() @@ -125,21 +130,27 @@ class MultiPowerCableTest { val cable = MultiPowerCable(cableLoc, BlockFace.NORTH) cable.currentPower = 5 TestHelper.addToRegistry( - registry, cable, "atlas:multi_power_cable" + registry, + cable, + "atlas:multi_power_cable", ) val eastBatteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) val eastBattery = SmallBattery(eastBatteryLoc, BlockFace.WEST) TestHelper.addToRegistry( - registry, eastBattery, "atlas:small_battery" + registry, + eastBattery, + "atlas:small_battery", ) val westBatteryLoc = TestHelper.createLocation(-1.0, 64.0, 0.0) val westBattery = SmallBattery(westBatteryLoc, BlockFace.EAST) TestHelper.addToRegistry( - registry, westBattery, "atlas:small_battery" + registry, + westBattery, + "atlas:small_battery", ) val northBatteryLoc = @@ -147,7 +158,9 @@ class MultiPowerCableTest { val northBattery = SmallBattery(northBatteryLoc, BlockFace.SOUTH) TestHelper.addToRegistry( - registry, northBattery, "atlas:small_battery" + registry, + northBattery, + "atlas:small_battery", ) cable.callPowerUpdate() @@ -165,14 +178,18 @@ class MultiPowerCableTest { val cable = MultiPowerCable(cableLoc, BlockFace.NORTH) cable.currentPower = 10 TestHelper.addToRegistry( - registry, cable, "atlas:multi_power_cable" + registry, + cable, + "atlas:multi_power_cable", ) val batteryLoc = TestHelper.createLocation(0.0, 64.0, 1.0) val battery = SmallBattery(batteryLoc, BlockFace.NORTH) battery.currentPower = 5 TestHelper.addToRegistry( - registry, battery, "atlas:small_battery" + registry, + battery, + "atlas:small_battery", ) cable.callPowerUpdate() diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt index 3c40562..b73d2d4 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt @@ -46,7 +46,7 @@ class PowerBlockInitializerTest { fun `solar panel ID is registered`() { TestHelper.initPowerFactory() assertTrue( - PowerBlockFactory.isRegistered("atlas:small_solar_panel") + PowerBlockFactory.isRegistered("atlas:small_solar_panel"), ) } @@ -54,7 +54,7 @@ class PowerBlockInitializerTest { fun `drill base ID is registered`() { TestHelper.initPowerFactory() assertTrue( - PowerBlockFactory.isRegistered("atlas:small_drill") + PowerBlockFactory.isRegistered("atlas:small_drill"), ) } @@ -62,18 +62,18 @@ class PowerBlockInitializerTest { fun `battery base and variant IDs are registered`() { TestHelper.initPowerFactory() assertTrue( - PowerBlockFactory.isRegistered("atlas:small_battery") + PowerBlockFactory.isRegistered("atlas:small_battery"), ) assertTrue( - PowerBlockFactory.isRegistered("atlas:small_battery_low") + PowerBlockFactory.isRegistered("atlas:small_battery_low"), ) assertTrue( PowerBlockFactory.isRegistered( - "atlas:small_battery_medium" - ) + "atlas:small_battery_medium", + ), ) assertTrue( - PowerBlockFactory.isRegistered("atlas:small_battery_full") + PowerBlockFactory.isRegistered("atlas:small_battery_full"), ) } @@ -81,49 +81,54 @@ class PowerBlockInitializerTest { fun `cable base ID is registered`() { TestHelper.initPowerFactory() assertTrue( - PowerBlockFactory.isRegistered("atlas:power_cable") + PowerBlockFactory.isRegistered("atlas:power_cable"), ) } @Test fun `solar panel ID creates SmallSolarPanel`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock( - "atlas:small_solar_panel", TestHelper.createLocation() - ) + val block = + PowerBlockFactory.createPowerBlock( + "atlas:small_solar_panel", + TestHelper.createLocation(), + ) assertTrue(block is SmallSolarPanel) } @Test fun `drill ID creates SmallDrill`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock( - "atlas:small_drill", - TestHelper.createLocation(), - BlockFace.NORTH - ) + val block = + PowerBlockFactory.createPowerBlock( + "atlas:small_drill", + TestHelper.createLocation(), + BlockFace.NORTH, + ) assertTrue(block is SmallDrill) } @Test fun `battery ID creates SmallBattery`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock( - "atlas:small_battery", - TestHelper.createLocation(), - BlockFace.DOWN - ) + val block = + PowerBlockFactory.createPowerBlock( + "atlas:small_battery", + TestHelper.createLocation(), + BlockFace.DOWN, + ) assertTrue(block is SmallBattery) } @Test fun `cable ID creates PowerCable`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock( - "atlas:power_cable", - TestHelper.createLocation(), - BlockFace.NORTH - ) + val block = + PowerBlockFactory.createPowerBlock( + "atlas:power_cable", + TestHelper.createLocation(), + BlockFace.NORTH, + ) assertTrue(block is PowerCable) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt index f06e103..fa2f530 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockListenerTest.kt @@ -77,7 +77,9 @@ class PowerBlockListenerTest { val loc = TestHelper.createLocation() val panel = SmallSolarPanel(loc) TestHelper.addToRegistry( - registry, panel, "atlas:small_solar_panel" + registry, + panel, + "atlas:small_solar_panel", ) val block = mockk(relaxed = true) @@ -131,9 +133,10 @@ class PowerBlockListenerTest { val player = mockk(relaxed = true) every { player.isSneaking } returns false val block = mockk(relaxed = true) - every { block.location } returns TestHelper.createLocation( - 99.0, 99.0, 99.0 - ) + every { block.location } returns + TestHelper.createLocation( + 99.0, 99.0, 99.0, + ) val event = mockk(relaxed = true) every { event.action } returns Action.RIGHT_CLICK_BLOCK diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt index c664794..6aa89fe 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockLogicTest.kt @@ -140,7 +140,7 @@ class PowerBlockLogicTest { val panel = SmallSolarPanel(TestHelper.createLocation()) assertEquals( "atlas:small_solar_panel", - panel.getVisualStateBlockId() + panel.getVisualStateBlockId(), ) } @@ -150,7 +150,7 @@ class PowerBlockLogicTest { panel.currentPower = 1 assertEquals( "atlas:small_solar_panel_full", - panel.getVisualStateBlockId() + panel.getVisualStateBlockId(), ) } @@ -201,7 +201,7 @@ class PowerBlockLogicTest { SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) assertEquals( "atlas:small_battery", - battery.getVisualStateBlockId() + battery.getVisualStateBlockId(), ) } @@ -214,7 +214,7 @@ class PowerBlockLogicTest { assertEquals( "atlas:small_battery_low", battery.getVisualStateBlockId(), - "Failed for power=$p" + "Failed for power=$p", ) } } @@ -228,7 +228,7 @@ class PowerBlockLogicTest { assertEquals( "atlas:small_battery_medium", battery.getVisualStateBlockId(), - "Failed for power=$p" + "Failed for power=$p", ) } } @@ -242,7 +242,7 @@ class PowerBlockLogicTest { assertEquals( "atlas:small_battery_full", battery.getVisualStateBlockId(), - "Failed for power=$p" + "Failed for power=$p", ) } } @@ -258,10 +258,14 @@ class PowerBlockLogicTest { source.currentPower = 1 TestHelper.addToRegistry( - registry, battery, "atlas:small_battery" + registry, + battery, + "atlas:small_battery", ) TestHelper.addToRegistry( - registry, source, "atlas:small_solar_panel" + registry, + source, + "atlas:small_solar_panel", ) battery.callPowerUpdate() @@ -294,11 +298,13 @@ class PowerBlockLogicTest { val cable = PowerCable(TestHelper.createLocation(), BlockFace.NORTH) assertEquals( - "atlas:power_cable", cable.getVisualStateBlockId() + "atlas:power_cable", + cable.getVisualStateBlockId(), ) cable.currentPower = 1 assertEquals( - "atlas:power_cable", cable.getVisualStateBlockId() + "atlas:power_cable", + cable.getVisualStateBlockId(), ) } @@ -313,10 +319,14 @@ class PowerBlockLogicTest { source.currentPower = 1 TestHelper.addToRegistry( - registry, cable, "atlas:power_cable" + registry, + cable, + "atlas:power_cable", ) TestHelper.addToRegistry( - registry, source, "atlas:small_solar_panel" + registry, + source, + "atlas:small_solar_panel", ) cable.callPowerUpdate() @@ -335,10 +345,14 @@ class PowerBlockLogicTest { source.currentPower = 1 TestHelper.addToRegistry( - registry, cable, "atlas:power_cable" + registry, + cable, + "atlas:power_cable", ) TestHelper.addToRegistry( - registry, source, "atlas:small_solar_panel" + registry, + source, + "atlas:small_solar_panel", ) cable.callPowerUpdate() @@ -382,7 +396,8 @@ class PowerBlockLogicTest { val drill = SmallDrill(TestHelper.createLocation(), BlockFace.NORTH) assertEquals( - "atlas:small_drill", drill.getVisualStateBlockId() + "atlas:small_drill", + drill.getVisualStateBlockId(), ) } @@ -460,10 +475,14 @@ class PowerBlockLogicTest { source.currentPower = 0 TestHelper.addToRegistry( - registry, battery, "atlas:small_battery" + registry, + battery, + "atlas:small_battery", ) TestHelper.addToRegistry( - registry, source, "atlas:small_solar_panel" + registry, + source, + "atlas:small_solar_panel", ) battery.callPowerUpdate() @@ -476,7 +495,9 @@ class PowerBlockLogicTest { val battery = SmallBattery(TestHelper.createLocation(), BlockFace.NORTH) TestHelper.addToRegistry( - registry, battery, "atlas:small_battery" + registry, + battery, + "atlas:small_battery", ) battery.callPowerUpdate() diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt index 96fd8dd..85df9f7 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerMergerTest.kt @@ -45,11 +45,13 @@ class PowerMergerTest { val merger = PowerMerger(TestHelper.createLocation(), BlockFace.NORTH) assertEquals( - "atlas:power_merger", merger.getVisualStateBlockId() + "atlas:power_merger", + merger.getVisualStateBlockId(), ) merger.currentPower = 1 assertEquals( - "atlas:power_merger", merger.getVisualStateBlockId() + "atlas:power_merger", + merger.getVisualStateBlockId(), ) } @@ -58,21 +60,27 @@ class PowerMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = PowerMerger(mergerLoc, BlockFace.NORTH) TestHelper.addToRegistry( - registry, merger, "atlas:power_merger" + registry, + merger, + "atlas:power_merger", ) val source1 = SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 1.0)) source1.currentPower = 1 TestHelper.addToRegistry( - registry, source1, "atlas:small_solar_panel" + registry, + source1, + "atlas:small_solar_panel", ) val source2 = SmallSolarPanel(TestHelper.createLocation(1.0, 64.0, 0.0)) source2.currentPower = 1 TestHelper.addToRegistry( - registry, source2, "atlas:small_solar_panel" + registry, + source2, + "atlas:small_solar_panel", ) merger.callPowerUpdate() @@ -87,15 +95,20 @@ class PowerMergerTest { val mergerLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val merger = PowerMerger(mergerLoc, BlockFace.NORTH) TestHelper.addToRegistry( - registry, merger, "atlas:power_merger" + registry, + merger, + "atlas:power_merger", ) - val source = SmallSolarPanel( - TestHelper.createLocation(0.0, 64.0, -1.0) - ) + val source = + SmallSolarPanel( + TestHelper.createLocation(0.0, 64.0, -1.0), + ) source.currentPower = 1 TestHelper.addToRegistry( - registry, source, "atlas:small_solar_panel" + registry, + source, + "atlas:small_solar_panel", ) merger.callPowerUpdate() @@ -110,14 +123,18 @@ class PowerMergerTest { val merger = PowerMerger(mergerLoc, BlockFace.NORTH) merger.currentPower = 2 TestHelper.addToRegistry( - registry, merger, "atlas:power_merger" + registry, + merger, + "atlas:power_merger", ) val source = SmallSolarPanel(TestHelper.createLocation(0.0, 64.0, 1.0)) source.currentPower = 1 TestHelper.addToRegistry( - registry, source, "atlas:small_solar_panel" + registry, + source, + "atlas:small_solar_panel", ) merger.callPowerUpdate() @@ -139,14 +156,20 @@ class PowerMergerTest { val merger = PowerMerger(mergerLoc, BlockFace.NORTH) merger.currentPower = 2 TestHelper.addToRegistry( - registry, merger, "atlas:power_merger" + registry, + merger, + "atlas:power_merger", ) - val consumer = com.coderjoe.atlas.utility.block.SmallDrill( - TestHelper.createLocation(0.0, 64.0, -1.0), BlockFace.DOWN - ) + val consumer = + com.coderjoe.atlas.utility.block.SmallDrill( + TestHelper.createLocation(0.0, 64.0, -1.0), + BlockFace.DOWN, + ) TestHelper.addToRegistry( - registry, consumer, "atlas:small_drill" + registry, + consumer, + "atlas:small_drill", ) assertTrue(merger.hasPower()) diff --git a/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt b/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt index 1e55d7c..a9dfef8 100644 --- a/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/transport/ConveyorBeltTest.kt @@ -40,7 +40,8 @@ class ConveyorBeltTest { val belt = ConveyorBelt(TestHelper.createLocation(), BlockFace.NORTH) assertEquals( - "atlas:conveyor_belt", belt.getVisualStateBlockId() + "atlas:conveyor_belt", + belt.getVisualStateBlockId(), ) } @@ -63,7 +64,7 @@ class ConveyorBeltTest { val desc = ConveyorBelt.descriptor assertEquals( com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, - desc.placementType + desc.placementType, ) } @@ -71,18 +72,19 @@ class ConveyorBeltTest { fun `base ID is registered`() { TestHelper.initTransportFactory() assertTrue( - TransportBlockFactory.isRegistered("atlas:conveyor_belt") + TransportBlockFactory.isRegistered("atlas:conveyor_belt"), ) } @Test fun `factory creates ConveyorBelt from base ID`() { TestHelper.initTransportFactory() - val block = TransportBlockFactory.createTransportBlock( - "atlas:conveyor_belt", - TestHelper.createLocation(), - BlockFace.NORTH - ) + val block = + TransportBlockFactory.createTransportBlock( + "atlas:conveyor_belt", + TestHelper.createLocation(), + BlockFace.NORTH, + ) assertTrue(block is ConveyorBelt) assertEquals(BlockFace.NORTH, block!!.facing) } @@ -95,7 +97,7 @@ class ConveyorBeltTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns emptyList() @@ -107,9 +109,11 @@ class ConveyorBeltTest { @Test fun `transport update moves item north`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH - ) + val belt = + ConveyorBelt( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.NORTH, + ) val itemLoc = Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) @@ -120,7 +124,7 @@ class ConveyorBeltTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns listOf(mockItem) @@ -138,9 +142,11 @@ class ConveyorBeltTest { @Test fun `transport update moves item east`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.EAST - ) + val belt = + ConveyorBelt( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.EAST, + ) val itemLoc = Location(TestHelper.mockWorld, 0.5, 64.375, 0.5) @@ -151,7 +157,7 @@ class ConveyorBeltTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns listOf(mockItem) @@ -169,9 +175,11 @@ class ConveyorBeltTest { @Test fun `transport update moves multiple items`() { TransportBlockRegistry(TestHelper.mockPlugin) - val belt = ConveyorBelt( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.SOUTH - ) + val belt = + ConveyorBelt( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.SOUTH, + ) val item1 = mockk(relaxed = true) val item2 = mockk(relaxed = true) @@ -186,7 +194,7 @@ class ConveyorBeltTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns listOf(item1, item2) @@ -206,7 +214,7 @@ class ConveyorBeltTest { mockk(relaxed = true) every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns listOf(mockPlayer) @@ -218,7 +226,7 @@ class ConveyorBeltTest { @Test fun `descriptor description mentions direction`() { assertTrue( - ConveyorBelt.descriptor.description.contains("forward") + ConveyorBelt.descriptor.description.contains("forward"), ) } } diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt index f3e2ca4..c81fbed 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/AutoSmelterTest.kt @@ -43,11 +43,13 @@ class AutoSmelterTest { AutoSmelter(TestHelper.createLocation(), BlockFace.NORTH) smelter.currentPower = 0 assertEquals( - "atlas:auto_smelter", smelter.getVisualStateBlockId() + "atlas:auto_smelter", + smelter.getVisualStateBlockId(), ) smelter.currentPower = 2 assertEquals( - "atlas:auto_smelter", smelter.getVisualStateBlockId() + "atlas:auto_smelter", + smelter.getVisualStateBlockId(), ) } @@ -70,7 +72,7 @@ class AutoSmelterTest { val desc = AutoSmelter.descriptor assertEquals( com.coderjoe.atlas.core.PlacementType.DIRECTIONAL, - desc.placementType + desc.placementType, ) } @@ -78,18 +80,19 @@ class AutoSmelterTest { fun `base ID is registered`() { TestHelper.initPowerFactory() assertTrue( - PowerBlockFactory.isRegistered("atlas:auto_smelter") + PowerBlockFactory.isRegistered("atlas:auto_smelter"), ) } @Test fun `factory creates AutoSmelter from base ID`() { TestHelper.initPowerFactory() - val block = PowerBlockFactory.createPowerBlock( - "atlas:auto_smelter", - TestHelper.createLocation(), - BlockFace.NORTH - ) + val block = + PowerBlockFactory.createPowerBlock( + "atlas:auto_smelter", + TestHelper.createLocation(), + BlockFace.NORTH, + ) assertTrue(block is AutoSmelter) assertEquals(BlockFace.NORTH, block!!.facing) } @@ -109,7 +112,7 @@ class AutoSmelterTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns emptyList() @@ -121,9 +124,11 @@ class AutoSmelterTest { @Test fun `power update moves item forward without smelting when no power`() { PowerBlockRegistry(TestHelper.mockPlugin) - val smelter = AutoSmelter( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH - ) + val smelter = + AutoSmelter( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.NORTH, + ) smelter.currentPower = 0 val itemLoc = @@ -135,7 +140,7 @@ class AutoSmelterTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns listOf(mockItem) @@ -153,9 +158,11 @@ class AutoSmelterTest { @Test fun `power update moves item east`() { PowerBlockRegistry(TestHelper.mockPlugin) - val smelter = AutoSmelter( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.EAST - ) + val smelter = + AutoSmelter( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.EAST, + ) smelter.currentPower = 0 val itemLoc = @@ -167,7 +174,7 @@ class AutoSmelterTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns listOf(mockItem) @@ -185,9 +192,11 @@ class AutoSmelterTest { @Test fun `items still move forward when powered but no smelting recipe`() { PowerBlockRegistry(TestHelper.mockPlugin) - val smelter = AutoSmelter( - TestHelper.createLocation(0.0, 64.0, 0.0), BlockFace.NORTH - ) + val smelter = + AutoSmelter( + TestHelper.createLocation(0.0, 64.0, 0.0), + BlockFace.NORTH, + ) smelter.currentPower = 2 val itemLoc = @@ -199,7 +208,7 @@ class AutoSmelterTest { every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns listOf(mockItem) @@ -221,21 +230,27 @@ class AutoSmelterTest { val smelterLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val smelter = AutoSmelter(smelterLoc, BlockFace.NORTH) TestHelper.addToRegistry( - registry, smelter, "atlas:auto_smelter" + registry, + smelter, + "atlas:auto_smelter", ) val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery( - batteryLoc, BlockFace.WEST - ) + val battery = + com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, + BlockFace.WEST, + ) battery.currentPower = 5 TestHelper.addToRegistry( - registry, battery, "atlas:small_battery" + registry, + battery, + "atlas:small_battery", ) every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns emptyList() @@ -252,21 +267,27 @@ class AutoSmelterTest { val smelter = AutoSmelter(smelterLoc, BlockFace.NORTH) smelter.currentPower = 2 TestHelper.addToRegistry( - registry, smelter, "atlas:auto_smelter" + registry, + smelter, + "atlas:auto_smelter", ) val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery( - batteryLoc, BlockFace.WEST - ) + val battery = + com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, + BlockFace.WEST, + ) battery.currentPower = 5 TestHelper.addToRegistry( - registry, battery, "atlas:small_battery" + registry, + battery, + "atlas:small_battery", ) every { TestHelper.mockWorld.getNearbyEntities( - any(), any(), any(), any() + any(), any(), any(), any(), ) } returns emptyList() diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt index 05bf5e8..07db75e 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt @@ -43,7 +43,7 @@ class CobblestoneFactoryTest { val gen = CobblestoneFactory(TestHelper.createLocation()) assertEquals( "atlas:cobblestone_factory", - gen.getVisualStateBlockId() + gen.getVisualStateBlockId(), ) } @@ -53,7 +53,7 @@ class CobblestoneFactoryTest { gen.currentPower = 2 assertEquals( "atlas:cobblestone_factory_active", - gen.getVisualStateBlockId() + gen.getVisualStateBlockId(), ) } @@ -66,14 +66,18 @@ class CobblestoneFactoryTest { val gen = CobblestoneFactory(genLoc) gen.currentPower = 2 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:cobblestone_factory" + powerRegistry, + gen, + "atlas:cobblestone_factory", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -91,14 +95,18 @@ class CobblestoneFactoryTest { val gen = CobblestoneFactory(genLoc) gen.currentPower = 2 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:cobblestone_factory" + powerRegistry, + gen, + "atlas:cobblestone_factory", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -116,7 +124,9 @@ class CobblestoneFactoryTest { val gen = CobblestoneFactory(genLoc) gen.currentPower = 1 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:cobblestone_factory" + powerRegistry, + gen, + "atlas:cobblestone_factory", ) val waterPipeLoc = @@ -124,7 +134,9 @@ class CobblestoneFactoryTest { val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, waterPipe, "atlas:fluid_pipe" + fluidRegistry, + waterPipe, + "atlas:fluid_pipe", ) val lavaPipeLoc = @@ -132,7 +144,9 @@ class CobblestoneFactoryTest { val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, lavaPipe, "atlas:fluid_pipe" + fluidRegistry, + lavaPipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -151,7 +165,9 @@ class CobblestoneFactoryTest { val gen = CobblestoneFactory(genLoc) gen.currentPower = 2 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:cobblestone_factory" + powerRegistry, + gen, + "atlas:cobblestone_factory", ) val waterPipeLoc = @@ -159,7 +175,9 @@ class CobblestoneFactoryTest { val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, waterPipe, "atlas:fluid_pipe" + fluidRegistry, + waterPipe, + "atlas:fluid_pipe", ) val lavaPipeLoc = @@ -167,7 +185,9 @@ class CobblestoneFactoryTest { val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, lavaPipe, "atlas:fluid_pipe" + fluidRegistry, + lavaPipe, + "atlas:fluid_pipe", ) try { @@ -189,8 +209,8 @@ class CobblestoneFactoryTest { assertEquals(1, desc.additionalBlockIds.size) assertTrue( desc.additionalBlockIds.contains( - "atlas:cobblestone_factory_active" - ) + "atlas:cobblestone_factory_active", + ), ) } @@ -202,16 +222,22 @@ class CobblestoneFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = CobblestoneFactory(genLoc) TestHelper.addToRegistry( - powerRegistry, gen, "atlas:cobblestone_factory" + powerRegistry, + gen, + "atlas:cobblestone_factory", ) val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery( - batteryLoc, BlockFace.DOWN - ) + val battery = + com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, + BlockFace.DOWN, + ) battery.currentPower = 5 TestHelper.addToRegistry( - powerRegistry, battery, "atlas:small_battery" + powerRegistry, + battery, + "atlas:small_battery", ) gen.callPowerUpdate() diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt index 9e78064..cfb2af6 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt @@ -43,7 +43,8 @@ class ObsidianFactoryTest { val gen = ObsidianFactory(TestHelper.createLocation()) gen.currentPower = 99 assertEquals( - "atlas:obsidian_factory", gen.getVisualStateBlockId() + "atlas:obsidian_factory", + gen.getVisualStateBlockId(), ) } @@ -53,7 +54,7 @@ class ObsidianFactoryTest { gen.currentPower = 100 assertEquals( "atlas:obsidian_factory_active", - gen.getVisualStateBlockId() + gen.getVisualStateBlockId(), ) } @@ -66,14 +67,18 @@ class ObsidianFactoryTest { val gen = ObsidianFactory(genLoc) gen.currentPower = 100 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:obsidian_factory" + powerRegistry, + gen, + "atlas:obsidian_factory", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -91,14 +96,18 @@ class ObsidianFactoryTest { val gen = ObsidianFactory(genLoc) gen.currentPower = 100 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:obsidian_factory" + powerRegistry, + gen, + "atlas:obsidian_factory", ) val pipeLoc = TestHelper.createLocation(0.0, 64.0, -1.0) val pipe = FluidPipe(pipeLoc, BlockFace.SOUTH) pipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, pipe, "atlas:fluid_pipe" + fluidRegistry, + pipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -116,7 +125,9 @@ class ObsidianFactoryTest { val gen = ObsidianFactory(genLoc) gen.currentPower = 99 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:obsidian_factory" + powerRegistry, + gen, + "atlas:obsidian_factory", ) val waterPipeLoc = @@ -124,7 +135,9 @@ class ObsidianFactoryTest { val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, waterPipe, "atlas:fluid_pipe" + fluidRegistry, + waterPipe, + "atlas:fluid_pipe", ) val lavaPipeLoc = @@ -132,7 +145,9 @@ class ObsidianFactoryTest { val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, lavaPipe, "atlas:fluid_pipe" + fluidRegistry, + lavaPipe, + "atlas:fluid_pipe", ) gen.callPowerUpdate() @@ -151,7 +166,9 @@ class ObsidianFactoryTest { val gen = ObsidianFactory(genLoc) gen.currentPower = 100 TestHelper.addToRegistry( - powerRegistry, gen, "atlas:obsidian_factory" + powerRegistry, + gen, + "atlas:obsidian_factory", ) val waterPipeLoc = @@ -159,7 +176,9 @@ class ObsidianFactoryTest { val waterPipe = FluidPipe(waterPipeLoc, BlockFace.SOUTH) waterPipe.storeFluid(FluidType.WATER) TestHelper.addToRegistry( - fluidRegistry, waterPipe, "atlas:fluid_pipe" + fluidRegistry, + waterPipe, + "atlas:fluid_pipe", ) val lavaPipeLoc = @@ -167,7 +186,9 @@ class ObsidianFactoryTest { val lavaPipe = FluidPipe(lavaPipeLoc, BlockFace.NORTH) lavaPipe.storeFluid(FluidType.LAVA) TestHelper.addToRegistry( - fluidRegistry, lavaPipe, "atlas:fluid_pipe" + fluidRegistry, + lavaPipe, + "atlas:fluid_pipe", ) try { @@ -189,8 +210,8 @@ class ObsidianFactoryTest { assertEquals(1, desc.additionalBlockIds.size) assertTrue( desc.additionalBlockIds.contains( - "atlas:obsidian_factory_active" - ) + "atlas:obsidian_factory_active", + ), ) } @@ -202,16 +223,22 @@ class ObsidianFactoryTest { val genLoc = TestHelper.createLocation(0.0, 64.0, 0.0) val gen = ObsidianFactory(genLoc) TestHelper.addToRegistry( - powerRegistry, gen, "atlas:obsidian_factory" + powerRegistry, + gen, + "atlas:obsidian_factory", ) val batteryLoc = TestHelper.createLocation(1.0, 64.0, 0.0) - val battery = com.coderjoe.atlas.power.block.SmallBattery( - batteryLoc, BlockFace.DOWN - ) + val battery = + com.coderjoe.atlas.power.block.SmallBattery( + batteryLoc, + BlockFace.DOWN, + ) battery.currentPower = 10 TestHelper.addToRegistry( - powerRegistry, battery, "atlas:small_battery" + powerRegistry, + battery, + "atlas:small_battery", ) gen.callPowerUpdate()