Lexica Botania in-world lookup now needs sneaking.

This commit is contained in:
Vasco Lavos committed 2014-02-15 15:00:39 +00:00
1 parent e3c50b1b22
commit df5bee29cc
2 files changed
+12 -9

No files matched your search

@@ -33,17 +33,20 @@ public class ItemLexicon extends ItemMod {
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
int id = par3World.getBlockId(par4, par5, par6);
Block block = Block.blocksList[id];
if(par2EntityPlayer.isSneaking()) {
int id = par3World.getBlockId(par4, par5, par6);
Block block = Block.blocksList[id];
if(block != null && block instanceof ILexiconable) {
LexiconEntry entry = ((ILexiconable) block).getEntry(par3World, par4, par5, par6, par2EntityPlayer, par1ItemStack);
if(entry != null) {
Botania.proxy.setEntryToOpen(entry);
par2EntityPlayer.openGui(Botania.instance, LibGuiIDs.LEXICON, par3World, 0, 0, 0);
return true;
if(block != null && block instanceof ILexiconable) {
LexiconEntry entry = ((ILexiconable) block).getEntry(par3World, par4, par5, par6, par2EntityPlayer, par1ItemStack);
if(entry != null) {
Botania.proxy.setEntryToOpen(entry);
par2EntityPlayer.openGui(Botania.instance, LibGuiIDs.LEXICON, par3World, 0, 0, 0);
return true;
}
}
}
return false;
}
+1 -1
View File
@@ -173,7 +173,7 @@ botania.category.misc=Miscellaneous
# - BASIC
# -- LEXICA BOTANIA
botania.entry.lexicon=Lexica Botania
botania.page.lexicon0=The &1Lexica Botania&0 is the repository of all knowledge for all botany related matters. But you probably knew that already.<br>All information is stored here, as expected. For convenience, if a block happens to have an entry in here, it can be right clicked with the Lexica Botania to open that entry.
botania.page.lexicon0=The &1Lexica Botania&0 is the repository of all knowledge for all botany related matters. But you probably knew that already.<br>All information is stored here, as expected. For convenience, if a block happens to have an entry, it can be shift-right clicked with the &1Lexica Botania&0 to open that entry.
botania.page.lexicon1=Crafting the &1Lexica Botania&0.
# -- MYSTICAL FLOWERS