mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Add nag that this is unofficial right now
This commit is contained in:
1 parent
103efe9c7b
commit
4b7608fc2a
2 files changed
+36
No files matched your search
@@ -10,6 +10,17 @@
|
||||
*/
|
||||
package vazkii.botania.common;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.event.ClickEvent;
|
||||
import net.minecraft.event.HoverEvent;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
||||
import vazkii.botania.common.core.handler.IMCHandler;
|
||||
import vazkii.botania.common.core.handler.ManaNetworkHandler;
|
||||
import vazkii.botania.common.core.proxy.CommonProxy;
|
||||
@@ -63,7 +74,28 @@ public class Botania {
|
||||
lightHelper = coloredLightsLoaded ? new LightHelperColored() : new LightHelperVanilla();
|
||||
|
||||
proxy.preInit(event);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent // todo temporary nag, remove when merging back into master
|
||||
public void nagUnofficial(PlayerEvent.PlayerLoggedInEvent evt) {
|
||||
EntityPlayer player = evt.player;
|
||||
|
||||
IChatComponent message = new ChatComponentTranslation("botaniamisc.unofficial.nag");
|
||||
message.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED).setUnderlined(true));
|
||||
|
||||
IChatComponent message2 = new ChatComponentTranslation("botaniamisc.unofficial.report");
|
||||
message2.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW));
|
||||
|
||||
IChatComponent url = new ChatComponentText("https://github.com/williewillus/Botania/issues");
|
||||
url.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/williewillus/Botania/issues"));
|
||||
url.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText("CLICK")));
|
||||
|
||||
player.addChatComponentMessage(message);
|
||||
|
||||
player.addChatComponentMessage(message2.appendSibling(url));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
proxy.init(event);
|
||||
|
||||
@@ -6,6 +6,10 @@ generator.botania-skyblock.info=Not recommended for botania newcomers
|
||||
# Something that is not localized, translators, do NOT change this line.
|
||||
botaniamisc.noloc=botaniamisc.noloc
|
||||
|
||||
# todo 1.8 remove when merging into master
|
||||
botaniamisc.unofficial.nag=WARNING !!!!! This port of Botania is UNOFFICIAL! Do NOT report bugs to Vazkii!!!
|
||||
botaniamisc.unofficial.report=Report issues to the porter HERE:
|
||||
|
||||
botaniamisc.nextPage=Next Page
|
||||
botaniamisc.prevPage=Previous Page
|
||||
botaniamisc.back=Back
|
||||
|
||||
Reference in new issue
Block a user