How to get a lootTable Modifier to work with BlockTags? (1.20.2) #3415
Answered
by
TheBlockSmith
TheBlockSmith
asked this question in
Mod Dev Support
-
Description
How would i make this loot table modifier work for all logs in the game? |
Beta Was this translation helpful? Give feedback.
Answered by
TheBlockSmith
Nov 12, 2023
Replies: 1 comment 2 replies
-
you would need to get all Blocks that are in the tag via the block registry. you can then do a little manipulation to read just the block name in the id you are passed and check if that is in the block list. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got it to work!!!! Using:
if(source.isBuiltin() && id.getNamespace().equals("minecraft") && id.getPath().endsWith("_log"))