Allow scrolls to be placed in bookshelves and add in-world textures for them
This commit is contained in:
@@ -237,14 +237,28 @@ public class BlockBookshelf extends BlockHorizontal implements ITileEntityProvid
|
||||
public static void registerStandardBookModelTextures(){
|
||||
// Vanilla Minecraft books
|
||||
// Regular brown books are the default so they're registered first
|
||||
registerBookModelTexture(() -> Items.BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_brown"));
|
||||
registerBookModelTexture(() -> Items.WRITABLE_BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_brown"));
|
||||
registerBookModelTexture(() -> Items.WRITTEN_BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_brown"));
|
||||
registerBookModelTexture(() -> Items.ENCHANTED_BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_enchanted"));
|
||||
registerBookModelTexture(() -> Items.BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_brown"));
|
||||
registerBookModelTexture(() -> Items.WRITABLE_BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_brown"));
|
||||
registerBookModelTexture(() -> Items.WRITTEN_BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_brown"));
|
||||
registerBookModelTexture(() -> Items.ENCHANTED_BOOK, new ResourceLocation(Wizardry.MODID, "blocks/books_enchanted"));
|
||||
// Wizardry books
|
||||
registerBookModelTexture(() -> WizardryItems.spell_book, new ResourceLocation(Wizardry.MODID, "blocks/books_red"));
|
||||
registerBookModelTexture(() -> WizardryItems.wizard_handbook, new ResourceLocation(Wizardry.MODID, "blocks/books_blue"));
|
||||
registerBookModelTexture(() -> WizardryItems.arcane_tome, new ResourceLocation(Wizardry.MODID, "blocks/books_purple"));
|
||||
registerBookModelTexture(() -> WizardryItems.spell_book, new ResourceLocation(Wizardry.MODID, "blocks/books_red"));
|
||||
registerBookModelTexture(() -> WizardryItems.wizard_handbook, new ResourceLocation(Wizardry.MODID, "blocks/books_blue"));
|
||||
registerBookModelTexture(() -> WizardryItems.arcane_tome, new ResourceLocation(Wizardry.MODID, "blocks/books_purple"));
|
||||
registerBookModelTexture(() -> WizardryItems.scroll, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_blue"));
|
||||
registerBookModelTexture(() -> WizardryItems.blank_scroll, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_blue"));
|
||||
registerBookModelTexture(() -> WizardryItems.identification_scroll, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_purple"));
|
||||
registerBookModelTexture(() -> WizardryItems.armour_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_red"));
|
||||
// Can't use the map in WandHelper because this is called from preInit (addons will have to add theirs manually)
|
||||
registerBookModelTexture(() -> WizardryItems.storage_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.siphon_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.condenser_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.range_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.duration_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.cooldown_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.blast_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.attunement_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
registerBookModelTexture(() -> WizardryItems.melee_upgrade, new ResourceLocation(Wizardry.MODID, "blocks/scrolls_wooden"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -122,13 +122,27 @@ public class ContainerBookshelf extends Container {
|
||||
|
||||
/** Called from {@link Wizardry#init(FMLInitializationEvent)} to register the default book items. */
|
||||
public static void initDefaultBookItems(){
|
||||
registerBookItem(WizardryItems.spell_book);
|
||||
registerBookItem(WizardryItems.arcane_tome);
|
||||
registerBookItem(WizardryItems.wizard_handbook);
|
||||
registerBookItem(Items.BOOK);
|
||||
registerBookItem(Items.WRITTEN_BOOK);
|
||||
registerBookItem(Items.WRITABLE_BOOK);
|
||||
registerBookItem(Items.ENCHANTED_BOOK);
|
||||
registerBookItem(WizardryItems.spell_book);
|
||||
registerBookItem(WizardryItems.arcane_tome);
|
||||
registerBookItem(WizardryItems.wizard_handbook);
|
||||
registerBookItem(WizardryItems.scroll);
|
||||
registerBookItem(WizardryItems.blank_scroll);
|
||||
registerBookItem(WizardryItems.identification_scroll);
|
||||
registerBookItem(WizardryItems.armour_upgrade);
|
||||
// Not using the map in WandHelper for consistency with BlockBookshelf (again, addons must add theirs manually)
|
||||
registerBookItem(WizardryItems.storage_upgrade);
|
||||
registerBookItem(WizardryItems.siphon_upgrade);
|
||||
registerBookItem(WizardryItems.condenser_upgrade);
|
||||
registerBookItem(WizardryItems.range_upgrade);
|
||||
registerBookItem(WizardryItems.duration_upgrade);
|
||||
registerBookItem(WizardryItems.cooldown_upgrade);
|
||||
registerBookItem(WizardryItems.blast_upgrade);
|
||||
registerBookItem(WizardryItems.attunement_upgrade);
|
||||
registerBookItem(WizardryItems.melee_upgrade);
|
||||
}
|
||||
|
||||
public class SlotBookshelf extends Slot {
|
||||
|
||||
Reference in New Issue
Block a user