aboutsummaryrefslogtreecommitdiff
path: root/src/Java/binnie/core/proxy/BinnieModProxy.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-01-20 14:24:34 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-01-20 14:24:34 +1000
commit869c206c4fcc8001bd2e1d66f704290331813835 (patch)
tree96735ce8fe4665e2759c3374221d6f06f4527df2 /src/Java/binnie/core/proxy/BinnieModProxy.java
parentec2c72827f01dd4bb2174137f1ab162f9ddaab62 (diff)
downloadGT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.gz
GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.tar.bz2
GT5-Unofficial-869c206c4fcc8001bd2e1d66f704290331813835.zip
Initial Commit
Diffstat (limited to 'src/Java/binnie/core/proxy/BinnieModProxy.java')
-rw-r--r--src/Java/binnie/core/proxy/BinnieModProxy.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/Java/binnie/core/proxy/BinnieModProxy.java b/src/Java/binnie/core/proxy/BinnieModProxy.java
new file mode 100644
index 0000000000..a6697b384f
--- /dev/null
+++ b/src/Java/binnie/core/proxy/BinnieModProxy.java
@@ -0,0 +1,67 @@
+package binnie.core.proxy;
+
+import binnie.Binnie;
+import binnie.core.AbstractMod;
+import binnie.core.BinnieCore;
+import binnie.core.gui.IBinnieGUID;
+import binnie.core.language.ManagerLanguage;
+import binnie.core.network.packet.MessageBase;
+import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.util.IIcon;
+
+public class BinnieModProxy
+ implements IBinnieModProxy
+{
+ private AbstractMod mod;
+
+ public BinnieModProxy(AbstractMod mod)
+ {
+ this.mod = mod;
+ }
+
+ public void openGui(IBinnieGUID ID, EntityPlayer player, int x, int y, int z)
+ {
+ BinnieCore.proxy.openGui(this.mod, ID.ordinal(), player, x, y, z);
+ }
+
+ public void sendToAll(MessageBase packet)
+ {
+ this.mod.getNetworkWrapper().sendToAll(packet.GetMessage());
+ }
+
+ public void sendToPlayer(MessageBase packet, EntityPlayer entityplayer)
+ {
+ if ((entityplayer instanceof EntityPlayerMP)) {
+ this.mod.getNetworkWrapper().sendTo(packet.GetMessage(), (EntityPlayerMP)entityplayer);
+ }
+ }
+
+ public void sendToServer(MessageBase packet)
+ {
+ this.mod.getNetworkWrapper().sendToServer(packet.GetMessage());
+ }
+
+ public IIcon getIcon(IIconRegister register, String string)
+ {
+ return BinnieCore.proxy.getIcon(register, this.mod.getModID(), string);
+ }
+
+ public void preInit() {}
+
+ public void init() {}
+
+ public void postInit() {}
+
+ public String localise(String string)
+ {
+ return Binnie.Language.localise(this.mod, string);
+ }
+
+ public String localiseOrBlank(String string)
+ {
+ return Binnie.Language.localiseOrBlank(this.mod, string);
+ }
+}