mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Co-authored-by: RealMangoRage <[email protected]> Co-authored-by: Daniel Norris <[email protected]> Co-authored-by: Ven <[email protected]>
21 lines
797 B
Diff
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)) {
|