Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TheThanathor committed Jan 30, 2024
2 parents 0618fb3 + 4f21faa commit fc9f412
Show file tree
Hide file tree
Showing 92 changed files with 358 additions and 269 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# scheduled from self and advancement triggers

scoreboard players set $success gm4_data 0
execute store success score $success gm4_data as @a[tag=gm4_running_upgrade_path] at @s if loaded ~ ~ ~ run function #gm4_upgrade_paths:run
execute store success score $success gm4_data as @a[tag=gm4_running_upgrade_path] at @s if loaded ~ ~ ~
execute as @a[tag=gm4_running_upgrade_path] at @s if loaded ~ ~ ~ run function #gm4_upgrade_paths:run
execute if score $success gm4_data matches 0 if entity @a[tag=gm4_running_upgrade_path] run schedule function gm4:upgrade_paths/run_when_loaded 1t
scoreboard players reset $success gm4_data
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# located at @s
# run from gm4_auto_crafting:auto_crafter/shift/shift_left

scoreboard players set $shifted gm4_crafting 1

execute if data storage gm4_custom_crafters:temp/crafter Items[{Slot:2b}] run data modify storage gm4_custom_crafters:temp/crafter Items[{Slot:2b}].Slot set value 0b
execute if data storage gm4_custom_crafters:temp/crafter Items[{Slot:5b}] run data modify storage gm4_custom_crafters:temp/crafter Items[{Slot:5b}].Slot set value 3b
execute if data storage gm4_custom_crafters:temp/crafter Items[{Slot:8b}] run data modify storage gm4_custom_crafters:temp/crafter Items[{Slot:8b}].Slot set value 6b
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# run from gm4_auto_crafting:auto_crafter/craft/attempt_craft

scoreboard players set $shifted gm4_crafting 0
execute unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:1b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:4b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:7b}] store result score $shifted gm4_crafting run function gm4_auto_crafting:auto_crafter/shift/left_2
execute unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:1b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:4b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:7b}] run function gm4_auto_crafting:auto_crafter/shift/left_2
execute if score $shifted gm4_crafting matches 0 run function gm4_auto_crafting:auto_crafter/shift/left_1
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# run from gm4_auto_crafting:auto_crafter/craft/attempt_craft

scoreboard players set $shifted gm4_crafting 0
execute unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:3b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:4b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:5b}] store result score $shifted gm4_crafting run function gm4_auto_crafting:auto_crafter/shift/up_2
execute unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:3b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:4b}] unless data storage gm4_custom_crafters:temp/crafter Items[{Slot:5b}] run function gm4_auto_crafting:auto_crafter/shift/up_2
execute if score $shifted gm4_crafting matches 0 run function gm4_auto_crafting:auto_crafter/shift/up_1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# located at @s
# run from gm4_auto_crafting:auto_crafter/shift/shift_up

scoreboard players set $shifted gm4_crafting 1

execute if data storage gm4_custom_crafters:temp/crafter Items[{Slot:6b}] run data modify storage gm4_custom_crafters:temp/crafter Items[{Slot:6b}].Slot set value 0b
execute if data storage gm4_custom_crafters:temp/crafter Items[{Slot:7b}] run data modify storage gm4_custom_crafters:temp/crafter Items[{Slot:7b}].Slot set value 1b
execute if data storage gm4_custom_crafters:temp/crafter Items[{Slot:8b}] run data modify storage gm4_custom_crafters:temp/crafter Items[{Slot:8b}].Slot set value 2b
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine block marker (at the center of the placed down block)
# run from #gm4_machines:place_down

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data storage gm4_machines:temp {id:"gm4_auto_crafter"} run function gm4_auto_crafting:machine/create
execute if score $placed_block gm4_machine_data matches 0 if data storage gm4_machines:temp {id:"gm4_auto_crafter"} run function gm4_auto_crafting:machine/create
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ scoreboard players operation $current gm4_bas_id = @s gm4_bas_id

# select armor_stand linked to player
scoreboard players reset $success gm4_bas_data
execute store success score $success gm4_bas_data if predicate gm4_better_armour_stands:holding/mainhand/book_and_quill as @e[type=armor_stand,tag=gm4_bas_track,distance=..6] if score @s gm4_bas_id = $current gm4_bas_id positioned ~ ~1.6 ~ run function gm4_better_armour_stands:pose/track/update
execute if predicate gm4_better_armour_stands:holding/mainhand/book_and_quill as @e[type=armor_stand,tag=gm4_bas_track,distance=..6] if score @s gm4_bas_id = $current gm4_bas_id positioned ~ ~1.6 ~ run function gm4_better_armour_stands:pose/track/update

# undo changes if no linked armor_stand found, or if player not holding book_and_quill
execute unless score $success gm4_bas_data matches 1 run function gm4_better_armour_stands:pose/undo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# at @p[tag=gm4_bas_track] positioned ~ ~1.6 ~
# run from tick

scoreboard players set $success gm4_bas_data 1

# keep interaction in front of player
execute as @e[type=interaction,tag=gm4_bas_detect] if score @s gm4_bas_id = $current gm4_bas_id positioned ~ ~-1 ~ run tp @s ^ ^ ^.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

data modify storage gm4_block_compressors:temp/item_stack Item set from entity @s Item

execute store success score $decompressing gm4_bc_data if data storage gm4_block_compressors:temp/item_stack Item{Count:1b} run function gm4_block_compressors:item/try_decompress
scoreboard players set $decompressing gm4_bc_data 0
execute if data storage gm4_block_compressors:temp/item_stack Item{Count:1b} run function gm4_block_compressors:item/try_decompress
execute unless score $decompressing gm4_bc_data matches 1 unless data storage gm4_block_compressors:temp/item_stack Item.tag.gm4_block_compressors unless data storage gm4_block_compressors:temp/item_stack gm4_compressed run function gm4_block_compressors:item/try_compress

scoreboard players reset $decompressing gm4_bc_data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# run from process
# checks if item is a compressed item, prevents further checks

scoreboard players set $decompressing gm4_bc_data 1

data modify storage gm4_block_compressors:temp/compressor Items set from block ~ ~ ~ Items

execute if data storage gm4_block_compressors:temp/compressor {Items:[{Count:1b}]} if data storage gm4_block_compressors:temp/item_stack Item.tag.gm4_block_compressors run function gm4_block_compressors:item/decompress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine block marker (at the center of the placed down block)
# run from #gm4_machines:place_down

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data storage gm4_machines:temp {id:"gm4_block_compressor"} run function gm4_block_compressors:machine/create
execute if score $placed_block gm4_machine_data matches 0 if data storage gm4_machines:temp {id:"gm4_block_compressor"} run function gm4_block_compressors:machine/create
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Check for Boots of Ostara recipe, ensure that the provided boots are not already Boots of Ostara, and then upgrade the boots while preserving NBT.
execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 5 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:1b,id:"minecraft:wheat_seeds",Count:1b},{Slot:3b,id:"minecraft:moss_block",Count:1b},{Slot:4b,id:"minecraft:leather_boots",Count:1b},{Slot:5b,id:"minecraft:grass_block",Count:1b},{Slot:7b,id:"minecraft:water_bucket",Count:1b}]} unless data storage gm4_custom_crafters:temp/crafter Items[2].tag.gm4_boots_of_ostara run function gm4_boots_of_ostara:create_boots
execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 5 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:1b,id:"minecraft:wheat_seeds",Count:1b},{Slot:3b,id:"minecraft:grass_block",Count:1b},{Slot:4b,id:"minecraft:leather_boots",Count:1b},{Slot:5b,id:"minecraft:moss_block",Count:1b},{Slot:7b,id:"minecraft:water_bucket",Count:1b}]} unless data storage gm4_custom_crafters:temp/crafter Items[2].tag.gm4_boots_of_ostara run function gm4_boots_of_ostara:create_boots
execute if score $crafted gm4_crafting matches 0 if score $slot_count gm4_crafting matches 5 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:1b,id:"minecraft:wheat_seeds",Count:1b},{Slot:3b,id:"minecraft:moss_block",Count:1b},{Slot:4b,id:"minecraft:leather_boots",Count:1b},{Slot:5b,id:"minecraft:grass_block",Count:1b},{Slot:7b,id:"minecraft:water_bucket",Count:1b}]} unless data storage gm4_custom_crafters:temp/crafter Items[2].tag.gm4_boots_of_ostara run function gm4_boots_of_ostara:create_boots
execute if score $crafted gm4_crafting matches 0 if score $slot_count gm4_crafting matches 5 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:1b,id:"minecraft:wheat_seeds",Count:1b},{Slot:3b,id:"minecraft:grass_block",Count:1b},{Slot:4b,id:"minecraft:leather_boots",Count:1b},{Slot:5b,id:"minecraft:moss_block",Count:1b},{Slot:7b,id:"minecraft:water_bucket",Count:1b}]} unless data storage gm4_custom_crafters:temp/crafter Items[2].tag.gm4_boots_of_ostara run function gm4_boots_of_ostara:create_boots
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# @s = gm4_custom_crafter (with boots of ostara recipe)
# Run from check_recipes

scoreboard players set $crafted gm4_crafting 1

# Merge item data into the temporary storage. If the item has custom name, CustomModelData, or similar
# properties that the user might not want to lose, they will override the normal Boots of Ostara tags,
# although the functionality of the boots will remain as that relies on the gm4_boots_of_ostara tag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"",
{
"translate": "potion.whenDrank",
"color": "purple",
"color": "dark_purple",
"italic": false
},
{
Expand Down
2 changes: 1 addition & 1 deletion gm4_disassemblers/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ meta:
lib_machines: 1.1.0
schedule_loops: [main]
website:
description: Break apart gold and iron tools and weapons for materials. Attach this to a mobfarm to finally make use of those extra armour sets!
description: Break apart gold and iron tools and weapons for materials. Attach this to a mob farm to finally make use of those extra armour sets!
recommended:
- gm4_resource_pack
- gm4_relocators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine block marker (at the center of the placed down block)
# run from #gm4_machines:place_down

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data storage gm4_machines:temp {id:"gm4_disassembler"} run function gm4_disassemblers:machine/create
execute if score $placed_block gm4_machine_data matches 0 if data storage gm4_machines:temp {id:"gm4_disassembler"} run function gm4_disassemblers:machine/create
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# at location of the door the player has interacted with
# run from gm4_double_doors:player/ray

scoreboard players set $found gm4_double_doors_data 1

# store whether the player opened a door (=1) or closed a door (=0)
scoreboard players set $target_door_state gm4_double_doors_data 0
execute if block ~ ~ ~ minecraft:{{ material_name }}_door[open=true] run scoreboard players set $target_door_state gm4_double_doors_data 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# run from gm4_double_doors:{{ material_name }}/use_door

# check block
execute store success score $found gm4_double_doors_data align xyz positioned ~0.5 ~0.5 ~0.5 if block ~ ~ ~ minecraft:{{ material_name }}_door run function gm4_double_doors:{{ material_name }}/door/get_lower_half
scoreboard players set $found gm4_double_doors_data 0
execute align xyz positioned ~0.5 ~0.5 ~0.5 if block ~ ~ ~ minecraft:{{ material_name }}_door run function gm4_double_doors:{{ material_name }}/door/get_lower_half

# runs the loop again
scoreboard players remove $ray gm4_double_doors_data 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine block marker (at the center of the placed down block)
# run from #gm4_machines:place_down

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data storage gm4_machines:temp {id:"gm4_enchantment_extractor"} run function gm4_enchantment_extractors:machine/create
execute if score $placed_block gm4_machine_data matches 0 if data storage gm4_machines:temp {id:"gm4_enchantment_extractor"} run function gm4_enchantment_extractors:machine/create
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# located at @s
# run from gm4_ender_hoppers:machine/verify_place_cart

scoreboard players set $placed_block gm4_machine_data 1

# summon new hopper minecart
summon hopper_minecart ~ ~ ~ {Tags:["gm4_ender_hopper_minecart_new","gm4_new_machine"],Passengers:[{id:"minecraft:armor_stand",CustomName:'"gm4_ender_hopper_stand"',Tags:["gm4_no_edit","gm4_ender_hopper_stand","gm4_machine_cart","smithed.entity","smithed.strict","gm4_new_machine"],Invisible:1b,Small:1b,Pose:{Head:[180f,0f,0f],RightArm:[0f,0f,0f]},ArmorItems:[{},{},{},{id:"minecraft:player_head",Count:1,tag:{CustomModelData:3420002,SkullOwner:"$ender_hopper_display"}}],DisabledSlots:2039583,HandItems:[{id:"minecraft:stone_button",Count:1b,tag:{CustomModelData:3420009}},{}]}]}
particle large_smoke ~ ~0.5 ~ 0.2 0.2 0.2 0 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine minecart
# run from #gm4_machines:place_cart

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data entity @s {CustomName:'{"italic":false,"translate":"item.gm4.ender_hopper_minecart","fallback":"Minecart with Ender Hopper"}'} run function gm4_ender_hoppers:machine/create_cart
execute if score $placed_block gm4_machine_data matches 0 if data entity @s {CustomName:'{"italic":false,"translate":"item.gm4.ender_hopper_minecart","fallback":"Minecart with Ender Hopper"}'} run function gm4_ender_hoppers:machine/create_cart
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine block marker (at the center of the placed down block)
# run from #gm4_machines:place_down

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data storage gm4_machines:temp {id:"gm4_ender_hopper"} run function gm4_ender_hoppers:machine/create
execute if score $placed_block gm4_machine_data matches 0 if data storage gm4_machines:temp {id:"gm4_ender_hopper"} run function gm4_ender_hoppers:machine/create
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine minecart
# run from #gm4_machines:place_cart

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data entity @s {CustomName:'{"translate":"item.gm4.ender_hopper_minecart","fallback":"Minecart with Ender Hopper","italic":false}'} run function gm4_ender_hoppers:machine/create_cart
execute if score $placed_block gm4_machine_data matches 0 if data entity @s {CustomName:'{"translate":"item.gm4.ender_hopper_minecart","fallback":"Minecart with Ender Hopper","italic":false}'} run function gm4_ender_hoppers:machine/create_cart
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine block marker (at the center of the placed down block)
# run from #gm4_machines:place_down

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data storage gm4_machines:temp {id:"gm4_forming_press"} run function gm4_forming_press:machine/create
execute if score $placed_block gm4_machine_data matches 0 if data storage gm4_machines:temp {id:"gm4_forming_press"} run function gm4_forming_press:machine/create
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# located at @s
# run from gm4_liquid_minecarts:machine/verify_place_cart

scoreboard players set $placed_block gm4_machine_data 1

# summon new command block minecart
summon command_block_minecart ~ ~ ~ {Command:"execute if score @s gm4_lt_value matches 1.. run function gm4_liquid_minecarts:drain_minecart",CustomName:'{"text":"Liquid Minecart","italic":false}',Tags:["gm4_liquid_minecart","gm4_liquid_minecart_empty","gm4_machine_cart","gm4_new_machine"],CustomDisplayTile:1,DisplayState:{"Name":"minecraft:hopper"},Passengers:[{id:"minecraft:armor_stand",Tags:["gm4_no_edit","gm4_liquid_minecart_stand","gm4_machine_cart","smithed.entity","smithed.strict","gm4_new_machine"],Invisible:1b,DisabledSlots:2039583,Small:1b,ArmorItems:[{id:"minecraft:stick",Count:1,tag:{gm4_liquid_minecarts:{liquid_tag:"null"}}},{},{},{}],Pose:{Head:[180.0f,0.0f,0.0f],RightArm:[0.0f,-90.0f,0.0f]}}]}
tp @e[type=command_block_minecart,distance=..0.1,tag=gm4_new_machine] @s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine minecart
# run from #gm4_machines:place_cart

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data entity @s {CustomName:'{"italic":false,"translate":"item.gm4.liquid_minecart","fallback":"Minecart with Liquid Tank"}'} run function gm4_liquid_minecarts:machine/create_cart
execute if score $placed_block gm4_machine_data matches 0 if data entity @s {CustomName:'{"italic":false,"translate":"item.gm4.liquid_minecart","fallback":"Minecart with Liquid Tank"}'} run function gm4_liquid_minecarts:machine/create_cart
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# located at the machine minecart
# run from #gm4_machines:place_cart

execute if score $placed_block gm4_machine_data matches 0 store success score $placed_block gm4_machine_data if data entity @s {CustomName:'{"translate":"item.gm4.liquid_minecart","fallback":"Minecart with Liquid Tank","italic":false}'} run function gm4_liquid_minecarts:machine/create_cart
execute if score $placed_block gm4_machine_data matches 0 if data entity @s {CustomName:'{"translate":"item.gm4.liquid_minecart","fallback":"Minecart with Liquid Tank","italic":false}'} run function gm4_liquid_minecarts:machine/create_cart
Loading

0 comments on commit fc9f412

Please sign in to comment.