Skip to content

How to get a lootTable Modifier to work with BlockTags? (1.20.2) #3415

Discussion options

You must be logged in to vote

Got it to work!!!! Using: if(source.isBuiltin() && id.getNamespace().equals("minecraft") && id.getPath().endsWith("_log"))

    public static void editLootTables() {

        LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> {
          //New code >  if(source.isBuiltin() && id.getNamespace().equals("minecraft") && id.getPath().endsWith("_log")) { 
                LootPool.Builder poolBuilder = LootPool.builder()
                        .rolls(UniformLootNumberProvider.create(0.0f, 8.0f))
                        .conditionally(RandomChanceLootCondition.builder(1f)) // Drops 100% of the time.
                                .with(ItemEntry.builder(M…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@TheBlockSmith
Comment options

@TheBlockSmith
Comment options

Answer selected by TheBlockSmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
2 participants