Merge remote-tracking branch 'origin/1.21' into 1.21

This commit is contained in:
DBotThePony 2025-02-16 12:31:18 +07:00
commit 4d8a097b64
Signed by: DBot
GPG Key ID: DCC23B5715498507
11 changed files with 106 additions and 118 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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"}
}
}
],

View File

@ -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}
}
}
],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 490 B

View File

@ -1,7 +0,0 @@
{
"animation": {
"frametime": 16,
"width": 32,
"height": 64
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 964 B