mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 06:52:58 +00:00
And getting ready to start off the Lexicon GUI.
This commit is contained in:
1 parent
0305f7db93
commit
708c8b4bff
11 files changed
+158
-6
No files matched your search
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:48:41 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.internal;
|
||||
|
||||
/**
|
||||
* Internal interface for the Lexicon Entry GUI. This contains
|
||||
* everything that can be accessed from it. It's safe to cast
|
||||
* this type to GuiScreen.
|
||||
*/
|
||||
public interface IGuiLexiconEntry {
|
||||
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package vazkii.botania.api.page;
|
||||
|
||||
import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public abstract class LexiconPage {
|
||||
@@ -27,7 +28,7 @@ public abstract class LexiconPage {
|
||||
* @param x The leftmost part of the gui.
|
||||
* @param y The top part of the gui.
|
||||
*/
|
||||
public abstract void renderScreen(GuiScreen gui, int x, int y);
|
||||
public abstract void renderScreen(IGuiLexiconEntry gui, int x, int y);
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
return unlocalizedName;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
package vazkii.botania.api.page;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
|
||||
/**
|
||||
* A dummy page. It does absolutely nothing and is only
|
||||
@@ -25,7 +25,7 @@ public class PageDummy extends LexiconPage {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderScreen(GuiScreen gui, int x, int y) {
|
||||
public void renderScreen(IGuiLexiconEntry gui, int x, int y) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:48:05 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class GuiLexicon extends GuiScreen {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:47:06 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
|
||||
import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
|
||||
public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:46:59 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
|
||||
public class GuiLexiconIndex extends GuiLexicon {
|
||||
|
||||
}
|
||||
@@ -11,16 +11,23 @@
|
||||
*/
|
||||
package vazkii.botania.common.core.proxy;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.core.handler.InternalMethodHandler;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.network.GuiHandler;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
BotaniaAPI.internalHandler = new InternalMethodHandler();
|
||||
|
||||
ConfigHandler.loadConfig(event.getSuggestedConfigurationFile());
|
||||
|
||||
ModBlocks.init();
|
||||
@@ -28,7 +35,7 @@ public class CommonProxy {
|
||||
}
|
||||
|
||||
public void init(FMLInitializationEvent event) {
|
||||
|
||||
NetworkRegistry.instance().registerGuiHandler(Botania.instance, new GuiHandler());
|
||||
}
|
||||
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:50:36 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.lib;
|
||||
|
||||
public final class LibGuiIDs {
|
||||
|
||||
public static final int LEXICON = 0;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:50:15 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import vazkii.botania.client.gui.GuiLexiconIndex;
|
||||
import vazkii.botania.common.lib.LibGuiIDs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public class GuiHandler implements IGuiHandler {
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
switch(ID) {
|
||||
case LibGuiIDs.LEXICON :
|
||||
return new GuiLexiconIndex();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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 a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:50:09 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
public class PacketManager { // TOOD
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
package vazkii.botania.common.page;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
import vazkii.botania.api.page.LexiconPage;
|
||||
|
||||
public class PageText extends LexiconPage {
|
||||
@@ -21,7 +21,7 @@ public class PageText extends LexiconPage {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderScreen(GuiScreen gui, int x, int y) {
|
||||
public void renderScreen(IGuiLexiconEntry gui, int x, int y) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user