generated from neoforged/MDK
-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
277b13e
commit 6259eae
Showing
10 changed files
with
189 additions
and
69 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
9 changes: 8 additions & 1 deletion
9
src/main/java/com/github/minecraftschurlimods/bibliocraft/Bibliocraft.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 |
---|---|---|
@@ -1,9 +1,16 @@ | ||
package com.github.minecraftschurlimods.bibliocraft; | ||
|
||
import com.github.minecraftschurlimods.bibliocraft.api.BibliocraftApi; | ||
import net.neoforged.fml.ModContainer; | ||
import net.neoforged.fml.common.Mod; | ||
import net.neoforged.fml.config.ModConfig; | ||
import net.neoforged.neoforge.client.gui.ConfigurationScreen; | ||
import net.neoforged.neoforge.client.gui.IConfigScreenFactory; | ||
|
||
@Mod(BibliocraftApi.MOD_ID) | ||
public final class Bibliocraft { | ||
public Bibliocraft() {} | ||
public Bibliocraft(ModContainer container) { | ||
container.registerConfig(ModConfig.Type.CLIENT, Config.SPEC); | ||
container.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new); | ||
} | ||
} |
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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/github/minecraftschurlimods/bibliocraft/Config.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,33 @@ | ||
package com.github.minecraftschurlimods.bibliocraft; | ||
|
||
import com.github.minecraftschurlimods.bibliocraft.api.BibliocraftApi; | ||
import net.neoforged.neoforge.common.ModConfigSpec; | ||
|
||
public final class Config { | ||
public static final ModConfigSpec SPEC; | ||
public static final ModConfigSpec.BooleanValue JEI_SHOW_WOOD_TYPES; | ||
public static final ModConfigSpec.BooleanValue JEI_SHOW_COLOR_TYPES; | ||
|
||
static { | ||
ModConfigSpec.Builder builder = new ModConfigSpec.Builder(); | ||
builder | ||
.comment("Contains compatibility options.") | ||
.translation("config." + BibliocraftApi.MOD_ID + ".compatibility") | ||
.push("compatibility"); | ||
builder | ||
.comment("Contains compatibility options for the JEI mod.") | ||
.translation("config." + BibliocraftApi.MOD_ID + ".compatibility.jei") | ||
.push("compatibility"); | ||
JEI_SHOW_WOOD_TYPES = builder | ||
.comment("Whether to show blocks for all wood types in JEI, or just the default oak.") | ||
.translation("config." + BibliocraftApi.MOD_ID + ".compatibility.jei.show_wood_types") | ||
.define("show_wood_types", true); | ||
JEI_SHOW_COLOR_TYPES = builder | ||
.comment("Whether to show blocks for all color types in JEI, or just the default white.") | ||
.translation("config." + BibliocraftApi.MOD_ID + ".compatibility.jei.show_color_types") | ||
.define("show_color_types", true); | ||
builder.pop(); | ||
builder.pop(); | ||
SPEC = builder.build(); | ||
} | ||
} |
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
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
26 changes: 26 additions & 0 deletions
26
...in/java/com/github/minecraftschurlimods/bibliocraft/util/init/GroupingDeferredHolder.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,26 @@ | ||
package com.github.minecraftschurlimods.bibliocraft.util.init; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
import net.neoforged.neoforge.registries.DeferredHolder; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Represents a group of {@link DeferredHolder}s. | ||
*/ | ||
public interface GroupingDeferredHolder<R, T extends R> { | ||
/** | ||
* @return An immutable collection of all {@link DeferredHolder}s in this object. | ||
*/ | ||
Collection<DeferredHolder<R, T>> holders(); | ||
|
||
/** | ||
* @return An immutable collection of values of all {@link DeferredHolder}s in this object. | ||
*/ | ||
Collection<T> values(); | ||
|
||
/** | ||
* @return An immutable collection of ids of all {@link DeferredHolder}s in this object. | ||
*/ | ||
Collection<ResourceLocation> ids(); | ||
} |
Oops, something went wrong.