From 94a17a63c1e616968e8c08f993443d8c5b90403d Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Sat, 16 May 2020 22:24:14 +0100 Subject: [PATCH] Sync tile entity when book texture changes --- src/main/java/electroblob/wizardry/block/BlockBookshelf.java | 5 +++++ .../electroblob/wizardry/inventory/ContainerBookshelf.java | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/electroblob/wizardry/block/BlockBookshelf.java b/src/main/java/electroblob/wizardry/block/BlockBookshelf.java index 53935b17..041e2273 100644 --- a/src/main/java/electroblob/wizardry/block/BlockBookshelf.java +++ b/src/main/java/electroblob/wizardry/block/BlockBookshelf.java @@ -196,6 +196,11 @@ public class BlockBookshelf extends BlockHorizontal implements ITileEntityProvid return bookTextures == null ? ImmutableList.copyOf(BOOK_TEXTURE_MAP.values()) : bookTextures; } + /** Returns the list of registered book items, in ID order. */ + public static ImmutableList getBookItems(){ + return bookItems; + } + /** Called during block registration to initialise the block properties for each book. */ public static void initBookProperties(){ for(int i=0; i