Allow any book to be placed in a bookshelf
- Modifies the bookshelf model and blockstate to choose a texture dynamically based on the book item - Changes bookshelf slots to accept all books from wizardry and vanilla minecraft by default - Adds a couple of hooks to allow addons to register their own book items and model textures - Adds a config option to allow modpack makers to add more book items
This commit is contained in:
@@ -296,6 +296,8 @@ public final class Settings {
|
||||
Wizardry.MODID + ":acacia_bookshelf",
|
||||
Wizardry.MODID + ":dark_oak_bookshelf"
|
||||
);
|
||||
/** <b>[Synchronised]</b> List of registry names of items that can be placed in a bookshelf. */
|
||||
public Pair<ResourceLocation, Short>[] bookItems = parseItemMetaStrings();
|
||||
|
||||
// Client-only settings. These settings only affect client-side code and hence are not synced. Each client obeys
|
||||
// its own values for these, and changing them on a dedicated server will have no effect.
|
||||
@@ -735,6 +737,11 @@ public final class Settings {
|
||||
bookshelfBlocks = parseItemMetaStrings(property.getStringList());
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(TWEAKS_CATEGORY, "bookItems", new String[0], "List of registry names of items which can be placed in a bookshelf, in addition to the defaults. Item names are not case sensitive. For mod items, prefix with the mod ID (e.g. thaumcraft:thaumonomicon).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".book_items");
|
||||
bookItems = parseItemMetaStrings(property.getStringList());
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(TWEAKS_CATEGORY, "bookshelfSearchRadius", 4,
|
||||
"The maximum number of blocks a bookshelf can be from an arcane workbench or lectern to be able to link to it.",
|
||||
1, 10);
|
||||
|
||||
Reference in New Issue
Block a user