guimanual now uses bookdata not hardcoded defaults

This commit is contained in:
Progwml6 committed 2014-01-26 17:05:12 -05:00
1 parent e6f40ed8e2
commit 2b1e20e02c
4 files changed
+27 -12

No files matched your search

+4 -3
View File
@@ -1,5 +1,6 @@
package mantle.client;
import mantle.books.BookData;
import mantle.books.BookDataStore;
import mantle.common.MProxyCommon;
@@ -60,13 +61,13 @@ public class MProxyClient extends MProxyCommon
if (ID == manualGuiID)
{
ItemStack stack = player.getCurrentEquippedItem();
return new GuiManual(stack, MProxyClient.getManualFromStack(stack));
return new GuiManual(stack, MProxyClient.getBookDataFromStack(stack));
}
return null;
}
private static Document getManualFromStack (ItemStack stack)
private static BookData getBookDataFromStack (ItemStack stack)
{
return BookDataStore.getBookFromName(stack.getItem().getUnlocalizedName()).getDoc();
return BookDataStore.getBookFromName(stack.getItem().getUnlocalizedName());
}
}