Skip to content

Commit 602d492

Browse files
committed
Remove lib trades, refactor apple trees and balloon animals
1 parent 1964e78 commit 602d492

File tree

63 files changed

+122
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+122
-919
lines changed

gm4_apple_trees/beet.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ resource_pack:
1313

1414
pipeline:
1515
- gm4.plugins.extend.module
16-
- gm4.plugins.include.lib_trades
1716
- gm4.plugins.include.lib_trees
1817

1918
meta:
2019
gm4:
2120
versioning:
2221
required:
23-
lib_trades: 1.6.0
2422
lib_trees: 1.3.0
2523
schedule_loops:
2624
- main

gm4_apple_trees/data/gm4_apple_trees/function/wandering_trader/register_trade.mcfunction

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"wants": {
3+
"id": "minecraft:emerald",
4+
"count": 5
5+
},
6+
"gives": {
7+
"id": "minecraft:oak_sapling",
8+
"components": {
9+
"minecraft:custom_data": "{gm4_trees:{item:{id:'sapling',type:'apple'}},gm4_podzol_rooting_soil:{id:'apple_tree_sapling'}}",
10+
"minecraft:custom_model_data": {"strings":["gm4_apple_trees:item/apple_tree_sapling"]},
11+
"minecraft:item_name": {
12+
"translate": "item.gm4.apple_tree_sapling",
13+
"fallback": "Apple Tree Sapling"
14+
}
15+
}
16+
},
17+
"max_uses": 8,
18+
"xp": 1
19+
}

gm4_apple_trees/data/gm4_trades/tags/function/register_trades.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"values": [
3+
"gm4_apple_trees:emerald_apple_tree_sapling"
4+
]
5+
}

gm4_balloon_animals/beet.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ data_pack:
88
pipeline:
99
- gm4_balloon_animals.generate
1010
- gm4.plugins.extend.module
11-
- gm4.plugins.include.lib_trades
1211

1312
require:
1413
- bolt
1514

1615
meta:
1716
gm4:
1817
versioning:
19-
required:
20-
lib_trades: 1.6.0
2118
schedule_loops: [main]
2219
website:
2320
description: Looking for exotic animals? This module makes some Wandering Traders sell cute baby animals!
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
execute as @e[type=minecraft:wandering_trader,tag=!gm4_balloon_animal_eligible_ignore,tag=!smithed.entity] at @s run function gm4_balloon_animals:wandering_trader/check_eligibility
3+
24
execute as @e[type=#gm4_balloon_animals:balloon_animal,tag=gm4_balloon_animal,tag=!gm4_balloon_animal_purchased] run function gm4_balloon_animals:balloon/check_leashed
35

46
schedule function gm4_balloon_animals:main 4s
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
# @s = a wandering trader
22
# at @s
3-
# run from #gm4_trades:register_trades
3+
# run from gm4_balloon_animals:main
44

5-
scoreboard players set $valid_trader gm4_balloon_animals_data 1
5+
# ensure that this wandering trader is not checked again
6+
tag @s add gm4_balloon_animal_eligible_ignore
67

7-
# check tags
8-
execute if entity @s[tag=gm4_balloon_animal_eligible_ignore] run scoreboard players set $valid_trader gm4_balloon_animals_data 0
9-
execute if entity @s[tag=gm4_calling_bell_trader] run scoreboard players set $valid_trader gm4_balloon_animals_data 0
10-
11-
data modify storage gm4_balloon_animals:temp trader.uuid set from entity @s UUID
12-
tag @s add gm4_balloon_animal_trader_eligible_check
8+
execute unless predicate gm4_balloon_animals:balloon_trader_chance run return 0
139

1410
# must have 2 llamas leashed
1511
scoreboard players set $trader_llama_count gm4_balloon_animals_data 0
12+
tag @s add gm4_balloon_animal_trader_eligible_check
1613
execute as @e[type=trader_llama,tag=!smithed.entity,distance=..6] on leasher if entity @s[tag=gm4_balloon_animal_trader_eligible_check] run scoreboard players add $trader_llama_count gm4_balloon_animals_data 1
17-
execute unless score $trader_llama_count gm4_balloon_animals_data matches 2 run scoreboard players set $valid_trader gm4_balloon_animals_data 0
18-
19-
tag @s add gm4_balloon_animal_eligible_ignore
2014
tag @s remove gm4_balloon_animal_trader_eligible_check
21-
execute if score $valid_trader gm4_balloon_animals_data matches 1 if predicate gm4_balloon_animals:balloon_trader_chance run function gm4_balloon_animals:wandering_trader/init_trader
22-
23-
# clean up
15+
execute unless score $trader_llama_count gm4_balloon_animals_data matches 2 run return 0
2416
scoreboard players reset $trader_llama_count gm4_balloon_animals_data
17+
18+
data modify storage gm4_balloon_animals:temp trader.uuid set from entity @s UUID
19+
function gm4_balloon_animals:wandering_trader/init_trader
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
# @s = a wandering trader with exactly 2 trader llamas
22
# at @s
3-
# run from wandering_trader/check_eligibility via #gm4_trades:register_trades
3+
# run from wandering_trader/check_eligibility
44

5+
# mark that this trader was modified
56
tag @s add gm4_balloon_animal_trader
6-
tag @s add gm4_balloon_animal_trader_new
7-
8-
scoreboard players set $llamas_replaced gm4_balloon_animals_data 0
97

108
# find leashed llamas
9+
tag @s add gm4_balloon_animal_trader_new
1110
execute as @e[type=trader_llama,tag=!smithed.entity,distance=..6] run function gm4_balloon_animals:wandering_trader/llama/check_leasher
11+
tag @s remove gm4_balloon_animal_trader_new
1212

1313
# pick two animals and set up trades
1414
function gm4_balloon_animals:wandering_trader/pick_two_animals
15-
16-
17-
# clean up
18-
scoreboard players reset $trader_llama_check gm4_balloon_animals_data
19-
20-
tag @s remove gm4_balloon_animal_trader_new
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Checks that this trader llama is attached to the wandering trader that is being checked
2-
# @s = a llama within 5 blocks of the wandering trader being checked
2+
# @s = a llama within 6 blocks of the wandering trader being checked
33
# at @s
44
# run from wandering_trader/init_trader
55

66
execute store result score $trader_llama_check gm4_balloon_animals_data on leasher if entity @s[tag=gm4_balloon_animal_trader_new]
77
execute if score $trader_llama_check gm4_balloon_animals_data matches 1 run function gm4_balloon_animals:wandering_trader/llama/kill
8+
scoreboard players reset $trader_llama_check gm4_balloon_animals_data

0 commit comments

Comments
 (0)