Xander402 Posted November 28, 2019 Posted November 28, 2019 (edited) Is it possible to write a loot table pool condition that will drop when a certain data value in BlockState is greater than a number? Look at this. All of these pools only differ with one digit (in the "age" parameter) : { "rolls": 1.0, "entries": [ { "type": "minecraft:alternatives", "children": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:block_state_property", "block": "mod:avocado_tree", "properties": { "age": "2" } } ], "functions": [ { "function": "minecraft:set_count", "count": 2 }, { "function": "minecraft:explosion_decay" } ], "name": "mod:avocado_seed" }, { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:block_state_property", "block": "mod:avocado_tree", "properties": { "age": "3" } } ], "functions": [ { "function": "minecraft:set_count", "count": 2 }, { "function": "minecraft:explosion_decay" } ], "name": "mod:avocado_seed" }, { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:block_state_property", "block": "mod:avocado_tree", "properties": { "age": "4" } } ], "functions": [ { "function": "minecraft:set_count", "count": 2 }, { "function": "minecraft:explosion_decay" } ], "name": "mod:avocado_seed" }, { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:block_state_property", "block": "mod:avocado_tree", "properties": { "age": "5" } } ], "functions": [ { "function": "minecraft:set_count", "count": 2 }, { "function": "minecraft:explosion_decay" } ], "name": "mod:avocado_seed" } ] } ] } Is there a way to make it simpler? Something like this: { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:block_state_property", "block": "mod:avocado_tree", "properties": { "age": "(from 2 to 5)" } } ], "functions": [ { "function": "minecraft:set_count", "count": 2 }, { "function": "minecraft:explosion_decay" } ], "name": "mod:avocado_seed" } Edited November 28, 2019 by Xander402 Quote A few bytes about me: public class Xander402 extends Modder implements IForumMember { int javaExperience, moddingExperience; LearningWay preferredLearningWay; public Xander402() { this.javaExperience = BIG; this.moddingExperience = NOT_SO_BIG; this.preferredLearningWay = LearningWay.through("exampes"); super(/*displayName*/"Xander402", /*moddingSince*/"1.9", preferredLearningWay); } @Override public Goal getReasonOfJoining(Forum forum) { return new Goal(() -> { while (true) moddingExperience++; }); } }
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.