mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Fixed /botania-share command to work with non-Botania lexicon entries.
This commit is contained in:
1 parent
b671094663
commit
2b62f61fd9
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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user