Forráskód Böngészése

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

LTCatt 5 éve
szülő
commit
00bc1b9b51

+ 7 - 0
data/mini/functions/trade/game/new_trade_s.mcfunction

@@ -0,0 +1,7 @@
+loot spawn ~ ~ ~ loot mini:trade_s
+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
+data modify entity @s Offers.Recipes[-1].maxUses set from entity @e[type=item,nbt={Item:{tag:{TradeItem:1b}}},limit=1] Item.tag.maxUses
+data modify entity @s Offers.Recipes[-1].sell set from entity @e[type=item,nbt={Item:{tag:{TradeItem:1b}}},limit=1] Item.tag.sell
+kill @e[type=item,nbt={Item:{tag:{TradeItem:1b}}}]

+ 1 - 1
data/mini/functions/trade/game/villager_tp3.mcfunction

@@ -1,3 +1,3 @@
-execute positioned ^ ^ ^0.2 if block ~ ~ ~ air if block ~ ~1 ~ air if entity @s[distance=..2] run function mini:trade/game/villager_tp3
+execute positioned ^ ^ ^0.2 if block ~ ~ ~ #mini:redefined_air if block ~ ~1 ~ #mini:redefined_air if entity @s[distance=..2] run function mini:trade/game/villager_tp3
 tp @s[tag=tpTemp] ~ ~ ~ facing entity @a[tag=tempPlayerTp,limit=1]
 tag @s remove tpTemp

+ 201 - 0
data/mini/loot_tables/trade_s.json

@@ -0,0 +1,201 @@
+{
+    "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:\"emerald\",Count:4}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"spider_spawn_egg\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:999999}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "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:\"emerald\",Count:5}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"skeleton_spawn_egg\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:999999}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "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:\"emerald\",Count:6}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"iron_ingot\",Count:2}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:999999}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:iron_ingot\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        },
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"emerald\",Count:6}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"stone\",Count:4}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:999999}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:stone\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        },
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"emerald\",Count:5}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"oak_planks\",Count:12}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:999999}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:oak_planks\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        },
+                        {
+                            "type": "item",
+                            "name": "stone",
+                            "functions": [
+                                {
+                                    "function": "set_nbt",
+                                    "tag": "{buy:{id:\"emerald\",Count:18}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{sell:{id:\"nether_star\",Count:1}}"
+                                },
+                                {
+                                    "function": "set_nbt",
+                                    "tag":"{maxUses:999999}"
+                                }
+                            ],
+                            "conditions": [
+                                {
+                                    "condition": "inverted",
+                                    "term": {
+                                        "condition": "minecraft:entity_properties",
+                                        "entity": "this",
+                                        "predicate": {
+                                            "nbt": "{Offers:{Recipes:[{sell:{id:\"minecraft:nether_star\"}}]}}"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}

+ 12 - 0
data/mini/tags/blocks/redefined_air.json

@@ -0,0 +1,12 @@
+{
+    "values": [
+        "#minecraft:flowers",
+        "minecraft:grass",
+        "minecraft:tall_grass",
+        "#minecraft:climbable",
+        "minecraft:water",
+        "minecraft:air",
+        "minecraft:cave_air",
+        "minecraft:void_air"
+    ]
+}