本文整理汇总了Java中net.minecraft.util.Session.getSessionID方法的典型用法代码示例。如果您正苦于以下问题:Java Session.getSessionID方法的具体用法?Java Session.getSessionID怎么用?Java Session.getSessionID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.Session
的用法示例。
在下文中一共展示了Session.getSessionID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_146821_q
import net.minecraft.util.Session; //导入方法依赖的package包/类
private void func_146821_q()
{
Session var1 = this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
String var3 = var2.func_148708_h(this.field_146846_h);
Clipboard var4 = Toolkit.getDefaultToolkit().getSystemClipboard();
var4.setContents(new StringSelection(var3), (ClipboardOwner)null);
this.func_146823_a(var3);
}
catch (ExceptionMcoService var5)
{
logger.error("Couldn\'t download world data");
}
}
示例2: func_146778_a
import net.minecraft.util.Session; //导入方法依赖的package包/类
private void func_146778_a(long p_146778_1_)
{
Session var3 = this.mc.getSession();
McoClient var4 = new McoClient(var3.getSessionID(), var3.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
ValueObjectSubscription var5 = var4.func_148705_g(p_146778_1_);
this.field_146785_r = var5.field_148789_b;
this.field_146784_s = this.func_146776_b(var5.field_148790_a);
}
catch (ExceptionMcoService var6)
{
logger.error("Couldn\'t get subscription");
}
catch (IOException var7)
{
logger.error("Couldn\'t parse response subscribing");
}
}
示例3: func_146816_h
import net.minecraft.util.Session; //导入方法依赖的package包/类
private void func_146816_h()
{
Session var1 = this.mc.getSession();
final McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
(new Thread()
{
private static final String __OBFID = "CL_00000771";
public void run()
{
try
{
GuiScreenBuyRealms.this.field_146820_h = var2.func_148690_i();
}
catch (ExceptionMcoService var2x)
{
GuiScreenBuyRealms.logger.error("Could not get stat");
}
}
}).start();
}
示例4: func_146677_c
import net.minecraft.util.Session; //导入方法依赖的package包/类
private McoServer func_146677_c(long p_146677_1_)
{
Session var3 = this.mc.getSession();
McoClient var4 = new McoClient(var3.getSessionID(), var3.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
return var4.func_148709_a(p_146677_1_);
}
catch (ExceptionMcoService var6)
{
logger.error("Couldn\'t get own world");
}
catch (IOException var7)
{
logger.error("Couldn\'t parse response getting own world");
}
return null;
}
示例5: func_146853_g
import net.minecraft.util.Session; //导入方法依赖的package包/类
private void func_146853_g()
{
Session var1 = this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
String var3 = this.field_146863_h.getText() != null && !this.field_146863_h.getText().trim().equals("") ? this.field_146863_h.getText() : null;
var2.func_148689_a(this.field_146861_r.field_148812_a, this.field_146864_i.getText(), var3, this.field_146854_w.field_148402_e, this.field_146854_w.field_148399_f);
this.field_146861_r.func_148803_a(this.field_146864_i.getText());
this.field_146861_r.func_148804_b(this.field_146863_h.getText());
this.field_146861_r.field_148820_i = this.field_146854_w.field_148402_e;
this.field_146861_r.field_148817_j = this.field_146854_w.field_148399_f;
this.mc.displayGuiScreen(new GuiScreenConfigureWorld(this.field_146857_g, this.field_146861_r));
}
catch (ExceptionMcoService var4)
{
logger.error("Couldn\'t edit world");
}
catch (UnsupportedEncodingException var5)
{
logger.error("Couldn\'t edit world");
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:25,代码来源:GuiScreenEditOnlineWorld.java
示例6: func_146768_g
import net.minecraft.util.Session; //导入方法依赖的package包/类
private void func_146768_g()
{
Session var1 = this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
var2.func_148714_h();
GuiScreenLongRunningTask var3 = new GuiScreenLongRunningTask(this.mc, this, new TaskOnlineConnect(this, this.field_146771_g));
var3.func_146902_g();
this.mc.displayGuiScreen(var3);
}
catch (ExceptionMcoService var4)
{
logger.error("Couldn\'t agree to TOS");
}
}
示例7: func_146876_g
import net.minecraft.util.Session; //导入方法依赖的package包/类
private void func_146876_g()
{
Session var1 = this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
Boolean var3 = var2.func_148692_e(this.field_146885_g.field_148812_a);
if (var3.booleanValue())
{
this.field_146883_D = true;
this.field_146885_g.field_148808_d = "OPEN";
this.initGui();
}
}
catch (ExceptionMcoService var4)
{
logger.error("Couldn\'t open world");
}
catch (IOException var5)
{
logger.error("Could not parse response opening world");
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:GuiScreenConfigureWorld.java
示例8: func_146882_h
import net.minecraft.util.Session; //导入方法依赖的package包/类
private void func_146882_h()
{
Session var1 = this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
boolean var3 = var2.func_148700_f(this.field_146885_g.field_148812_a).booleanValue();
if (var3)
{
this.field_146883_D = true;
this.field_146885_g.field_148808_d = "CLOSED";
this.initGui();
}
}
catch (ExceptionMcoService var4)
{
logger.error("Couldn\'t close world");
}
catch (IOException var5)
{
logger.error("Could not parse response closing world");
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:GuiScreenConfigureWorld.java
示例9: func_140005_i
import net.minecraft.util.Session; //导入方法依赖的package包/类
protected void func_140005_i()
{
Session var1 = this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.9", Minecraft.getMinecraft().getProxy());
try
{
if (var2.func_148695_c().booleanValue())
{
this.mc.displayGuiScreen(new GuiScreenClientOutdated(this));
}
else
{
this.mc.displayGuiScreen(new GuiScreenOnlineServers(this));
}
}
catch (ExceptionMcoService var4)
{
logger.error("Couldn\'t connect to realms");
}
catch (IOException var5)
{
logger.error("Couldn\'t connect to realms");
}
}
示例10: run
import net.minecraft.util.Session; //导入方法依赖的package包/类
public void run()
{
String var1 = I18n.format("mco.create.world.wait", new Object[0]);
this.func_148417_b(var1);
Session var2 = GuiScreenCreateOnlineWorld.this.mc.getSession();
McoClient var3 = new McoClient(var2.getSessionID(), var2.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
if (this.field_148426_d != null)
{
var3.func_148707_a(this.field_148427_c, this.field_148426_d.field_148787_a);
}
else
{
var3.func_148707_a(this.field_148427_c, "-1");
}
GuiScreenCreateOnlineWorld.this.mc.displayGuiScreen(GuiScreenCreateOnlineWorld.this.field_146758_f);
}
catch (ExceptionMcoService var5)
{
GuiScreenCreateOnlineWorld.logger.error("Couldn\'t create world");
this.func_148416_a(var5.toString());
}
catch (UnsupportedEncodingException var6)
{
GuiScreenCreateOnlineWorld.logger.error("Couldn\'t create world");
this.func_148416_a(var6.getLocalizedMessage());
}
catch (Exception var8)
{
GuiScreenCreateOnlineWorld.logger.error("Could not create world");
this.func_148416_a(var8.getLocalizedMessage());
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:37,代码来源:GuiScreenCreateOnlineWorld.java
示例11: confirmClicked
import net.minecraft.util.Session; //导入方法依赖的package包/类
public void confirmClicked(boolean par1, int par2)
{
if (par2 == 3)
{
if (par1)
{
Session var3 = this.mc.getSession();
McoClient var4 = new McoClient(var3.getSessionID(), var3.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
try
{
var4.func_148694_a(this.field_146885_g.field_148812_a, this.field_146894_u);
}
catch (ExceptionMcoService var6)
{
logger.error("Couldn\'t uninvite user");
}
this.func_146875_d(this.field_146895_t);
}
this.mc.displayGuiScreen(new GuiScreenConfigureWorld(this.field_146884_f, this.field_146885_g));
}
if (par2 == 1)
{
if (par1)
{
this.func_146882_h();
}
this.mc.displayGuiScreen(this);
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:35,代码来源:GuiScreenConfigureWorld.java
示例12: sessionId
import net.minecraft.util.Session; //导入方法依赖的package包/类
public static String sessionId()
{
Session session = Minecraft.getMinecraft().getSession();
return session == null ? null : session.getSessionID();
}
示例13: run
import net.minecraft.util.Session; //导入方法依赖的package包/类
public void run()
{
this.func_148417_b(I18n.format("mco.backup.restoring", new Object[0]));
try
{
if (this.func_148418_c())
{
return;
}
Session var1 = GuiScreenBackup.this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
var2.func_148712_c(GuiScreenBackup.this.field_146846_h, this.field_148424_c.field_148780_a);
try
{
Thread.sleep(1000L);
}
catch (InterruptedException var4)
{
Thread.currentThread().interrupt();
}
if (this.func_148418_c())
{
return;
}
this.func_148413_b().displayGuiScreen(GuiScreenBackup.this.field_146842_g);
}
catch (ExceptionMcoService var5)
{
if (this.func_148418_c())
{
return;
}
GuiScreenBackup.logger.error("Couldn\'t restore backup");
this.func_148416_a(var5.toString());
}
catch (Exception var6)
{
if (this.func_148418_c())
{
return;
}
GuiScreenBackup.logger.error("Couldn\'t restore backup");
this.func_148416_a(var6.getLocalizedMessage());
}
}
示例14: run
import net.minecraft.util.Session; //导入方法依赖的package包/类
public void run()
{
Session var1 = GuiScreenResetWorld.this.mc.getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
String var3 = I18n.format("mco.reset.world.resetting.screen.title", new Object[0]);
this.func_148417_b(var3);
try
{
if (this.func_148418_c())
{
return;
}
if (this.field_148421_e != null)
{
var2.func_148696_e(this.field_148422_c, this.field_148421_e.field_148787_a);
}
else
{
var2.func_148699_d(this.field_148422_c, this.field_148420_d);
}
if (this.func_148418_c())
{
return;
}
GuiScreenResetWorld.this.mc.displayGuiScreen(GuiScreenResetWorld.this.field_146742_f);
}
catch (ExceptionMcoService var5)
{
if (this.func_148418_c())
{
return;
}
GuiScreenResetWorld.logger.error("Couldn\'t reset world");
this.func_148416_a(var5.toString());
}
catch (Exception var6)
{
if (this.func_148418_c())
{
return;
}
GuiScreenResetWorld.logger.error("Couldn\'t reset world");
this.func_148416_a(var6.toString());
}
}
示例15: run
import net.minecraft.util.Session; //导入方法依赖的package包/类
public void run()
{
this.func_148417_b(I18n.format("mco.connect.connecting", new Object[0]));
Session var1 = this.func_148413_b().getSession();
McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy());
boolean var3 = false;
boolean var4 = false;
int var5 = 5;
McoServerAddress var6 = null;
boolean var7 = false;
for (int var8 = 0; var8 < 10 && !this.func_148418_c(); ++var8)
{
try
{
var6 = var2.func_148688_b(this.field_148437_e.field_148812_a);
var3 = true;
}
catch (ExceptionRetryCall var10)
{
var5 = var10.field_148832_d;
}
catch (ExceptionMcoService var11)
{
if (var11.field_148830_c == 6002)
{
var7 = true;
}
else
{
var4 = true;
this.func_148416_a(var11.toString());
logger.error("Couldn\'t connect to world", var11);
}
break;
}
catch (IOException var12)
{
logger.error("Couldn\'t parse response connecting to world", var12);
}
catch (Exception var13)
{
var4 = true;
logger.error("Couldn\'t connect to world", var13);
this.func_148416_a(var13.getLocalizedMessage());
}
if (var3)
{
break;
}
this.func_148429_a(var5);
}
if (var7)
{
this.func_148413_b().displayGuiScreen(new GuiScreenReamlsTOS(this.field_148435_f, this.field_148437_e));
}
else if (!this.func_148418_c() && !var4)
{
if (var3)
{
ServerAddress var14 = ServerAddress.func_78860_a(var6.field_148770_a);
this.func_148432_a(var14.getIP(), var14.getPort());
}
else
{
this.func_148413_b().displayGuiScreen(this.field_148435_f);
}
}
}