diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/InfiniteWaterSourceBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/InfiniteWaterSourceBlock.kt index 3af1efab2..e213743bf 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/InfiniteWaterSourceBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/InfiniteWaterSourceBlock.kt @@ -20,6 +20,7 @@ import net.minecraft.world.phys.shapes.CollisionContext import net.minecraft.world.phys.shapes.VoxelShape import net.neoforged.neoforge.fluids.FluidUtil import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock +import ru.dbotthepony.mc.otm.block.addSimpleDescription import ru.dbotthepony.mc.otm.block.entity.decorative.InfiniteWaterSourceBlockEntity import ru.dbotthepony.mc.otm.block.getShapeForEachState import ru.dbotthepony.mc.otm.core.get @@ -39,6 +40,10 @@ class InfiniteWaterSourceBlock : RotatableMatteryBlock( return InfiniteWaterSourceBlockEntity(p_153215_, p_153216_) } + init { + addSimpleDescription() + } + override fun useItemOn( p_316304_: ItemStack, p_316362_: BlockState, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReconstructorBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReconstructorBlockEntity.kt index 21a5ded53..7e48c0a1c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReconstructorBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterReconstructorBlockEntity.kt @@ -223,13 +223,14 @@ class MatterReconstructorBlockEntity(blockPos: BlockPos, blockState: BlockState) val matterPerTick = matterPerTick * (1.0 + upgrades.speedBonus) val energyConsumption = MachinesConfig.MatterReconstructor.VALUES.energyConsumption * (1.0 + upgrades.speedBonus) * (upgrades.energyConsumed + Decimal.ONE) - if (!item.isEmpty && matterPerTick.isPositive && thisProgressPerTick > 0.0 && item.isRepairable && item.isDamaged) { + if (!item.isEmpty && matterPerTick.isPositive && thisProgressPerTick > 0.0 && item.isRepairable && item.isDamaged && item.maxDamage > 0) { var progressPerTick = (repairProgress + thisProgressPerTick).coerceAtMost(item.damageValue.toDouble()) - repairProgress if (progressPerTick <= 0.0) return if (energyConsumption.isPositive) { if (!energy.batteryLevel.isPositive) return val multEnergy = energyConsumption * (progressPerTick / thisProgressPerTick) + if (!multEnergy.isPositive) return progressPerTick *= (energy.extractEnergy(multEnergy, true) / multEnergy).toDouble() if (progressPerTick <= 0.0) { diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/android_station_working.json b/src/main/resources/assets/overdrive_that_matters/models/block/android_station_working.json index 6ddc62d23..20dafea29 100644 --- a/src/main/resources/assets/overdrive_that_matters/models/block/android_station_working.json +++ b/src/main/resources/assets/overdrive_that_matters/models/block/android_station_working.json @@ -1,4 +1,5 @@ { + "credit": "Made with Blockbench", "parent": "block/cube_all", "render_type": "translucent", "texture_size": [16, 32], @@ -34,7 +35,7 @@ "up": {"uv": [8, 0, 16, 4], "texture": "#1"}, "down": {"uv": [8, 4.5, 16, 8.5], "texture": "#1"} }, - "neoforge_data": { "block_light": 15, "sky_light": 15 } + "neoforge_data": { "block_light": 15, "sky_light": 15 } }, { "name": "base", @@ -72,7 +73,7 @@ "up": {"uv": [9, 5, 15, 8], "texture": "#1"}, "down": {"uv": [9, 5, 15, 8], "texture": "#1"} }, - "neoforge_data": { "block_light": 15, "sky_light": 15 } + "neoforge_data": { "block_light": 15, "sky_light": 15 } }, { "name": "frame", @@ -122,11 +123,12 @@ "name": "hologram", "from": [-1, 10, -1], "to": [17, 10, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, "faces": { "up": {"uv": [0, 9.5, 8, 13.5], "texture": "#1"}, "down": {"uv": [0, 9.5, 8, 13.5], "texture": "#1"} }, - "neoforge_data": { "block_light": 15, "sky_light": 15 } + "neoforge_data": { "block_light": 15, "sky_light": 15 } }, { "name": "hologram", @@ -135,28 +137,6 @@ "faces": { "up": {"uv": [11, 11, 13, 12], "texture": "#1"}, "down": {"uv": [11, 11, 13, 12], "texture": "#1"} - }, - "neoforge_data": { "block_light": 15, "sky_light": 15 } - }, - { - "name": "holotext", - "from": [1, 10.5, 3], - "to": [8, 14.5, 3], - "rotation": {"angle": 22.5, "axis": "x", "origin": [5.5, 13.5, 1]}, - "faces": { - "north": {"uv": [2.5, 7.25, 5.5, 8.25], "texture": "#1"}, - "south": {"uv": [5.5, 7.25, 2.5, 8.25], "texture": "#1"} - }, - "neoforge_data": { "block_light": 15, "sky_light": 15 } - }, - { - "name": "holotext", - "from": [8, 5.1, 12], - "to": [15, 9.1, 12], - "rotation": {"angle": -22.5, "axis": "x", "origin": [5.5, 13.5, 1]}, - "faces": { - "north": {"uv": [5.5, 7.25, 2.5, 8.25], "texture": "#1"}, - "south": {"uv": [2.5, 7.25, 5.5, 8.25], "texture": "#1"} } } ], diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/holo_sign.json b/src/main/resources/assets/overdrive_that_matters/models/block/holo_sign.json index 5acde94e0..dd5f331be 100644 --- a/src/main/resources/assets/overdrive_that_matters/models/block/holo_sign.json +++ b/src/main/resources/assets/overdrive_that_matters/models/block/holo_sign.json @@ -4,6 +4,7 @@ "render_type": "cutout", "textures": { "0": "overdrive_that_matters:block/holo_sign", + "1": "overdrive_that_matters:block/machine_base", "particle": "overdrive_that_matters:block/holo_sign" }, "elements": [ @@ -11,113 +12,121 @@ "name": "body", "from": [0, 0, 14], "to": [16, 16, 16], - "faces": { - "north": {"uv": [0, 0, 8, 8], "texture": "#0"}, - "east": {"uv": [0, 11.5, 8, 12.5], "rotation": 270, "texture": "#0"}, - "south": {"uv": [0, 0, 8, 8], "texture": "#0"}, - "west": {"uv": [0, 11.5, 8, 12.5], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 11.5, 8, 12.5], "rotation": 180, "texture": "#0"}, - "down": {"uv": [0, 11.5, 8, 12.5], "texture": "#0"} - } - }, - { - "name": "body", - "from": [1, 1, 13], - "to": [15, 15, 14], - "faces": { - "north": {"uv": [0, 0, 7, 7], "texture": "#missing"}, - "east": {"uv": [0, 11, 7, 11.5], "rotation": 90, "texture": "#0"}, - "south": {"uv": [0, 0, 7, 7], "texture": "#missing"}, - "west": {"uv": [0, 11, 7, 11.5], "rotation": 90, "texture": "#0"}, - "up": {"uv": [0, 11, 7, 11.5], "texture": "#0"}, - "down": {"uv": [0, 11, 7, 11.5], "texture": "#0"} - } - }, - { - "name": "body", - "from": [0, 0, 10], - "to": [16, 16, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 3]}, "faces": { "north": {"uv": [8, 0, 16, 8], "texture": "#0"}, - "east": {"uv": [0, 9.5, 8, 11], "rotation": 90, "texture": "#0"}, - "south": {"uv": [0, 0, 8, 8], "texture": "#0"}, - "west": {"uv": [0, 9.5, 8, 11], "rotation": 270, "texture": "#0"}, - "up": {"uv": [0, 8, 8, 9.5], "texture": "#0"}, - "down": {"uv": [0, 8, 8, 9.5], "rotation": 180, "texture": "#0"} + "east": {"uv": [0, 8.5, 8, 9.5], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 8.5, 8, 9.5], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 8.5, 8, 9.5], "texture": "#0"}, + "down": {"uv": [0, 8.5, 8, 9.5], "rotation": 180, "texture": "#0"} + } + }, + { + "name": "light", + "from": [13, 13, 13.99], + "to": [14, 14, 13.99], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, -1, 4]}, + "faces": { + "north": {"uv": [9, 9, 9.5, 9.5], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} + } + }, + { + "name": "light", + "from": [2, 13, 13.99], + "to": [3, 14, 13.99], + "rotation": {"angle": 0, "axis": "y", "origin": [1, -1, 4]}, + "faces": { + "north": {"uv": [14.5, 9, 15, 9.5], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} + } + }, + { + "name": "light", + "from": [2, 2, 13.99], + "to": [3, 3, 13.99], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 1, 4]}, + "faces": { + "north": {"uv": [14.5, 14.5, 15, 15], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} + } + }, + { + "name": "light", + "from": [13, 2, 13.99], + "to": [14, 3, 13.99], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 1, 4]}, + "faces": { + "north": {"uv": [9, 14.5, 9.5, 15], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} } }, { "name": "body", - "from": [14, 5, 9], - "to": [16, 11, 10], + "from": [0, 0, 14], + "to": [16, 16, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 13]}, "faces": { - "north": {"uv": [0.5, 12.5, 1.5, 15.5], "texture": "#0"}, - "east": {"uv": [0, 12.5, 0.5, 15.5], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "west": {"uv": [1.5, 12.5, 2, 15.5], "texture": "#0"}, - "up": {"uv": [1.5, 16, 0.5, 15.5], "texture": "#0"}, - "down": {"uv": [1.5, 15.5, 0.5, 16], "texture": "#0"} + "east": {"uv": [0, 8.5, 8, 9], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 8.5, 8, 9], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 8.5, 8, 9], "texture": "#0"}, + "down": {"uv": [0, 8.5, 8, 9], "rotation": 180, "texture": "#0"} } }, { "name": "body", - "from": [0, 5, 9], - "to": [2, 11, 10], + "from": [0, 0, 13], + "to": [16, 16, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 12]}, "faces": { - "north": {"uv": [1.5, 12.5, 0.5, 15.5], "texture": "#0"}, - "east": {"uv": [1.5, 12.5, 2, 15.5], "texture": "#0"}, - "south": {"uv": [0, 0, 1, 3], "texture": "#missing"}, - "west": {"uv": [0, 12.5, 0.5, 15.5], "texture": "#0"}, - "up": {"uv": [0.5, 15.5, 1.5, 16], "texture": "#0"}, - "down": {"uv": [0.5, 15.5, 1.5, 16], "texture": "#0"} + "north": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "east": {"uv": [0, 8, 8, 8.5], "rotation": 90, "texture": "#0"}, + "west": {"uv": [0, 8, 8, 8.5], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 8, 8, 8.5], "texture": "#0"}, + "down": {"uv": [0, 8, 8, 8.5], "rotation": 180, "texture": "#0"} + } + }, + { + "name": "body", + "from": [5, 0.5, 13.2], + "to": [11, 1.5, 14.2], + "rotation": {"angle": 0, "axis": "y", "origin": [5, -0.5, 12.2]}, + "faces": { + "north": {"uv": [1, 12.5, 1.5, 15.5], "rotation": 270, "texture": "#0"}, + "east": {"uv": [1, 15.5, 1.5, 16], "rotation": 270, "texture": "#0"}, + "west": {"uv": [1, 15.5, 1.5, 16], "rotation": 270, "texture": "#0"}, + "up": {"uv": [1.5, 12.5, 2, 15.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 12.5, 0.5, 15.5], "rotation": 90, "texture": "#0"} + } + }, + { + "name": "body", + "from": [5, 14.5, 13.2], + "to": [11, 15.5, 14.2], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 13.5, 12.2]}, + "faces": { + "north": {"uv": [1, 12.5, 1.5, 15.5], "rotation": 270, "texture": "#0"}, + "east": {"uv": [1, 15.5, 1.5, 16], "rotation": 270, "texture": "#0"}, + "west": {"uv": [1, 15.5, 1.5, 16], "rotation": 270, "texture": "#0"}, + "up": {"uv": [0, 12.5, 0.5, 15.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [1.5, 12.5, 2, 15.5], "rotation": 90, "texture": "#0"} } }, { "name": "light", - "from": [14, 14, 9.99], - "to": [15, 15, 9.99], + "from": [6, 1.5, 13.2], + "to": [10, 1.5, 14.2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 1, 12.2]}, "faces": { - "north": {"uv": [8.5, 8.5, 9, 9], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} + "up": {"uv": [2, 13, 2.5, 15], "rotation": 90, "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0}, + "down": {"uv": [2, 13, 2.5, 15], "rotation": 90, "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} } }, { "name": "light", - "from": [1, 14, 9.99], - "to": [2, 15, 9.99], + "from": [6, 14.5, 13.2], + "to": [10, 14.5, 14.2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 12.2]}, "faces": { - "north": {"uv": [15, 8.5, 15.5, 9], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} - } - }, - { - "name": "light", - "from": [1, 1, 9.99], - "to": [2, 2, 9.99], - "faces": { - "north": {"uv": [15, 15, 15.5, 15.5], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} - } - }, - { - "name": "light", - "from": [14, 1, 9.99], - "to": [15, 2, 9.99], - "faces": { - "north": {"uv": [8.5, 15, 9, 15.5], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} - } - }, - { - "name": "light", - "from": [2.01, 6, 9], - "to": [2.01, 10, 10], - "faces": { - "east": {"uv": [1.5, 13, 2, 15], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} - } - }, - { - "name": "light", - "from": [13.99, 6, 9], - "to": [13.99, 10, 10], - "faces": { - "west": {"uv": [1.5, 13, 2, 15], "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} + "up": {"uv": [2, 13, 2.5, 15], "rotation": 90, "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0}, + "down": {"uv": [2, 13, 2.5, 15], "rotation": 90, "texture": "#0", "neoforge_data": {"block_light": 15}, "tintindex": 0} } } ], diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/android_station_em.png b/src/main/resources/assets/overdrive_that_matters/textures/block/android_station_em.png index 253476d7d..a66442afa 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/block/android_station_em.png and b/src/main/resources/assets/overdrive_that_matters/textures/block/android_station_em.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/android_station_em.png.mcmeta b/src/main/resources/assets/overdrive_that_matters/textures/block/android_station_em.png.mcmeta deleted file mode 100644 index fa950acdd..000000000 --- a/src/main/resources/assets/overdrive_that_matters/textures/block/android_station_em.png.mcmeta +++ /dev/null @@ -1,7 +0,0 @@ -{ - "animation": { - "frametime": 16, - "width": 32, - "height": 64 - } -} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/essence_storage.png b/src/main/resources/assets/overdrive_that_matters/textures/block/essence_storage.png index 9f24286ed..6bc5edd13 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/block/essence_storage.png and b/src/main/resources/assets/overdrive_that_matters/textures/block/essence_storage.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/holo_sign.png b/src/main/resources/assets/overdrive_that_matters/textures/block/holo_sign.png index b75f9512e..b4bd00661 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/block/holo_sign.png and b/src/main/resources/assets/overdrive_that_matters/textures/block/holo_sign.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/machine_base.png b/src/main/resources/assets/overdrive_that_matters/textures/block/machine_base.png new file mode 100644 index 000000000..13469a600 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/machine_base.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_upgrades.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_upgrades.png index ce32f5677..05130574c 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/android_upgrades.png and b/src/main/resources/assets/overdrive_that_matters/textures/gui/android_upgrades.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/slot_backgrounds.png b/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/slot_backgrounds.png index 38f3005c6..a8d6bc2b5 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/slot_backgrounds.png and b/src/main/resources/assets/overdrive_that_matters/textures/gui/widgets/slot_backgrounds.png differ