607 lines
27 KiB
Diff
607 lines
27 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
|
|
@@ -344,7 +344,6 @@
|
|
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
|
|
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
|
|
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
|
|
- field_147123_G.debug("(Session ID is {})", (Object)this.field_71449_j.func_111286_b());
|
|
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
|
this.field_71443_c = p_i45547_1_.field_178743_b.field_178764_a > 0 ? p_i45547_1_.field_178743_b.field_178764_a : 1;
|
|
this.field_71440_d = p_i45547_1_.field_178743_b.field_178762_b > 0 ? p_i45547_1_.field_178743_b.field_178762_b : 1;
|
|
@@ -464,10 +463,10 @@
|
|
this.field_110451_am = new SimpleReloadableResourceManager(this.field_110452_an);
|
|
this.field_135017_as = new LanguageManager(this.field_110452_an, this.field_71474_y.field_74363_ab);
|
|
this.field_110451_am.func_110542_a(this.field_135017_as);
|
|
- this.func_110436_a();
|
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao, this.field_110451_am, this.field_110452_an);
|
|
this.field_71446_o = new TextureManager(this.field_110451_am);
|
|
this.field_110451_am.func_110542_a(this.field_71446_o);
|
|
- this.func_180510_a(this.field_71446_o);
|
|
+ net.minecraftforge.fml.client.SplashProgress.drawVanillaScreen(this.field_71446_o);
|
|
this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az);
|
|
this.field_71469_aa = new AnvilSaveConverter(new File(this.field_71412_D, "saves"), this.field_184131_U);
|
|
this.field_147127_av = new SoundHandler(this.field_110451_am, this.field_71474_y);
|
|
@@ -487,6 +486,8 @@
|
|
this.field_110451_am.func_110542_a(new GrassColorReloadListener());
|
|
this.field_110451_am.func_110542_a(new FoliageColorReloadListener());
|
|
this.field_71417_B = new MouseHelper();
|
|
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar= net.minecraftforge.fml.common.ProgressManager.push("Rendering Setup", 5, true);
|
|
+ bar.step("GL Setup");
|
|
this.func_71361_d("Pre startup");
|
|
GlStateManager.func_179098_w();
|
|
GlStateManager.func_179103_j(7425);
|
|
@@ -500,19 +501,24 @@
|
|
GlStateManager.func_179096_D();
|
|
GlStateManager.func_179128_n(5888);
|
|
this.func_71361_d("Startup");
|
|
+ bar.step("Loading Texture Map");
|
|
this.field_147128_au = new TextureMap("textures");
|
|
this.field_147128_au.func_147633_a(this.field_71474_y.field_151442_I);
|
|
this.field_71446_o.func_110580_a(TextureMap.field_110575_b, this.field_147128_au);
|
|
this.field_71446_o.func_110577_a(TextureMap.field_110575_b);
|
|
this.field_147128_au.func_174937_a(false, this.field_71474_y.field_151442_I > 0);
|
|
+ bar.step("Loading Model Manager");
|
|
this.field_175617_aL = new ModelManager(this.field_147128_au);
|
|
this.field_110451_am.func_110542_a(this.field_175617_aL);
|
|
this.field_184127_aH = BlockColors.func_186723_a();
|
|
this.field_184128_aI = ItemColors.func_186729_a(this.field_184127_aH);
|
|
+ bar.step("Loading Item Renderer");
|
|
this.field_175621_X = new RenderItem(this.field_71446_o, this.field_175617_aL, this.field_184128_aI);
|
|
this.field_175616_W = new RenderManager(this.field_71446_o, this.field_175621_X);
|
|
this.field_175620_Y = new ItemRenderer(this);
|
|
this.field_110451_am.func_110542_a(this.field_175621_X);
|
|
+ bar.step("Loading Entity Renderer");
|
|
+ net.minecraftforge.fml.client.SplashProgress.pause();
|
|
this.field_71460_t = new EntityRenderer(this, this.field_110451_am);
|
|
this.field_110451_am.func_110542_a(this.field_71460_t);
|
|
this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_184127_aH);
|
|
@@ -523,23 +529,27 @@
|
|
this.field_110451_am.func_110542_a(this.field_193995_ae);
|
|
GlStateManager.func_179083_b(0, 0, this.field_71443_c, this.field_71440_d);
|
|
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
|
+ net.minecraftforge.fml.client.SplashProgress.resume();
|
|
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().finishMinecraftLoading();
|
|
this.func_71361_d("Post startup");
|
|
- this.field_71456_v = new GuiIngame(this);
|
|
+ this.field_71456_v = new net.minecraftforge.client.GuiIngameForge(this);
|
|
|
|
if (this.field_71475_ae != null)
|
|
{
|
|
- this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af));
|
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServerAtStartup(this.field_71475_ae, this.field_71477_af);
|
|
}
|
|
else
|
|
{
|
|
this.func_147108_a(new GuiMainMenu());
|
|
}
|
|
|
|
- this.field_71446_o.func_147645_c(this.field_152354_ay);
|
|
+ net.minecraftforge.fml.client.SplashProgress.clearVanillaResources(field_71446_o, field_152354_ay);
|
|
this.field_152354_ay = null;
|
|
this.field_71461_s = new LoadingScreenRenderer(this);
|
|
this.field_184132_p = new DebugRenderer(this);
|
|
|
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().onInitializationComplete();
|
|
if (this.field_71474_y.field_74353_u && !this.field_71431_Q)
|
|
{
|
|
this.func_71352_k();
|
|
@@ -748,21 +758,23 @@
|
|
File file2 = new File(file1, "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt");
|
|
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
|
|
|
|
+ int retVal;
|
|
if (p_71377_1_.func_71497_f() != null)
|
|
{
|
|
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
|
|
- System.exit(-1);
|
|
+ retVal = -1;
|
|
}
|
|
else if (p_71377_1_.func_147149_a(file2))
|
|
{
|
|
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
|
- System.exit(-1);
|
|
+ retVal = -1;
|
|
}
|
|
else
|
|
{
|
|
Bootstrap.func_179870_a("#@?@# Game crashed! Crash report could not be saved. #@?@#");
|
|
- System.exit(-2);
|
|
+ retVal = -2;
|
|
}
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleExit(retVal);
|
|
}
|
|
|
|
public boolean func_152349_b()
|
|
@@ -770,6 +782,7 @@
|
|
return this.field_135017_as.func_135042_a() || this.field_71474_y.field_151455_aw;
|
|
}
|
|
|
|
+ @Deprecated // Forge: Use selective refreshResources method in FMLClientHandler
|
|
public void func_110436_a()
|
|
{
|
|
List<IResourcePack> list = Lists.newArrayList(this.field_110449_ao);
|
|
@@ -955,11 +968,6 @@
|
|
|
|
public void func_147108_a(@Nullable GuiScreen p_147108_1_)
|
|
{
|
|
- if (this.field_71462_r != null)
|
|
- {
|
|
- this.field_71462_r.func_146281_b();
|
|
- }
|
|
-
|
|
if (p_147108_1_ == null && this.field_71441_e == null)
|
|
{
|
|
p_147108_1_ = new GuiMainMenu();
|
|
@@ -969,6 +977,17 @@
|
|
p_147108_1_ = new GuiGameOver((ITextComponent)null);
|
|
}
|
|
|
|
+ GuiScreen old = this.field_71462_r;
|
|
+ net.minecraftforge.client.event.GuiOpenEvent event = new net.minecraftforge.client.event.GuiOpenEvent(p_147108_1_);
|
|
+
|
|
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return;
|
|
+
|
|
+ p_147108_1_ = event.getGui();
|
|
+ if (old != null && p_147108_1_ != old)
|
|
+ {
|
|
+ old.func_146281_b();
|
|
+ }
|
|
+
|
|
if (p_147108_1_ instanceof GuiMainMenu || p_147108_1_ instanceof GuiMultiplayer)
|
|
{
|
|
this.field_71474_y.field_74330_P = false;
|
|
@@ -1082,7 +1101,7 @@
|
|
long i1 = System.nanoTime() - l;
|
|
this.func_71361_d("Pre render");
|
|
this.field_71424_I.func_76318_c("sound");
|
|
- this.field_147127_av.func_147691_a(this.field_71439_g, this.field_71428_T.field_194147_b);
|
|
+ this.field_147127_av.setListener(this.func_175606_aa(), this.field_71428_T.field_194147_b); //Forge: MC-46445 Spectator mode particles and sounds computed from where you have been before
|
|
this.field_71424_I.func_76319_b();
|
|
this.field_71424_I.func_76320_a("render");
|
|
GlStateManager.func_179094_E();
|
|
@@ -1094,11 +1113,13 @@
|
|
|
|
if (!this.field_71454_w)
|
|
{
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_194147_b);
|
|
this.field_71424_I.func_76318_c("gameRenderer");
|
|
this.field_71460_t.func_181560_a(this.field_71445_n ? this.field_193996_ah : this.field_71428_T.field_194147_b, i);
|
|
this.field_71424_I.func_76318_c("toasts");
|
|
this.field_193034_aS.func_191783_a(new ScaledResolution(this));
|
|
this.field_71424_I.func_76319_b();
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_194147_b);
|
|
}
|
|
|
|
this.field_71424_I.func_76319_b();
|
|
@@ -1455,9 +1476,9 @@
|
|
{
|
|
BlockPos blockpos = this.field_71476_x.func_178782_a();
|
|
|
|
- if (this.field_71441_e.func_180495_p(blockpos).func_185904_a() != Material.field_151579_a && this.field_71442_b.func_180512_c(blockpos, this.field_71476_x.field_178784_b))
|
|
+ if (!this.field_71441_e.func_175623_d(blockpos) && this.field_71442_b.func_180512_c(blockpos, this.field_71476_x.field_178784_b))
|
|
{
|
|
- this.field_71452_i.func_180532_a(blockpos, this.field_71476_x.field_178784_b);
|
|
+ this.field_71452_i.addBlockHitEffects(blockpos, this.field_71476_x);
|
|
this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND);
|
|
}
|
|
}
|
|
@@ -1491,7 +1512,7 @@
|
|
case BLOCK:
|
|
BlockPos blockpos = this.field_71476_x.func_178782_a();
|
|
|
|
- if (this.field_71441_e.func_180495_p(blockpos).func_185904_a() != Material.field_151579_a)
|
|
+ if (!this.field_71441_e.func_175623_d(blockpos))
|
|
{
|
|
this.field_71442_b.func_180511_b(blockpos, this.field_71476_x.field_178784_b);
|
|
break;
|
|
@@ -1505,6 +1526,7 @@
|
|
}
|
|
|
|
this.field_71439_g.func_184821_cY();
|
|
+ net.minecraftforge.common.ForgeHooks.onEmptyLeftClick(this.field_71439_g);
|
|
}
|
|
|
|
this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND);
|
|
@@ -1570,6 +1592,7 @@
|
|
}
|
|
}
|
|
|
|
+ if (itemstack.func_190926_b() && (this.field_71476_x == null || this.field_71476_x.field_72313_a == RayTraceResult.Type.MISS)) net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, enumhand);
|
|
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, enumhand) == EnumActionResult.SUCCESS)
|
|
{
|
|
this.field_71460_t.field_78516_c.func_187460_a(enumhand);
|
|
@@ -1630,6 +1653,11 @@
|
|
}
|
|
|
|
Display.setFullscreen(this.field_71431_Q);
|
|
+ if (!this.field_71431_Q) //Forge: Fix MC-68754, Screen is not resizeable after exiting fullscreen due to LWJGL bug https://github.com/LWJGL/lwjgl/issues/142 which is fixed, but not in the version MC ships
|
|
+ {
|
|
+ Display.setResizable(false);
|
|
+ Display.setResizable(true);
|
|
+ }
|
|
Display.setVSyncEnabled(this.field_71474_y.field_74352_v);
|
|
this.func_175601_h();
|
|
}
|
|
@@ -1676,6 +1704,8 @@
|
|
--this.field_71467_ac;
|
|
}
|
|
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick();
|
|
+
|
|
this.field_71424_I.func_76320_a("gui");
|
|
|
|
if (!this.field_71445_n)
|
|
@@ -1877,6 +1907,7 @@
|
|
}
|
|
|
|
this.field_71424_I.func_76319_b();
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostClientTick();
|
|
this.field_71423_H = func_71386_F();
|
|
}
|
|
|
|
@@ -1982,6 +2013,7 @@
|
|
}
|
|
}
|
|
}
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireKeyInput();
|
|
}
|
|
|
|
this.func_184117_aA();
|
|
@@ -2239,6 +2271,8 @@
|
|
{
|
|
while (Mouse.next())
|
|
{
|
|
+ if (net.minecraftforge.client.ForgeHooksClient.postMouseEvent()) continue;
|
|
+
|
|
int i = Mouse.getEventButton();
|
|
KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState());
|
|
|
|
@@ -2294,6 +2328,7 @@
|
|
this.field_71462_r.func_146274_d();
|
|
}
|
|
}
|
|
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireMouseInput();
|
|
}
|
|
}
|
|
|
|
@@ -2304,6 +2339,7 @@
|
|
|
|
public void func_71371_a(String p_71371_1_, String p_71371_2_, @Nullable WorldSettings p_71371_3_)
|
|
{
|
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().startIntegratedServer(p_71371_1_, p_71371_2_, p_71371_3_);
|
|
this.func_71403_a((WorldClient)null);
|
|
System.gc();
|
|
ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false);
|
|
@@ -2344,8 +2380,14 @@
|
|
|
|
this.field_71461_s.func_73720_a(I18n.func_135052_a("menu.loadingLevel"));
|
|
|
|
- while (!this.field_71437_Z.func_71200_ad())
|
|
+ while (!this.field_71437_Z.func_71200_ad() && !this.field_71437_Z.func_71241_aa())
|
|
{
|
|
+ if (!net.minecraftforge.fml.common.StartupQuery.check())
|
|
+ {
|
|
+ func_71403_a(null);
|
|
+ func_147108_a(null);
|
|
+ return;
|
|
+ }
|
|
String s = this.field_71437_Z.func_71195_b_();
|
|
|
|
if (s != null)
|
|
@@ -2371,8 +2413,14 @@
|
|
SocketAddress socketaddress = this.field_71437_Z.func_147137_ag().func_151270_a();
|
|
NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress);
|
|
networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null));
|
|
- networkmanager.func_179290_a(new C00Handshake(socketaddress.toString(), 0, EnumConnectionState.LOGIN));
|
|
- networkmanager.func_179290_a(new CPacketLoginStart(this.func_110432_I().func_148256_e()));
|
|
+ networkmanager.func_179290_a(new C00Handshake(socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
|
|
+ com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e();
|
|
+ if (!this.func_110432_I().hasCachedProperties())
|
|
+ {
|
|
+ gameProfile = field_152355_az.fillProfileProperties(gameProfile, true); //Forge: Fill profile properties upon game load. Fixes MC-52974.
|
|
+ this.func_110432_I().setProperties(gameProfile.getProperties());
|
|
+ }
|
|
+ networkmanager.func_179290_a(new CPacketLoginStart(gameProfile));
|
|
this.field_71453_ak = networkmanager;
|
|
}
|
|
|
|
@@ -2383,6 +2431,8 @@
|
|
|
|
public void func_71353_a(@Nullable WorldClient p_71353_1_, String p_71353_2_)
|
|
{
|
|
+ if (field_71441_e != null) net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
|
|
+
|
|
if (p_71353_1_ == null)
|
|
{
|
|
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
|
|
@@ -2395,6 +2445,18 @@
|
|
if (this.field_71437_Z != null && this.field_71437_Z.func_175578_N())
|
|
{
|
|
this.field_71437_Z.func_71263_m();
|
|
+ if (field_71461_s != null && this.field_71425_J)
|
|
+ {
|
|
+ this.field_71461_s.func_73719_c(I18n.func_135052_a("forge.client.shutdown.internal"));
|
|
+ }
|
|
+ while (!field_71437_Z.func_71241_aa())
|
|
+ {
|
|
+ try
|
|
+ {
|
|
+ Thread.sleep(10);
|
|
+ }
|
|
+ catch (InterruptedException ie) {}
|
|
+ }
|
|
}
|
|
|
|
this.field_71437_Z = null;
|
|
@@ -2418,6 +2480,7 @@
|
|
this.field_71456_v.func_181029_i();
|
|
this.func_71351_a((ServerData)null);
|
|
this.field_71455_al = false;
|
|
+ net.minecraftforge.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.field_71441_e);
|
|
}
|
|
|
|
this.field_147127_av.func_147690_c();
|
|
@@ -2434,6 +2497,7 @@
|
|
}
|
|
|
|
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_71353_1_);
|
|
+ net.minecraftforge.client.MinecraftForgeClient.clearRenderCache();
|
|
|
|
if (p_71353_1_ != null)
|
|
{
|
|
@@ -2488,6 +2552,7 @@
|
|
EntityPlayerSP entityplayersp = this.field_71439_g;
|
|
this.field_71439_g = this.field_71442_b.func_192830_a(this.field_71441_e, this.field_71439_g == null ? new StatisticsManager() : this.field_71439_g.func_146107_m(), this.field_71439_g == null ? new RecipeBook() : this.field_71439_g.func_192035_E());
|
|
this.field_71439_g.func_184212_Q().func_187218_a(entityplayersp.func_184212_Q().func_187231_c());
|
|
+ this.field_71439_g.updateSyncFields(entityplayersp); // Forge: fix MC-10657
|
|
this.field_71439_g.field_71093_bK = p_71354_1_;
|
|
this.field_175622_Z = this.field_71439_g;
|
|
this.field_71439_g.func_70065_x();
|
|
@@ -2535,159 +2600,8 @@
|
|
{
|
|
if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS)
|
|
{
|
|
- boolean flag = this.field_71439_g.field_71075_bZ.field_75098_d;
|
|
- TileEntity tileentity = null;
|
|
- ItemStack itemstack;
|
|
-
|
|
- if (this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK)
|
|
- {
|
|
- BlockPos blockpos = this.field_71476_x.func_178782_a();
|
|
- IBlockState iblockstate = this.field_71441_e.func_180495_p(blockpos);
|
|
- Block block = iblockstate.func_177230_c();
|
|
-
|
|
- if (iblockstate.func_185904_a() == Material.field_151579_a)
|
|
- {
|
|
- return;
|
|
- }
|
|
-
|
|
- itemstack = block.func_185473_a(this.field_71441_e, blockpos, iblockstate);
|
|
-
|
|
- if (itemstack.func_190926_b())
|
|
- {
|
|
- return;
|
|
- }
|
|
-
|
|
- if (flag && GuiScreen.func_146271_m() && block.func_149716_u())
|
|
- {
|
|
- tileentity = this.field_71441_e.func_175625_s(blockpos);
|
|
- }
|
|
- }
|
|
- else
|
|
- {
|
|
- if (this.field_71476_x.field_72313_a != RayTraceResult.Type.ENTITY || this.field_71476_x.field_72308_g == null || !flag)
|
|
- {
|
|
- return;
|
|
- }
|
|
-
|
|
- if (this.field_71476_x.field_72308_g instanceof EntityPainting)
|
|
- {
|
|
- itemstack = new ItemStack(Items.field_151159_an);
|
|
- }
|
|
- else if (this.field_71476_x.field_72308_g instanceof EntityLeashKnot)
|
|
- {
|
|
- itemstack = new ItemStack(Items.field_151058_ca);
|
|
- }
|
|
- else if (this.field_71476_x.field_72308_g instanceof EntityItemFrame)
|
|
- {
|
|
- EntityItemFrame entityitemframe = (EntityItemFrame)this.field_71476_x.field_72308_g;
|
|
- ItemStack itemstack1 = entityitemframe.func_82335_i();
|
|
-
|
|
- if (itemstack1.func_190926_b())
|
|
- {
|
|
- itemstack = new ItemStack(Items.field_151160_bD);
|
|
- }
|
|
- else
|
|
- {
|
|
- itemstack = itemstack1.func_77946_l();
|
|
- }
|
|
- }
|
|
- else if (this.field_71476_x.field_72308_g instanceof EntityMinecart)
|
|
- {
|
|
- EntityMinecart entityminecart = (EntityMinecart)this.field_71476_x.field_72308_g;
|
|
- Item item1;
|
|
-
|
|
- switch (entityminecart.func_184264_v())
|
|
- {
|
|
- case FURNACE:
|
|
- item1 = Items.field_151109_aJ;
|
|
- break;
|
|
- case CHEST:
|
|
- item1 = Items.field_151108_aI;
|
|
- break;
|
|
- case TNT:
|
|
- item1 = Items.field_151142_bV;
|
|
- break;
|
|
- case HOPPER:
|
|
- item1 = Items.field_151140_bW;
|
|
- break;
|
|
- case COMMAND_BLOCK:
|
|
- item1 = Items.field_151095_cc;
|
|
- break;
|
|
- default:
|
|
- item1 = Items.field_151143_au;
|
|
- }
|
|
-
|
|
- itemstack = new ItemStack(item1);
|
|
- }
|
|
- else if (this.field_71476_x.field_72308_g instanceof EntityBoat)
|
|
- {
|
|
- itemstack = new ItemStack(((EntityBoat)this.field_71476_x.field_72308_g).func_184455_j());
|
|
- }
|
|
- else if (this.field_71476_x.field_72308_g instanceof EntityArmorStand)
|
|
- {
|
|
- itemstack = new ItemStack(Items.field_179565_cj);
|
|
- }
|
|
- else if (this.field_71476_x.field_72308_g instanceof EntityEnderCrystal)
|
|
- {
|
|
- itemstack = new ItemStack(Items.field_185158_cP);
|
|
- }
|
|
- else
|
|
- {
|
|
- ResourceLocation resourcelocation = EntityList.func_191301_a(this.field_71476_x.field_72308_g);
|
|
-
|
|
- if (resourcelocation == null || !EntityList.field_75627_a.containsKey(resourcelocation))
|
|
- {
|
|
- return;
|
|
- }
|
|
-
|
|
- itemstack = new ItemStack(Items.field_151063_bx);
|
|
- ItemMonsterPlacer.func_185078_a(itemstack, resourcelocation);
|
|
- }
|
|
- }
|
|
-
|
|
- if (itemstack.func_190926_b())
|
|
- {
|
|
- String s = "";
|
|
-
|
|
- if (this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK)
|
|
- {
|
|
- s = ((ResourceLocation)Block.field_149771_c.func_177774_c(this.field_71441_e.func_180495_p(this.field_71476_x.func_178782_a()).func_177230_c())).toString();
|
|
- }
|
|
- else if (this.field_71476_x.field_72313_a == RayTraceResult.Type.ENTITY)
|
|
- {
|
|
- s = EntityList.func_191301_a(this.field_71476_x.field_72308_g).toString();
|
|
- }
|
|
-
|
|
- field_147123_G.warn("Picking on: [{}] {} gave null item", this.field_71476_x.field_72313_a, s);
|
|
- }
|
|
- else
|
|
- {
|
|
- InventoryPlayer inventoryplayer = this.field_71439_g.field_71071_by;
|
|
-
|
|
- if (tileentity != null)
|
|
- {
|
|
- this.func_184119_a(itemstack, tileentity);
|
|
- }
|
|
-
|
|
- int i = inventoryplayer.func_184429_b(itemstack);
|
|
-
|
|
- if (flag)
|
|
- {
|
|
- inventoryplayer.func_184434_a(itemstack);
|
|
- this.field_71442_b.func_78761_a(this.field_71439_g.func_184586_b(EnumHand.MAIN_HAND), 36 + inventoryplayer.field_70461_c);
|
|
- }
|
|
- else if (i != -1)
|
|
- {
|
|
- if (InventoryPlayer.func_184435_e(i))
|
|
- {
|
|
- inventoryplayer.field_70461_c = i;
|
|
- }
|
|
- else
|
|
- {
|
|
- this.field_71442_b.func_187100_a(i);
|
|
- }
|
|
- }
|
|
- }
|
|
+ net.minecraftforge.common.ForgeHooks.onPickBlock(this.field_71476_x, this.field_71439_g, this.field_71441_e);
|
|
+ // We delete this code wholly instead of commenting it out, to make sure we detect changes in it between MC versions
|
|
}
|
|
}
|
|
|
|
@@ -2834,6 +2748,7 @@
|
|
return field_71432_P;
|
|
}
|
|
|
|
+ @Deprecated // Forge: Use selective scheduleResourceRefresh method in FMLClientHandler
|
|
public ListenableFuture<Object> func_175603_A()
|
|
{
|
|
return this.func_152344_a(new Runnable()
|
|
@@ -3009,18 +2924,8 @@
|
|
|
|
public static int func_71369_N()
|
|
{
|
|
- for (int i = 16384; i > 0; i >>= 1)
|
|
- {
|
|
- GlStateManager.func_187419_a(32868, 0, 6408, i, i, 0, 6408, 5121, (IntBuffer)null);
|
|
- int j = GlStateManager.func_187411_c(32868, 0, 4096);
|
|
-
|
|
- if (j != 0)
|
|
- {
|
|
- return i;
|
|
- }
|
|
- }
|
|
-
|
|
- return -1;
|
|
+ //Forge we redirect this to our code which caches the value before any splash screen stuff is done.
|
|
+ return net.minecraftforge.fml.client.SplashProgress.getMaxTextureSize();
|
|
}
|
|
|
|
public boolean func_70002_Q()
|
|
@@ -3152,6 +3057,9 @@
|
|
}
|
|
else if (this.field_71439_g != null)
|
|
{
|
|
+ MusicTicker.MusicType type = this.field_71441_e.field_73011_w.getMusicType();
|
|
+ if (type != null) return type;
|
|
+
|
|
if (this.field_71439_g.field_70170_p.field_73011_w instanceof WorldProviderHell)
|
|
{
|
|
return MusicTicker.MusicType.NETHER;
|
|
@@ -3181,11 +3089,11 @@
|
|
{
|
|
if (Keyboard.getEventKeyState())
|
|
{
|
|
- if (i == this.field_71474_y.field_152395_am.func_151463_i())
|
|
+ if (this.field_71474_y.field_152395_am.isActiveAndMatches(i))
|
|
{
|
|
this.func_71352_k();
|
|
}
|
|
- else if (i == this.field_71474_y.field_151447_Z.func_151463_i())
|
|
+ else if (this.field_71474_y.field_151447_Z.isActiveAndMatches(i))
|
|
{
|
|
this.field_71456_v.func_146158_b().func_146227_a(ScreenShotHelper.func_148260_a(this.field_71412_D, this.field_71443_c, this.field_71440_d, this.field_147124_at));
|
|
}
|
|
@@ -3199,6 +3107,7 @@
|
|
}
|
|
}
|
|
}
|
|
+ else if (this.field_71462_r instanceof GuiControls) ((GuiControls)this.field_71462_r).field_146491_f = null;
|
|
}
|
|
}
|
|
}
|
|
@@ -3328,6 +3237,12 @@
|
|
return this.field_184127_aH;
|
|
}
|
|
|
|
+ // FORGE
|
|
+ public ItemColors getItemColors()
|
|
+ {
|
|
+ return this.field_184128_aI;
|
|
+ }
|
|
+
|
|
public boolean func_189648_am()
|
|
{
|
|
return this.field_71439_g != null && this.field_71439_g.func_175140_cp() || this.field_71474_y.field_178879_v;
|
|
@@ -3342,4 +3257,9 @@
|
|
{
|
|
return this.field_193035_aW;
|
|
}
|
|
+
|
|
+ public SearchTreeManager getSearchTreeManager()
|
|
+ {
|
|
+ return this.field_193995_ae;
|
|
+ }
|
|
}
|