Files
MinecraftForge/patches/minecraft/net/minecraft/data/loot/BlockLootSubProvider.java.patch
T
4a2db246e0 1.21 Update
Co-authored-by: RealMangoRage <[email protected]>
Co-authored-by: Daniel Norris <[email protected]>
Co-authored-by: Ven <[email protected]>
2024-06-13 10:42:32 -07:00

21 lines
797 B
Diff

--- a/net/minecraft/data/loot/BlockLootSubProvider.java
+++ b/net/minecraft/data/loot/BlockLootSubProvider.java
@@ -641,12 +_,16 @@
protected abstract void generate();
+ protected Iterable<Block> getKnownBlocks() {
+ return BuiltInRegistries.BLOCK;
+ }
+
@Override
public void generate(BiConsumer<ResourceKey<LootTable>, LootTable.Builder> p_249322_) {
this.generate();
Set<ResourceKey<LootTable>> set = new HashSet<>();
- for (Block block : BuiltInRegistries.BLOCK) {
+ for (Block block : getKnownBlocks()) {
if (block.isEnabled(this.enabledFeatures)) {
ResourceKey<LootTable> resourcekey = block.getLootTable();
if (resourcekey != BuiltInLootTables.EMPTY && set.add(resourcekey)) {