-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from ICY105/mech-1.19
Mech 1.19 update
- Loading branch information
Showing
2,577 changed files
with
52,314 additions
and
18,206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
scoreboard players add #block_utils.major load.status 0 | ||
scoreboard players add #block_utils.minor load.status 0 | ||
|
||
execute if score #block_utils.major load.status matches ..0 run scoreboard players set #block_utils.minor load.status 1 | ||
execute if score #block_utils.major load.status matches ..0 run scoreboard players set #block_utils.major load.status 1 | ||
execute if score #block_utils.major load.status matches 1 if score #block_utils.minor load.status matches ..1 run scoreboard players set #block_utils.minor load.status 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
scoreboard objectives add block_utils.data dummy |
44 changes: 44 additions & 0 deletions
44
data/block_utils/functions/v1.1/redstone/is_active.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
scoreboard players set #temp block_utils.data 0 | ||
|
||
#self powered | ||
function block_utils:v1.1/redstone/is_powered | ||
execute if score #out block_utils.data matches 1 run scoreboard players set #temp block_utils.data 1 | ||
|
||
#other powered | ||
execute if score #temp block_utils.data matches 0 positioned ~ ~1 ~ unless block ~ ~ ~ #block_utils:v1.1/transparent run function block_utils:v1.1/redstone/is_powered | ||
execute if score #temp block_utils.data matches 0 if score #out block_utils.data matches 1 run scoreboard players set #temp block_utils.data 1 | ||
|
||
execute if score #temp block_utils.data matches 0 positioned ~ ~-1 ~ unless block ~ ~ ~ #block_utils:v1.1/transparent run function block_utils:v1.1/redstone/is_powered | ||
execute if score #temp block_utils.data matches 0 if score #out block_utils.data matches 1 run scoreboard players set #temp block_utils.data 1 | ||
|
||
execute if score #temp block_utils.data matches 0 positioned ~1 ~ ~ unless block ~ ~ ~ #block_utils:v1.1/transparent run function block_utils:v1.1/redstone/is_powered | ||
execute if score #temp block_utils.data matches 0 if score #out block_utils.data matches 1 run scoreboard players set #temp block_utils.data 1 | ||
|
||
execute if score #temp block_utils.data matches 0 positioned ~-1 ~ ~ unless block ~ ~ ~ #block_utils:v1.1/transparent run function block_utils:v1.1/redstone/is_powered | ||
execute if score #temp block_utils.data matches 0 if score #out block_utils.data matches 1 run scoreboard players set #temp block_utils.data 1 | ||
|
||
execute if score #temp block_utils.data matches 0 positioned ~ ~ ~1 unless block ~ ~ ~ #block_utils:v1.1/transparent run function block_utils:v1.1/redstone/is_powered | ||
execute if score #temp block_utils.data matches 0 if score #out block_utils.data matches 1 run scoreboard players set #temp block_utils.data 1 | ||
|
||
execute if score #temp block_utils.data matches 0 positioned ~ ~ ~-1 unless block ~ ~ ~ #block_utils:v1.1/transparent run function block_utils:v1.1/redstone/is_powered | ||
execute if score #temp block_utils.data matches 0 if score #out block_utils.data matches 1 run scoreboard players set #temp block_utils.data 1 | ||
|
||
### Self Active | ||
|
||
#dynamic | ||
execute if score #temp block_utils.data matches 0 positioned ~ ~01 ~ if block ~ ~ ~ #block_utils:v1.1/weak_power_top if predicate block_utils:v1.1/is_emitting_signal unless block ~ ~ ~ minecraft:redstone_torch run scoreboard players set #temp block_utils.data 1 | ||
execute if score #temp block_utils.data matches 0 positioned ~ ~-1 ~ if block ~ ~ ~ #block_utils:v1.1/weak_power_bottom if predicate block_utils:v1.1/is_emitting_signal run scoreboard players set #temp block_utils.data 1 | ||
execute if score #temp block_utils.data matches 0 positioned ~01 ~ ~ if block ~ ~ ~ #block_utils:v1.1/weak_power_side if predicate block_utils:v1.1/is_emitting_signal run scoreboard players set #temp block_utils.data 1 | ||
execute if score #temp block_utils.data matches 0 positioned ~-1 ~ ~ if block ~ ~ ~ #block_utils:v1.1/weak_power_side if predicate block_utils:v1.1/is_emitting_signal run scoreboard players set #temp block_utils.data 1 | ||
execute if score #temp block_utils.data matches 0 positioned ~ ~ ~01 if block ~ ~ ~ #block_utils:v1.1/weak_power_side if predicate block_utils:v1.1/is_emitting_signal run scoreboard players set #temp block_utils.data 1 | ||
execute if score #temp block_utils.data matches 0 positioned ~ ~ ~-1 if block ~ ~ ~ #block_utils:v1.1/weak_power_side if predicate block_utils:v1.1/is_emitting_signal run scoreboard players set #temp block_utils.data 1 | ||
|
||
#redstone torch | ||
execute if block ~ ~1 ~ minecraft:redstone_wall_torch[lit=true] run scoreboard players set #temp block_utils.data 1 | ||
execute if block ~1 ~ ~ #block_utils:v1.1/redstone_torch[lit=true] run scoreboard players set #temp block_utils.data 1 | ||
execute if block ~-1 ~ ~ #block_utils:v1.1/redstone_torch[lit=true] run scoreboard players set #temp block_utils.data 1 | ||
execute if block ~ ~ ~1 #block_utils:v1.1/redstone_torch[lit=true] run scoreboard players set #temp block_utils.data 1 | ||
execute if block ~ ~ ~-1 #block_utils:v1.1/redstone_torch[lit=true] run scoreboard players set #temp block_utils.data 1 | ||
|
||
scoreboard players operation #out block_utils.data = #temp block_utils.data |
23 changes: 23 additions & 0 deletions
23
data/block_utils/functions/v1.1/redstone/is_powered.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
scoreboard players set #out block_utils.data 0 | ||
|
||
#generic: static | ||
execute if block ~ ~1 ~ #block_utils:v1.1/strong_power_top unless block ~ ~1 ~ #block_utils:v1.1/strong_power_top[power=0] unless block ~ ~1 ~ #block_utils:v1.1/strong_power_top[powered=false] run scoreboard players set #out block_utils.data 1 | ||
execute if block ~ ~-1 ~ #block_utils:v1.1/strong_power_bottom[powered=true,face=ceiling] run scoreboard players set #out block_utils.data 1 | ||
execute if block ~1 ~ ~ #block_utils:v1.1/strong_power_side[powered=true,facing=east] run scoreboard players set #out block_utils.data 1 | ||
execute if block ~-1 ~ ~ #block_utils:v1.1/strong_power_side[powered=true,facing=west] run scoreboard players set #out block_utils.data 1 | ||
execute if block ~ ~ ~1 #block_utils:v1.1/strong_power_side[powered=true,facing=south] run scoreboard players set #out block_utils.data 1 | ||
execute if block ~ ~ ~-1 #block_utils:v1.1/strong_power_side[powered=true,facing=north] run scoreboard players set #out block_utils.data 1 | ||
|
||
#redstone torch | ||
execute if block ~ ~-1 ~ minecraft:redstone_torch[lit=true] run scoreboard players set #out block_utils.data 1 | ||
|
||
#redstone dust | ||
execute positioned ~ ~1 ~ if block ~ ~ ~ minecraft:redstone_wire unless block ~ ~ ~ minecraft:redstone_wire[power=0] run scoreboard players set #out block_utils.data 1 | ||
execute positioned ~1 ~ ~ if block ~ ~ ~ minecraft:redstone_wire[west=side] unless block ~ ~ ~ minecraft:redstone_wire[power=0] run scoreboard players set #out block_utils.data 1 | ||
execute positioned ~-1 ~ ~ if block ~ ~ ~ minecraft:redstone_wire[east=side] unless block ~ ~ ~ minecraft:redstone_wire[power=0] run scoreboard players set #out block_utils.data 1 | ||
execute positioned ~ ~ ~1 if block ~ ~ ~ minecraft:redstone_wire[north=side] unless block ~ ~ ~ minecraft:redstone_wire[power=0] run scoreboard players set #out block_utils.data 1 | ||
execute positioned ~ ~ ~-1 if block ~ ~ ~ minecraft:redstone_wire[south=side] unless block ~ ~ ~ minecraft:redstone_wire[power=0] run scoreboard players set #out block_utils.data 1 | ||
|
||
#check opaque | ||
execute if block ~ ~ ~ #block_utils:v1.1/transparent run scoreboard players set #out block_utils.data 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
execute if score #block_utils.major load.status matches 1 if score #block_utils.minor load.status matches 1 run function block_utils:v1.1/init |
2 changes: 2 additions & 0 deletions
2
data/block_utils/functions/v1.1/versioning/is_active.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
execute if score #block_utils.major load.status matches 1 if score #block_utils.minor load.status matches 1 run function block_utils:v1.1/redstone/is_active |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
function #block_utils:v1/internal/is_active |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"condition": "minecraft:alternative", | ||
"terms": [ | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { | ||
"block": { | ||
"state": { | ||
"powered": "true" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { | ||
"block": { | ||
"tag": "block_utils:v1.1/redstone_torch", | ||
"state": { | ||
"lit": "true" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { | ||
"block": { | ||
"blocks": [ | ||
"minecraft:redstone_block" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "1" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "2" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "3" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "4" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "5" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "6" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "7" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "8" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "9" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "10" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "11" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "12" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "13" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "14" } } } | ||
}, | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { "block": { "state": { "power": "15" } } } | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"values":[ | ||
"#minecraft:wooden_pressure_plates", | ||
"minecraft:stone_pressure_plate", | ||
"minecraft:light_weighted_pressure_plate", | ||
"minecraft:heavy_weighted_pressure_plate" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"values":[ | ||
"minecraft:redstone_torch", | ||
"minecraft:redstone_wall_torch" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"values":[ | ||
"#minecraft:buttons", | ||
"minecraft:lever", | ||
"minecraft:redstone_torch" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"values":[ | ||
"#minecraft:buttons", | ||
"minecraft:lever", | ||
"minecraft:repeater", | ||
"minecraft:comparator", | ||
"minecraft:tripwire_hook" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"values":[ | ||
"#minecraft:buttons", | ||
"#block_utils:v1.1/pressure_plates", | ||
"minecraft:lever", | ||
"minecraft:detector_rail", | ||
"minecraft:redstone_wire" | ||
] | ||
} |
Oops, something went wrong.