Просмотр исходного кода

Merge branch 'master' of https://github.com/LTCatt/LTW3

LTCatt 5 лет назад
Родитель
Сommit
9fa71e7534

+ 2 - 2
data/mini/functions/trade/game/new_trade.mcfunction

@@ -2,8 +2,8 @@ execute if score @s temp matches 1 run loot spawn ~ ~ ~ loot mini:trade_s
 execute if score @s temp matches 2 run loot spawn ~ ~ ~ loot mini:trade_a
 execute if score @s temp matches 3 run loot spawn ~ ~ ~ loot mini:trade_b
 execute if score @s temp matches 4 run loot spawn ~ ~ ~ loot mini:trade_c
-# execute if score @s temp matches 5 run loot spawn ~ ~ ~ loot mini:trade_d
-# execute if score @s temp matches 6 run loot spawn ~ ~ ~ loot mini:trade_e
+execute if score @s temp matches 5 run loot spawn ~ ~ ~ loot mini:trade_d
+execute if score @s temp matches 6 run loot spawn ~ ~ ~ loot mini:trade_e
 data modify entity @s Offers.Recipes append value {rewardExp:false,xp:20}
 data modify entity @s Offers.Recipes[-1].buy set from entity @e[type=item,nbt={Item:{tag:{TradeItem:1b}}},limit=1] Item.tag.buy
 data modify entity @s Offers.Recipes[-1].buyB set from entity @e[type=item,nbt={Item:{tag:{TradeItem:1b}}},limit=1] Item.tag.buyB

+ 245 - 0
data/mini/loot_tables/trade_d.json

@@ -0,0 +1,245 @@
+{
+    "type": "entity",
+    "functions": [
+        {
+            "function": "set_nbt",
+            "tag": "{TradeItem:1b}"
+        }
+    ],
+    "pools": [
+        {
+            "rolls": 1,
+            "entries": [
+                {
+                    "type": "group",
+                    "children": [
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"lava_bucket\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"emerald\",Count:9}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:2}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:lava_bucket\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        },
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"jukebox\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"emerald\",Count:11}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:2}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:jukebox\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        },
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"flint_and_steel\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"emerald\",Count:8}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:2}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:flint_and_steel\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"lantern\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"emerald\",Count:4}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:lantern\"}}]}}"
+                                }
+                            }
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"mossy_stone_bricks\",Count:2}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"emerald\",Count:6}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:mossy_stone_bricks\"}}]}}"
+                                }
+                            }
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"light_blue_dye\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"emerald\",Count:6}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:light_blue_dye\"}}]}}"
+                                }
+                            }
+                        },
+                        {
+                            "condition": "minecraft:entity_properties",
+                            "entity": "this",
+                            "predicate": {
+                                "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:skeleton_spawn_egg\"}}]}}"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"white_concrete_powder\",Count:4}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"emerald\",Count:9}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:white_concrete_powder\"}}]}}"
+                                }
+                            }
+                        },
+                        {
+                            "condition": "minecraft:entity_properties",
+                            "entity": "this",
+                            "predicate": {
+                                "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:skeleton_spawn_egg\"}}]}}"
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}

+ 259 - 0
data/mini/loot_tables/trade_e.json

@@ -0,0 +1,259 @@
+{
+    "type": "entity",
+    "functions": [
+        {
+            "function": "set_nbt",
+            "tag": "{TradeItem:1b}"
+        }
+    ],
+    "pools": [
+        {
+            "rolls": 1,
+            "entries": [
+                {
+                    "type": "group",
+                    "children": [
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"diamond_hoe\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"emerald\",Count:12}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:2}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:diamond_hoe\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        },
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"blast_furnace\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"nether_star\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:2}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:blast_furnace\"},sell:{id:\"minecraft:nether_star\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        },
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"furnace_minecart\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"emerald\",Count:13}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:2}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:furnace_minecart\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"wheat\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"emerald\",Count:9}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:wheat\"}}]}}"
+                                }
+                            }
+                        },
+                        {
+                            "condition": "minecraft:entity_properties",
+                            "entity": "this",
+                            "predicate": {
+                                "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:skeleton_spawn_egg\"}}]}}"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"pufferfish\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"nether_star\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:pufferfish\"},sell:{id:\"minecraft:nether_star\"}}]}}"
+                                }
+                            }
+                        },
+                        {
+                            "condition": "minecraft:entity_properties",
+                            "entity": "this",
+                            "predicate": {
+                                "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:spider_spawn_egg\"}}]}}"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"loom\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"emerald\",Count:13}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:loom\"}}]}}"
+                                }
+                            }
+                        },
+                        {
+                            "condition": "minecraft:entity_properties",
+                            "entity": "this",
+                            "predicate": {
+                                "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:spider_spawn_egg\"}}]}}"
+                            }
+                        }
+                    ]
+                },
+                {
+                    "type": "item",
+                    "name": "stone",
+                    "functions": [
+                        {
+                            "function": "set_nbt",
+                            "tag": "{buy:{id:\"white_wool\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{sell:{id:\"nether_star\",Count:1}}"
+                        },
+                        {
+                            "function": "set_nbt",
+                            "tag":"{maxUses:2}"
+                        }
+                    ],
+                    "conditions": [
+                        {
+                            "condition": "inverted",
+                            "term": {
+                                "condition": "minecraft:entity_properties",
+                                "entity": "this",
+                                "predicate": {
+                                    "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:white_wool\"},sell:{id:\"minecraft:nether_star\"}}]}}"
+                                }
+                            }
+                        },
+                        {
+                            "condition": "minecraft:entity_properties",
+                            "entity": "this",
+                            "predicate": {
+                                "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:spider_spawn_egg\"}}]}}"
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}

+ 1 - 1
data/mini/loot_tables/trade_s.json

@@ -187,7 +187,7 @@
                                         "condition": "minecraft:entity_properties",
                                         "entity": "this",
                                         "predicate": {
-                                            "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:nether_star\"}}]}}"
+                                            "nbt": "{Offers:{Recipes:[{buy:{id:\"minecraft:emerald\"},sell:{id:\"minecraft:nether_star\"}}]}}"
                                         }
                                     }
                                 }