
[Bug] Single upgrade modifier blocks allow substitution of all blocks of the original type in the machine pattern
jchung01 opened this issue ยท 2 comments
If a modifier block is specified in the machine's JSON, as of 2.0.3, the base block that you can substitute the modifier block is not restricted to the specified position. In the example below, the brick block offset at (0, 0, 2) should be the only block that can be replaced by a gold block to apply the modifier. However, upon testing and as implied in JEI preview, the machine structure is still valid if ANY brick block is replaced by a gold block. If you were to test a recipe though, the modifier (duration decrease) only applies if the gold block is in the correct position.
In other words, all positions of the base block can be substituted for the modifier block for a valid structure, instead of just the specified position (unexpected), but the modifier only actually applies if the modifier block is in the specified position (expected).
Broken in 2.0.3, works as expected in 2.0.0-pre7. I suspect it was due to BlockArray
changes in da00495.
Original machine, bricks in +
pattern:
Machine with modifier block, but the modifier block can replace any block in the +
pattern, not just the center of the +
.
(Note I have the modifier block highlighted, and only the specified position is highlighted, as expected)
Test Machine JSON:
{
"registryname": "test_machine",
"localizedname": "Test Machine",
"modifiers": [
{
"elements": "minecraft:gold_block",
"x": 0,
"y": 0,
"z": 2,
"modifier": {
"io": "input",
"target": "modularmachinery:duration",
"operation": 1,
"multiplier": 0.2
}
}
],
"parts": [
{
"x": 1,
"y": 0,
"z": 0,
"elements": [
"modularmachinery:blockinputbus@0"
]
},
{
"x": -1,
"y": 0,
"z": 1,
"elements": [
"minecraft:stonebrick@0"
]
},
{
"x": 0,
"y": 0,
"z": 1,
"elements": [
"minecraft:brick_block@0"
]
},
{
"x": 1,
"y": 0,
"z": 1,
"elements": [
"minecraft:stonebrick@0"
]
},
{
"x": -1,
"y": 0,
"z": 3,
"elements": [
"minecraft:stonebrick@0"
]
},
{
"x": 0,
"y": 0,
"z": 3,
"elements": [
"minecraft:brick_block@0"
]
},
{
"x": 1,
"y": 0,
"z": 3,
"elements": [
"minecraft:stonebrick@0"
]
},
{
"x": -1,
"y": 0,
"z": 2,
"elements": [
"minecraft:brick_block@0"
]
},
{
"x": 0,
"y": 0,
"z": 2,
"elements": [
"minecraft:brick_block@0"
]
},
{
"x": 1,
"y": 0,
"z": 2,
"elements": [
"minecraft:brick_block@0"
]
},
{
"x": -1,
"y": 0,
"z": 0,
"elements": [
"modularmachinery:blockoutputbus@0"
]
}
]}