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 9430fc1..d23f4aa 100644 --- a/src/main/kotlin/com/coderjoe/atlas/utility/block/CobblestoneFactory.kt +++ b/src/main/kotlin/com/coderjoe/atlas/utility/block/CobblestoneFactory.kt @@ -8,7 +8,6 @@ import org.bukkit.Material class CobblestoneFactory(location: Location) : MaterialFactory(location, maxStorage = 4) { companion object { const val BLOCK_ID = "atlas:cobblestone_factory" - const val BLOCK_ID_ACTIVE = "atlas:cobblestone_factory_active" const val POWER_COST = 2 val descriptor = @@ -17,13 +16,19 @@ class CobblestoneFactory(location: Location) : MaterialFactory(location, maxStor displayName = "Cobblestone Factory", description = "Machine - consumes $POWER_COST power + water + lava → cobblestone", placementType = PlacementType.SIMPLE, - additionalBlockIds = listOf(BLOCK_ID_ACTIVE), constructor = { loc, _ -> CobblestoneFactory(loc) }, ) } override val baseBlockId: String = BLOCK_ID - override val activeBlockId: String = BLOCK_ID_ACTIVE + override val activeBlockId: String = BLOCK_ID override val powerCost: Int = POWER_COST override val outputMaterial: Material = Material.COBBLESTONE + + override fun getVisualStateBlockId(): String = BLOCK_ID + + override fun powerUpdate() { + super.powerUpdate() + updatePoweredState() + } } 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 f8ad140..783445f 100644 --- a/src/main/kotlin/com/coderjoe/atlas/utility/block/ObsidianFactory.kt +++ b/src/main/kotlin/com/coderjoe/atlas/utility/block/ObsidianFactory.kt @@ -8,7 +8,6 @@ import org.bukkit.Material class ObsidianFactory(location: Location) : MaterialFactory(location, maxStorage = 50) { companion object { const val BLOCK_ID = "atlas:obsidian_factory" - const val BLOCK_ID_ACTIVE = "atlas:obsidian_factory_active" const val POWER_COST = 25 val descriptor = @@ -17,13 +16,19 @@ class ObsidianFactory(location: Location) : MaterialFactory(location, maxStorage displayName = "Obsidian Factory", description = "Machine - consumes $POWER_COST power + water + lava → obsidian", placementType = PlacementType.SIMPLE, - additionalBlockIds = listOf(BLOCK_ID_ACTIVE), constructor = { loc, _ -> ObsidianFactory(loc) }, ) } override val baseBlockId: String = BLOCK_ID - override val activeBlockId: String = BLOCK_ID_ACTIVE + override val activeBlockId: String = BLOCK_ID override val powerCost: Int = POWER_COST override val outputMaterial: Material = Material.OBSIDIAN + + override fun getVisualStateBlockId(): String = BLOCK_ID + + override fun powerUpdate() { + super.powerUpdate() + updatePoweredState() + } } diff --git a/src/main/resources/atlas/configuration/cobblestone_factory.yml b/src/main/resources/atlas/configuration/cobblestone_factory.yml index b70170d..1d85a36 100644 --- a/src/main/resources/atlas/configuration/cobblestone_factory.yml +++ b/src/main/resources/atlas/configuration/cobblestone_factory.yml @@ -12,8 +12,10 @@ items: settings: hardness: 4.0 resistance: 4.0 - is-suffocating: true + is-suffocating: false + is-view-blocking: false is-redstone-conductor: false + can-occlude: false push-reaction: push_only tags: ["minecraft:mineable/pickaxe"] sounds: @@ -22,55 +24,43 @@ items: 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 + states: + properties: + powered: + type: boolean + default: false + appearances: + idle: + auto-state: leaves + model: + path: minecraft:block/custom/cobblestone_factory + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/cobblestone_factory_idle_north + south: minecraft:block/custom/cobblestone_factory_idle_south + east: minecraft:block/custom/cobblestone_factory_idle_east + west: minecraft:block/custom/cobblestone_factory_idle_west + up: minecraft:block/custom/cobblestone_factory_idle_up + down: minecraft:block/custom/cobblestone_factory_idle_down + active: + auto-state: leaves + model: + path: minecraft:block/custom/cobblestone_factory_active + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/cobblestone_factory_active_north + south: minecraft:block/custom/cobblestone_factory_active_south + east: minecraft:block/custom/cobblestone_factory_active_east + west: minecraft:block/custom/cobblestone_factory_active_west + up: minecraft:block/custom/cobblestone_factory_active_up + down: minecraft:block/custom/cobblestone_factory_active_down + variants: + powered=false: + appearance: idle + powered=true: + appearance: active recipes: atlas:cobblestone_factory: diff --git a/src/main/resources/atlas/configuration/obsidian_factory.yml b/src/main/resources/atlas/configuration/obsidian_factory.yml index 9fc233e..26371f9 100644 --- a/src/main/resources/atlas/configuration/obsidian_factory.yml +++ b/src/main/resources/atlas/configuration/obsidian_factory.yml @@ -12,8 +12,10 @@ items: settings: hardness: 4.0 resistance: 4.0 - is-suffocating: true + is-suffocating: false + is-view-blocking: false is-redstone-conductor: false + can-occlude: false push-reaction: push_only tags: ["minecraft:mineable/pickaxe"] sounds: @@ -22,55 +24,43 @@ items: 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 + states: + properties: + powered: + type: boolean + default: false + appearances: + idle: + auto-state: leaves + model: + path: minecraft:block/custom/obsidian_factory + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/obsidian_factory_idle_north + south: minecraft:block/custom/obsidian_factory_idle_south + east: minecraft:block/custom/obsidian_factory_idle_east + west: minecraft:block/custom/obsidian_factory_idle_west + up: minecraft:block/custom/obsidian_factory_idle_up + down: minecraft:block/custom/obsidian_factory_idle_down + active: + auto-state: leaves + model: + path: minecraft:block/custom/obsidian_factory_active + generation: + parent: minecraft:block/cube + textures: + north: minecraft:block/custom/obsidian_factory_active_north + south: minecraft:block/custom/obsidian_factory_active_south + east: minecraft:block/custom/obsidian_factory_active_east + west: minecraft:block/custom/obsidian_factory_active_west + up: minecraft:block/custom/obsidian_factory_active_up + down: minecraft:block/custom/obsidian_factory_active_down + variants: + powered=false: + appearance: idle + powered=true: + appearance: active recipes: atlas:obsidian_factory: diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_down.png new file mode 100644 index 0000000..de5cd86 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_down.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_east.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_east.png new file mode 100644 index 0000000..50dab6b Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_east.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_north.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_north.png new file mode 100644 index 0000000..7864a9c Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_north.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_south.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_south.png new file mode 100644 index 0000000..ba2159d Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_south.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_up.png new file mode 100644 index 0000000..a36c281 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_up.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_west.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_west.png new file mode 100644 index 0000000..34672b0 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_active_west.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_bottom.png deleted file mode 100644 index d8d8ef8..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_bottom.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_down.png new file mode 100644 index 0000000..f710ba0 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_down.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_east.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_east.png new file mode 100644 index 0000000..fb3b773 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_east.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_north.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_north.png new file mode 100644 index 0000000..524bf85 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_north.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_south.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_south.png new file mode 100644 index 0000000..686a3ac Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_south.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_up.png new file mode 100644 index 0000000..1dfb090 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_up.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_west.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_west.png new file mode 100644 index 0000000..ac72971 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_idle_west.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_preview.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_preview.png new file mode 100644 index 0000000..9727922 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_preview.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side.png deleted file mode 100644 index 008f191..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side_active.png deleted file mode 100644 index cd80297..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_side_active.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top.png deleted file mode 100644 index 663f266..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top_active.png deleted file mode 100644 index 2d848cc..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/cobblestone_factory_top_active.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_down.png new file mode 100644 index 0000000..32177b3 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_down.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_east.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_east.png new file mode 100644 index 0000000..891e187 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_east.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_north.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_north.png new file mode 100644 index 0000000..13c3165 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_north.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_south.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_south.png new file mode 100644 index 0000000..85933e3 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_south.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_up.png new file mode 100644 index 0000000..e7ab3b3 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_up.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_west.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_west.png new file mode 100644 index 0000000..f292cda Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_active_west.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_bottom.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_bottom.png deleted file mode 100644 index 3d8ccca..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_bottom.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_down.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_down.png new file mode 100644 index 0000000..5c57947 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_down.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_east.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_east.png new file mode 100644 index 0000000..b3b789d Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_east.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_north.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_north.png new file mode 100644 index 0000000..ca56be7 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_north.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_south.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_south.png new file mode 100644 index 0000000..85f405f Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_south.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_up.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_up.png new file mode 100644 index 0000000..0fdbc3a Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_up.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_west.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_west.png new file mode 100644 index 0000000..0a87b96 Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_idle_west.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_preview.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_preview.png new file mode 100644 index 0000000..c30883b Binary files /dev/null and b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_preview.png differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side.png deleted file mode 100644 index a7ccf2d..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side_active.png deleted file mode 100644 index 687b8e7..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_side_active.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top.png deleted file mode 100644 index f0772b8..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top.png and /dev/null differ diff --git a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top_active.png b/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top_active.png deleted file mode 100644 index a8941d8..0000000 Binary files a/src/main/resources/atlas/resourcepack/assets/minecraft/textures/block/custom/obsidian_factory_top_active.png and /dev/null differ diff --git a/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt b/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt index 0d06dd2..c6a5bb5 100644 --- a/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/AtlasPluginTest.kt @@ -32,9 +32,9 @@ class AtlasPluginTest { } @Test - fun `power system initializes with 21 block types`() { + fun `power system initializes with 19 block types`() { TestHelper.initPowerFactory() - assertEquals(21, PowerBlockFactory.getRegisteredBlockIds().size) + assertEquals(19, PowerBlockFactory.getRegisteredBlockIds().size) } @Test diff --git a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt index fe2464e..c0ca2a3 100644 --- a/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/power/PowerBlockInitializerTest.kt @@ -35,14 +35,14 @@ class PowerBlockInitializerTest { // LavaGenerator: 2 (base + active) // AutoSmelter: 1 // PowerSplitter: 1 - // CobblestoneFactory: 2 (base + active) - // ObsidianFactory: 2 (base + active) + // CobblestoneFactory: 1 + // ObsidianFactory: 1 // Crusher: 1 // PowerMerger: 1 // SoftTouchDrill: 1 // ExperienceExtractor: 2 (base + active) - // Total: 21 - assertEquals(21, ids.size) + // Total: 19 + assertEquals(19, ids.size) } @Test diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt index f592f73..6460525 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/CobblestoneFactoryTest.kt @@ -39,20 +39,15 @@ class CobblestoneFactoryTest { } @Test - fun `visual state idle when insufficient power`() { + fun `visual state always returns base block id`() { val gen = CobblestoneFactory(TestHelper.createLocation()) assertEquals( "atlas:cobblestone_factory", gen.getVisualStateBlockId(), ) - } - - @Test - fun `visual state active when power at cost`() { - val gen = CobblestoneFactory(TestHelper.createLocation()) gen.currentPower = 2 assertEquals( - "atlas:cobblestone_factory_active", + "atlas:cobblestone_factory", gen.getVisualStateBlockId(), ) } @@ -206,12 +201,7 @@ class CobblestoneFactoryTest { val desc = CobblestoneFactory.descriptor assertEquals("atlas:cobblestone_factory", desc.baseBlockId) assertEquals("Cobblestone Factory", desc.displayName) - assertEquals(1, desc.additionalBlockIds.size) - assertTrue( - desc.additionalBlockIds.contains( - "atlas:cobblestone_factory_active", - ), - ) + assertTrue(desc.additionalBlockIds.isEmpty()) } @Test diff --git a/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt b/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt index 9bd26e9..cfdc5e5 100644 --- a/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt +++ b/src/test/kotlin/com/coderjoe/atlas/utility/ObsidianFactoryTest.kt @@ -39,21 +39,15 @@ class ObsidianFactoryTest { } @Test - fun `visual state idle when insufficient power`() { + fun `visual state always returns base block id`() { val gen = ObsidianFactory(TestHelper.createLocation()) - gen.currentPower = 24 assertEquals( "atlas:obsidian_factory", gen.getVisualStateBlockId(), ) - } - - @Test - fun `visual state active when power at cost`() { - val gen = ObsidianFactory(TestHelper.createLocation()) gen.currentPower = 25 assertEquals( - "atlas:obsidian_factory_active", + "atlas:obsidian_factory", gen.getVisualStateBlockId(), ) } @@ -207,12 +201,7 @@ class ObsidianFactoryTest { val desc = ObsidianFactory.descriptor assertEquals("atlas:obsidian_factory", desc.baseBlockId) assertEquals("Obsidian Factory", desc.displayName) - assertEquals(1, desc.additionalBlockIds.size) - assertTrue( - desc.additionalBlockIds.contains( - "atlas:obsidian_factory_active", - ), - ) + assertTrue(desc.additionalBlockIds.isEmpty()) } @Test