Merge pull request #1590 from alexgeek/master

Fix for botania-share command for non Botania lexicon entries
This commit is contained in:
Vasco Lavos committed 2015-11-29 14:26:44 +00:00
commit c78e3fc40e
3 files changed
+9 -9

No files matched your search

@@ -2,10 +2,10 @@
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
*
* File Created @ [Jan 14, 2014, 6:47:06 PM (GMT)]
*/
package vazkii.botania.client.gui.lexicon;
@@ -161,7 +161,7 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
break;
case 3 :
Minecraft mc = Minecraft.getMinecraft();
String cmd = "/botania-share " + entry.unlocalizedName;
String cmd = "/botania-share " + entry.getUnlocalizedName();
mc.ingameGUI.getChatGUI().addToSentMessages(cmd);
mc.thePlayer.sendChatMessage(cmd);
@@ -2,10 +2,10 @@
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
*
* File Created @ [Sep 23, 2014, 8:06:49 PM (GMT)]
*/
package vazkii.botania.common.core.command;
@@ -34,7 +34,7 @@ public class CommandShare extends CommandBase {
String json = StatCollector.translateToLocal("botaniamisc.shareMsg");
json = json.replaceAll("%name%", sender.getCommandSenderName());
json = json.replaceAll("%entry%", args[0]);
json = json.replaceAll("%entryname%", StatCollector.translateToLocal("botania.entry." + args[0]));
json = json.replaceAll("%entryname%", StatCollector.translateToLocal(args[0]));
IChatComponent component = IChatComponent.Serializer.func_150699_a(json);
MinecraftServer.getServer().getConfigurationManager().sendChatMsg(component);
@@ -2,10 +2,10 @@
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
*
* File Created @ [Jan 14, 2014, 5:53:00 PM (GMT)]
*/
package vazkii.botania.common.item;
@@ -200,7 +200,7 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
String force = getForcedPage(stack);
for(LexiconEntry entry : BotaniaAPI.getAllEntries())
if(entry.unlocalizedName.equals(force))
if(entry.getUnlocalizedName().equals(force))
if(entry != null && ((ItemLexicon) stack.getItem()).isKnowledgeUnlocked(stack, entry.getKnowledgeType()))
return entry;