generated from NeoForgeMDKs/MDK-1.21-ModDevGradle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f52c5b4
commit ae3cc49
Showing
5 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/org/hiedacamellia/whispergrove/core/data/provider/WGLootTableProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.hiedacamellia.whispergrove.core.data.provider; | ||
|
||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.core.WritableRegistry; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.data.loot.BlockLootSubProvider; | ||
import net.minecraft.data.loot.LootTableProvider; | ||
import net.minecraft.util.ProblemReporter; | ||
import net.minecraft.world.flag.FeatureFlags; | ||
import net.minecraft.world.level.storage.loot.LootTable; | ||
import net.minecraft.world.level.storage.loot.ValidationContext; | ||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class WGLootTableProvider extends LootTableProvider { | ||
public WGLootTableProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries) { | ||
super(output, Set.of(), List.of(new SubProviderEntry(WGBlockLoot::new, LootContextParamSets.BLOCK)), registries); | ||
} | ||
|
||
@Override | ||
protected void validate(WritableRegistry<LootTable> registry, ValidationContext context, ProblemReporter.Collector collector) { | ||
// FIXME 需要核实正确写法 | ||
// map.forEach((key, value) -> LootTables.validate(context, key, value)); | ||
} | ||
|
||
public static class WGBlockLoot extends BlockLootSubProvider { | ||
protected WGBlockLoot(HolderLookup.Provider lookupProvider) { | ||
super(Set.of(), FeatureFlags.REGISTRY.allFlags(), lookupProvider); | ||
} | ||
|
||
@Override | ||
protected void generate() { | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+486 Bytes
src/main/resources/assets/whispergrove/textures/item/shu_fu_pian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.