#[1.21] LocationPredicate, can't get biome.
5 messages · Page 1 of 1 (latest)
ItemEntry.builder(Blocks.BAMBOO)
.conditionally(
LocationCheckLootCondition.builder(
LocationPredicate.Builder.create()
.biome(RegistryEntryList.of(impl.getOrThrow(BiomeKeys.JUNGLE), impl.getOrThrow(BiomeKeys.SPARSE_JUNGLE), impl.getOrThrow(BiomeKeys.BAMBOO_JUNGLE)))
)
)
.weight(10)
where impl is a variable they created earlier:
RegistryWrapper.Impl<Biome> impl = this.registries.getWrapperOrThrow(RegistryKeys.BIOME);
where did you find that? i had been looking through the biome classes and the locationPredicate abd checkLootCondition classes
Of course that would not be in the biome classes, thats in the VanillaFishingLootTableGenerator class, that is the one that generates all the loot tables for fishing, if you search for any vanilla loot table simply look at all the classes that extend looTableGenerator, they all extend that, then I simple see that you want the fishing loot tables so I open that one and search for bamboo, the item you gave in the example