This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Help, I want to only allow certain potion effects to the splash potion ingredient, is there a way?
Sorry for my bad english!
{
"type": "minecraft:crafting_shaped",
"category": "equipment", "key": { "I": "minecraft:iron_nugget", "S": "minecraft:splash_potion", "T": "minecraft:tnt" }, "pattern": [ "ITI", "ISI", "III" ], "result": { "count": 4, "id": "lcsmatter:grenade" } }
You have to work with Predicates:
This example applies for Night Vision Potions:
In your datapack create:
data/datapackname/predicates/night_vision_splash.json
{ "condition": "minecraft:match_tool", "predicate": { "items": ["minecraft:splash_potion"], "nbt": "{Potion:\"minecraft:night_vision\"}" } }
Then update your script to:
{ "type": "minecraft:crafting_shaped", "category": "equipment", "pattern": [ "ITI", "ISI", "III" ], "key": { "I": { "item": "minecraft:iron_nugget" }, "T": { "item": "minecraft:tnt" }, "S": { "item": "minecraft:splash_potion", "predicate": "[i]datapackname[/i]:night_vision_splash" } }, "result": { "item": "lcsmatter:grenade", "count": 4 } }
Rename datapackname to your actual datapack name
Help, I want to only allow certain potion effects to the splash potion ingredient, is there a way?
Sorry for my bad english!
{
"type": "minecraft:crafting_shaped",
You have to work with Predicates:
This example applies for Night Vision Potions:
In your datapack create:
data/datapackname/predicates/night_vision_splash.json
{ "condition": "minecraft:match_tool", "predicate": { "items": ["minecraft:splash_potion"], "nbt": "{Potion:\"minecraft:night_vision\"}" } }Then update your script to:
{ "type": "minecraft:crafting_shaped", "category": "equipment", "pattern": [ "ITI", "ISI", "III" ], "key": { "I": { "item": "minecraft:iron_nugget" }, "T": { "item": "minecraft:tnt" }, "S": { "item": "minecraft:splash_potion", "predicate": "[i]datapackname[/i]:night_vision_splash" } }, "result": { "item": "lcsmatter:grenade", "count": 4 } }Rename datapackname to your actual datapack name
>> Link to Curseforge <<