Add some missing libraries and work on GuiIngameForge. Down 700 errors.

This commit is contained in:
LexManos 2018-09-05 18:00:14 -07:00
parent f818cc8f71
commit ff6fa2cfaf
32 changed files with 165 additions and 539 deletions

View file

@ -1,10 +0,0 @@
IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,40 +0,0 @@
SoundSystem CodecIBXM Class License:
You are free to use this class for any purpose, commercial or otherwise.
You may modify this class or source code, and distribute it any way you
like, provided the following conditions are met:
1) You may not falsely claim to be the author of this class or any
unmodified portion of it.
2) You may not copyright this class or a modified version of it and then
sue me for copyright infringement.
3) If you modify the source code, you must clearly document the changes
made before redistributing the modified source code, so other users know
it is not the original code.
4) You are not required to give me credit for this class in any derived
work, but if you do, you must also mention my website:
http://www.paulscode.com
5) I the author will not be responsible for any damages (physical,
financial, or otherwise) caused by the use if this class or any
portion of it.
6) I the author do not guarantee, warrant, or make any representations,
either expressed or implied, regarding the use of this class or any
portion of it.
Author: Paul Lamb
http://www.paulscode.com
This software is based on or using the IBXM library available from
http://www.geocities.com/sunet2000/
IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -85,6 +85,9 @@ project(':forge') {
implementation 'net.minecraftforge:coremods:0.1+'
implementation 'com.electronwill.night-config:core:3.4.0'
implementation 'com.electronwill.night-config:toml:3.4.0'
implementation 'org.jline:jline:3.5.1'
implementation 'org.apache.maven:maven-artifact:3.5.3'
implementation 'java3d:vecmath:1.5.2'
}
configurations {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/block/Block.java
+++ b/net/minecraft/block/Block.java
@@ -75,7 +75,7 @@
@@ -74,7 +74,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View file

@ -1,14 +0,0 @@
--- ../src-base/minecraft/net/minecraft/block/BlockBed.java
+++ ../src-work/minecraft/net/minecraft/block/BlockBed.java
@@ -84,8 +84,10 @@
}
}
- if (p_180639_1_.field_73011_w.func_76567_e() && p_180639_1_.func_180494_b(p_180639_2_) != Biomes.field_76778_j)
+ net.minecraft.world.WorldProvider.WorldSleepResult sleepResult = p_180639_1_.field_73011_w.canSleepAt(p_180639_4_, p_180639_2_);
+ if (sleepResult != net.minecraft.world.WorldProvider.WorldSleepResult.BED_EXPLODES)
{
+ if (sleepResult == net.minecraft.world.WorldProvider.WorldSleepResult.DENY) return true;
if (((Boolean)p_180639_3_.func_177229_b(field_176471_b)).booleanValue())
{
EntityPlayer entityplayer = this.func_176470_e(p_180639_1_, p_180639_2_);

View file

@ -1,20 +0,0 @@
--- ../src-base/minecraft/net/minecraft/block/BlockPortal.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPortal.java
@@ -111,7 +111,7 @@
{
BlockPortal.Size blockportal$size = new BlockPortal.Size(p_176548_1_, p_176548_2_, EnumFacing.Axis.X);
- if (blockportal$size.func_150860_b() && blockportal$size.field_150864_e == 0)
+ if (blockportal$size.func_150860_b() && blockportal$size.field_150864_e == 0 && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_1_, p_176548_2_, blockportal$size))
{
blockportal$size.func_150859_c();
return true;
@@ -120,7 +120,7 @@
{
BlockPortal.Size blockportal$size1 = new BlockPortal.Size(p_176548_1_, p_176548_2_, EnumFacing.Axis.Z);
- if (blockportal$size1.func_150860_b() && blockportal$size1.field_150864_e == 0)
+ if (blockportal$size1.func_150860_b() && blockportal$size1.field_150864_e == 0 && !net.minecraftforge.event.ForgeEventFactory.onTrySpawnPortal(p_176548_1_, p_176548_2_, blockportal$size1))
{
blockportal$size1.func_150859_c();
return true;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java
@@ -413,6 +413,7 @@
@@ -405,6 +405,7 @@
this.languageManager = new LanguageManager(this.gameSettings.language);
this.resourceManager.func_199006_a(this.languageManager);
this.gameSettings.func_198017_a(this.resourcePackRepository);
@ -8,7 +8,7 @@
this.refreshResources();
this.renderEngine = new TextureManager(this.resourceManager);
this.resourceManager.func_199006_a(this.renderEngine);
@@ -469,6 +470,7 @@
@@ -461,6 +462,7 @@
this.resourceManager.func_199006_a(this.searchTreeManager);
GlStateManager.viewport(0, 0, this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
this.effectRenderer = new ParticleManager(this.world, this.renderEngine);
@ -16,7 +16,7 @@
this.ingameGUI = new GuiIngame(this);
if (this.serverName != null) {
this.displayGuiScreen(new GuiConnecting(new GuiMainMenu(), this, this.serverName, this.serverPort));
@@ -478,6 +480,7 @@
@@ -470,6 +472,7 @@
this.debugRenderer = new DebugRenderer(this);
GLFW.glfwSetErrorCallback(this::func_195545_a).free();
@ -24,7 +24,7 @@
if (this.gameSettings.fullScreen && !this.field_195558_d.func_198113_j()) {
this.field_195558_d.func_198077_g();
}
@@ -1404,6 +1407,7 @@
@@ -1392,6 +1395,7 @@
NetworkManager networkmanager = NetworkManager.provideLocalClient(socketaddress);
networkmanager.setNetHandler(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null, (p_209507_0_) -> {
}));

View file

@ -0,0 +1,16 @@
--- a/net/minecraft/client/gui/GuiIngame.java
+++ b/net/minecraft/client/gui/GuiIngame.java
@@ -548,7 +548,13 @@
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
+ FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
+ if (font == null) {
this.getFontRenderer().drawStringWithShadow(s, (float)i, (float)j, 16777215 + (k << 24));
+ } else {
+ i = (this.field_194811_H - font.getStringWidth(s)) / 2;
+ font.drawStringWithShadow(s, (float)i, (float)j, 16777215 + (k << 24));
+ }
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}

View file

@ -1,11 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiLanguage.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiLanguage.java
@@ -108,7 +108,7 @@
Language language = this.field_148177_m.get(this.field_148176_l.get(p_148144_1_));
GuiLanguage.this.field_146454_h.func_135045_a(language);
GuiLanguage.this.field_146451_g.field_74363_ab = language.func_135034_a();
- this.field_148161_k.func_110436_a();
+ net.minecraftforge.fml.client.FMLClientHandler.instance().refreshResources(net.minecraftforge.client.resource.VanillaResourceType.LANGUAGES);
GuiLanguage.this.field_146289_q.func_78264_a(GuiLanguage.this.field_146454_h.func_135042_a() || GuiLanguage.this.field_146451_g.field_151455_aw);
GuiLanguage.this.field_146289_q.func_78275_b(GuiLanguage.this.field_146454_h.func_135044_b());
GuiLanguage.this.field_146452_r.field_146126_j = I18n.func_135052_a("gui.done");

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/network/NetHandlerLoginClient.java
+++ b/net/minecraft/client/network/NetHandlerLoginClient.java
@@ -123,7 +123,9 @@
@@ -122,7 +122,9 @@
}
public void func_209521_a(SPacketCustomPayloadLogin p_209521_1_) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/client/network/NetHandlerPlayClient.java
+++ b/net/minecraft/client/network/NetHandlerPlayClient.java
@@ -1615,6 +1615,7 @@
@@ -1598,6 +1598,7 @@
((DebugRendererWorldGenAttempts)this.client.debugRenderer.field_201750_j).func_201734_a(packetbuffer.readBlockPos(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat(), packetbuffer.readFloat());
LOGGER.warn("Unknown custom packed identifier: {}", (Object)resourcelocation);
} else {

View file

@ -1,11 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/ChestRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/ChestRenderer.java
@@ -13,6 +13,7 @@
{
GlStateManager.func_179131_c(p_178175_2_, p_178175_2_, p_178175_2_, 1.0F);
GlStateManager.func_179114_b(90.0F, 0.0F, 1.0F, 0.0F);
- TileEntityItemStackRenderer.field_147719_a.func_179022_a(new ItemStack(p_178175_1_));
+ ItemStack stack = new ItemStack(p_178175_1_);
+ stack.func_77973_b().getTileEntityItemStackRenderer().func_179022_a(stack);
}
}

View file

@ -1,11 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/block/model/SimpleBakedModel.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/SimpleBakedModel.java
@@ -88,7 +88,7 @@
public Builder(IBlockState p_i46989_1_, IBakedModel p_i46989_2_, TextureAtlasSprite p_i46989_3_, BlockPos p_i46989_4_)
{
- this(p_i46989_2_.func_177555_b(), p_i46989_2_.func_177556_c(), p_i46989_2_.func_177552_f(), p_i46989_2_.func_188617_f());
+ this(p_i46989_2_.isAmbientOcclusion(p_i46989_1_), p_i46989_2_.func_177556_c(), p_i46989_2_.func_177552_f(), p_i46989_2_.func_188617_f());
this.field_177652_d = p_i46989_2_.func_177554_e();
long i = MathHelper.func_180186_a(p_i46989_4_);

View file

@ -1,11 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/block/model/WeightedBakedModel.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/WeightedBakedModel.java
@@ -41,6 +41,8 @@
return this.field_177566_c.func_177555_b();
}
+ public boolean isAmbientOcclusion(IBlockState state) { return this.field_177566_c.isAmbientOcclusion(state); }
+
public boolean func_177556_c()
{
return this.field_177566_c.func_177556_c();

View file

@ -1,14 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/resources/IResourceManagerReloadListener.java
+++ ../src-work/minecraft/net/minecraft/client/resources/IResourceManagerReloadListener.java
@@ -3,6 +3,11 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
+/**
+ * @deprecated Forge: {@link net.minecraftforge.client.resource.ISelectiveResourceReloadListener}, which selectively allows
+ * individual resource types being reloaded should rather be used where possible.
+ */
+@Deprecated
@SideOnly(Side.CLIENT)
public interface IResourceManagerReloadListener
{

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/network/NetHandlerPlayServer.java
+++ b/net/minecraft/network/NetHandlerPlayServer.java
@@ -1267,5 +1267,7 @@
@@ -1265,5 +1265,7 @@
}
public void processCustomPayload(CPacketCustomPayload packetIn) {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/network/NetworkManager.java
+++ b/net/minecraft/network/NetworkManager.java
@@ -384,6 +384,16 @@
@@ -383,6 +383,16 @@
return this.field_211397_t;
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/potion/Potion.java
+++ b/net/minecraft/potion/Potion.java
@@ -24,7 +24,7 @@
@@ -23,7 +23,7 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -528,6 +528,7 @@
@@ -523,6 +523,7 @@
public void run() {
try {
if (this.init()) {
@ -8,7 +8,7 @@
this.field_211151_aa = Util.func_211177_b();
this.statusResponse.setServerDescription(new TextComponentString(this.motd));
this.statusResponse.setVersion(new ServerStatusResponse.Version("1.13", 393));
@@ -551,7 +552,10 @@
@@ -546,7 +547,10 @@
this.serverIsRunning = true;
}
@ -19,7 +19,7 @@
this.finalTick((CrashReport)null);
}
} catch (Throwable throwable1) {
@@ -570,6 +574,7 @@
@@ -565,6 +569,7 @@
LOGGER.error("We were unable to save this crash report to disk.");
}
@ -27,7 +27,7 @@
this.finalTick(crashreport);
} finally {
try {
@@ -578,6 +583,7 @@
@@ -573,6 +578,7 @@
} catch (Throwable throwable) {
LOGGER.error("Exception stopping the server", throwable);
} finally {

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -111,6 +111,7 @@
@@ -110,6 +110,7 @@
LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
@ -8,7 +8,7 @@
LOGGER.info("Loading properties");
this.settings = new PropertyManager(new File("server.properties"));
this.eula = new ServerEula(new File("eula.txt"));
@@ -182,6 +183,7 @@
@@ -181,6 +182,7 @@
if (!PreYggdrasilConverter.tryConvert(this.settings)) {
return false;
} else {
@ -16,7 +16,7 @@
this.setPlayerList(new DedicatedPlayerList(this));
long j = Util.func_211178_c();
if (this.getFolderName() == null) {
@@ -219,6 +221,7 @@
@@ -218,6 +220,7 @@
TileEntitySkull.setProfileCache(this.getPlayerProfileCache());
TileEntitySkull.setSessionService(this.getMinecraftSessionService());
PlayerProfileCache.setOnlineMode(this.isServerInOnlineMode());
@ -24,7 +24,7 @@
LOGGER.info("Preparing level \"{}\"", (Object)this.getFolderName());
JsonObject jsonobject = new JsonObject();
if (worldtype == WorldType.FLAT) {
@@ -258,7 +261,8 @@
@@ -257,7 +260,8 @@
}
Items.AIR.getSubItems(ItemGroup.SEARCH, NonNullList.create());

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/integrated/IntegratedServer.java
+++ b/net/minecraft/server/integrated/IntegratedServer.java
@@ -122,9 +122,10 @@
@@ -121,9 +121,10 @@
this.setAllowFlight(true);
LOGGER.info("Generating keypair");
this.setKeyPair(CryptManager.generateKeyPair());

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/network/NetHandlerLoginServer.java
+++ b/net/minecraft/server/network/NetHandlerLoginServer.java
@@ -56,6 +56,12 @@
@@ -55,6 +55,12 @@
}
public void update() {
@ -13,7 +13,7 @@
if (this.currentLoginState == NetHandlerLoginServer.LoginState.READY_TO_ACCEPT) {
this.tryAcceptPlayer();
} else if (this.currentLoginState == NetHandlerLoginServer.LoginState.DELAY_ACCEPT) {
@@ -127,7 +133,7 @@
@@ -126,7 +132,7 @@
this.currentLoginState = NetHandlerLoginServer.LoginState.KEY;
this.networkManager.sendPacket(new SPacketEncryptionRequest("", this.server.getKeyPair().getPublic(), this.verifyToken));
} else {
@ -22,7 +22,7 @@
}
}
@@ -150,11 +156,11 @@
@@ -149,11 +155,11 @@
NetHandlerLoginServer.this.loginGameProfile = NetHandlerLoginServer.this.server.getMinecraftSessionService().hasJoinedServer(new GameProfile((UUID)null, gameprofile.getName()), s, this.getAddress());
if (NetHandlerLoginServer.this.loginGameProfile != null) {
NetHandlerLoginServer.LOGGER.info("UUID of player {} is {}", NetHandlerLoginServer.this.loginGameProfile.getName(), NetHandlerLoginServer.this.loginGameProfile.getId());
@ -36,7 +36,7 @@
} else {
NetHandlerLoginServer.this.disconnect(new TextComponentTranslation("multiplayer.disconnect.unverified_username", new Object[0]));
NetHandlerLoginServer.LOGGER.error("Username '{}' tried to join with an invalid session", (Object)gameprofile.getName());
@@ -163,7 +169,7 @@
@@ -162,7 +168,7 @@
if (NetHandlerLoginServer.this.server.isSinglePlayer()) {
NetHandlerLoginServer.LOGGER.warn("Authentication servers are down but will let them in anyway!");
NetHandlerLoginServer.this.loginGameProfile = NetHandlerLoginServer.this.getOfflineProfile(gameprofile);
@ -45,7 +45,7 @@
} else {
NetHandlerLoginServer.this.disconnect(new TextComponentTranslation("multiplayer.disconnect.authservers_down", new Object[0]));
NetHandlerLoginServer.LOGGER.error("Couldn't verify username because servers are unavailable");
@@ -184,6 +190,7 @@
@@ -183,6 +189,7 @@
}
public void func_209526_a(CPacketCustomPayloadLogin p_209526_1_) {

View file

@ -1,10 +0,0 @@
--- ../src-base/minecraft/net/minecraft/util/ChatAllowedCharacters.java
+++ ../src-work/minecraft/net/minecraft/util/ChatAllowedCharacters.java
@@ -31,6 +31,7 @@
static
{
+ if (System.getProperty("io.netty.leakDetection.level") == null) // Forge: allow level to be manually specified
ResourceLeakDetector.setLevel(field_184877_a);
}
}

View file

@ -1,25 +0,0 @@
--- ../src-base/minecraft/net/minecraft/world/Teleporter.java
+++ ../src-work/minecraft/net/minecraft/world/Teleporter.java
@@ -15,7 +15,7 @@
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.MathHelper;
-public class Teleporter
+public class Teleporter implements net.minecraftforge.common.util.ITeleporter
{
protected final WorldServer field_85192_a;
protected final Random field_77187_a;
@@ -428,4 +428,13 @@
this.field_85087_d = p_i45747_3_;
}
}
+
+ @Override
+ public void placeEntity(World world, Entity entity, float yaw)
+ {
+ if (entity instanceof EntityPlayerMP)
+ func_180266_a(entity, yaw);
+ else
+ func_180620_b(entity, yaw);
+ }
}

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/world/biome/Biome.java
+++ b/net/minecraft/world/biome/Biome.java
@@ -145,7 +145,7 @@
@@ -144,7 +144,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View file

@ -1,33 +0,0 @@
--- ../src-base/minecraft/net/minecraft/world/end/DragonFightManager.java
+++ ../src-work/minecraft/net/minecraft/world/end/DragonFightManager.java
@@ -82,6 +82,7 @@
this.field_186117_k = p_i46669_2_.func_74767_n("DragonKilled");
this.field_186118_l = p_i46669_2_.func_74767_n("PreviouslyKilled");
+ this.field_186120_n = !p_i46669_2_.func_74767_n("LegacyScanPerformed"); // Forge: fix MC-105080
if (p_i46669_2_.func_74767_n("IsRespawning"))
{
@@ -128,6 +129,7 @@
nbttagcompound.func_74757_a("DragonKilled", this.field_186117_k);
nbttagcompound.func_74757_a("PreviouslyKilled", this.field_186118_l);
+ nbttagcompound.func_74757_a("LegacyScanPerformed", !this.field_186120_n); // Forge: fix MC-105080
if (this.field_186121_o != null)
{
@@ -582,4 +584,14 @@
}
}
}
+
+ public void addPlayer(EntityPlayerMP player)
+ {
+ this.field_186109_c.func_186760_a(player);
+ }
+
+ public void removePlayer(EntityPlayerMP player)
+ {
+ this.field_186109_c.func_186761_b(player);
+ }
}

View file

@ -1,50 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2018.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.advancements.critereon;
import com.google.gson.JsonObject;
import net.minecraft.advancements.critereon.ItemPredicate;
import net.minecraft.util.ResourceLocation;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
public class ItemPredicates
{
private static final Map<ResourceLocation, Function<JsonObject, ItemPredicate>> predicates = new HashMap<>();
static
{
register(new ResourceLocation("forge:ore_dict"), OredictItemPredicate::new);
}
public static void register(ResourceLocation rl, Function<JsonObject, ItemPredicate> jsonToPredicate)
{
predicates.put(rl, jsonToPredicate);
}
public static Map<ResourceLocation, Function<JsonObject, ItemPredicate>> getPredicates()
{
return Collections.unmodifiableMap(predicates);
}
}

View file

@ -1,51 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2018.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.advancements.critereon;
import com.google.gson.JsonObject;
import net.minecraft.util.JsonUtils;
import org.apache.commons.lang3.ArrayUtils;
import net.minecraft.advancements.critereon.ItemPredicate;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
/**
* An {@link ItemPredicate} that matches oredicts.
*/
public class OredictItemPredicate /*extends ItemPredicate */
{/*
private final String ore;
public OredictItemPredicate(String ore)
{
this.ore = ore;
}
public OredictItemPredicate(JsonObject jsonObject) { this(JsonUtils.getString(jsonObject, "ore")); }
@Override
public boolean test(ItemStack stack)
{
return !stack.isEmpty() && ArrayUtils.contains(OreDictionary.getOreIDs(stack), OreDictionary.getOreID(ore));
}
*/
}

View file

@ -28,6 +28,7 @@ import net.minecraftforge.client.resource.VanillaResourceType;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.GLAllocation;

View file

@ -31,7 +31,6 @@ import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiIngame;
import net.minecraft.client.gui.GuiOverlayDebug;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
@ -48,12 +47,15 @@ import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Scoreboard;
import net.minecraft.tags.FluidTags;
import net.minecraft.util.FoodStats;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.GameType;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.common.ForgeHooks;
@ -90,7 +92,6 @@ public class GuiIngameForge extends GuiIngame
public static int left_height = 39;
public static int right_height = 39;
private ScaledResolution res = null;
private FontRenderer fontrenderer = null;
private RenderGameOverlayEvent eventParent;
//private static final String MC_VERSION = MinecraftForge.MC_VERSION;
@ -105,10 +106,9 @@ public class GuiIngameForge extends GuiIngame
@Override
public void renderGameOverlay(float partialTicks)
{
res = new ScaledResolution(mc);
eventParent = new RenderGameOverlayEvent(partialTicks, res);
int width = res.getScaledWidth();
int height = res.getScaledHeight();
this.field_194811_H = this.mc.field_195558_d.func_198107_o();
this.field_194812_I = this.mc.field_195558_d.func_198087_p();
eventParent = new RenderGameOverlayEvent(partialTicks, this.mc.field_195558_d);
renderHealthMount = mc.player.getRidingEntity() instanceof EntityLivingBase;
renderFood = mc.player.getRidingEntity() == null;
renderJumpBar = mc.player.isRidingHorse();
@ -124,7 +124,7 @@ public class GuiIngameForge extends GuiIngame
if (renderVignette && Minecraft.isFancyGraphicsEnabled())
{
renderVignette(mc.player.getBrightness(), res);
func_194800_d(mc.player.getBrightness());
}
else
{
@ -132,55 +132,63 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
}
if (renderHelmet) renderHelmet(res, partialTicks);
if (renderHelmet) renderHelmet(partialTicks);
if (renderPortal && !mc.player.isPotionActive(MobEffects.NAUSEA))
{
renderPortal(res, partialTicks);
func_194805_e(partialTicks);
}
if (renderHotbar) renderHotbar(res, partialTicks);
if (renderHotbar) func_194806_b(partialTicks);
if (!this.mc.gameSettings.hideGUI) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
zLevel = -90.0F;
rand.setSeed((long)(updateCounter * 312871));
if (renderCrosshairs) renderCrosshairs(partialTicks);
if (renderCrosshairs) func_194798_c(partialTicks);
if (renderBossHealth) renderBossHealth();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
if (this.mc.playerController.shouldDrawHUD() && this.mc.getRenderViewEntity() instanceof EntityPlayer)
{
if (renderHealth) renderHealth(width, height);
if (renderArmor) renderArmor(width, height);
if (renderFood) renderFood(width, height);
if (renderHealthMount) renderHealthMount(width, height);
if (renderAir) renderAir(width, height);
if (renderHealth) renderHealth(this.field_194811_H, this.field_194812_I);
if (renderArmor) renderArmor(this.field_194811_H, this.field_194812_I);
if (renderFood) renderFood(this.field_194811_H, this.field_194812_I);
if (renderHealthMount) renderHealthMount(this.field_194811_H, this.field_194812_I);
if (renderAir) renderAir(this.field_194811_H, this.field_194812_I);
}
renderSleepFade(width, height);
if (renderJumpBar)
{
renderJumpBar(width, height);
func_194803_a(this.field_194811_H / 2 - 91);
}
else if (renderExperiance)
{
renderExperience(width, height);
renderExperience(this.field_194811_H / 2 - 91);
}
if (this.mc.gameSettings.heldItemTooltips && this.mc.playerController.getCurrentGameType() != GameType.SPECTATOR) {
this.func_194801_c();
} else if (this.mc.player.isSpectator()) {
this.spectatorGui.func_195623_a();
}
}
renderToolHighlight(res);
renderHUDText(width, height);
renderSleepFade(this.field_194811_H, this.field_194812_I);
renderHUDText(this.field_194811_H, this.field_194812_I);
renderFPSGraph();
renderPotionIcons(res);
renderRecordOverlay(width, height, partialTicks);
renderSubtitles(res);
renderTitle(width, height, partialTicks);
func_194809_b();
if (!mc.gameSettings.hideGUI) {
renderRecordOverlay(this.field_194811_H, this.field_194812_I, partialTicks);
renderSubtitles();
renderTitle(this.field_194811_H, this.field_194812_I, partialTicks);
}
Scoreboard scoreboard = this.mc.world.getScoreboard();
ScoreObjective objective = null;
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.player.getName());
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.player.func_195047_I_());
if (scoreplayerteam != null)
{
int slot = scoreplayerteam.getColor().getColorIndex();
@ -189,16 +197,16 @@ public class GuiIngameForge extends GuiIngame
ScoreObjective scoreobjective1 = objective != null ? objective : scoreboard.getObjectiveInDisplaySlot(1);
if (renderObjective && scoreobjective1 != null)
{
this.renderScoreboard(scoreobjective1, res);
this.func_194802_a(scoreobjective1);
}
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
GlStateManager.disableAlpha();
renderChat(width, height);
renderChat(this.field_194811_H, this.field_194812_I);
renderPlayerList(width, height);
renderPlayerList(this.field_194811_H, this.field_194812_I);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableLighting();
@ -207,31 +215,28 @@ public class GuiIngameForge extends GuiIngame
post(ALL);
}
public ScaledResolution getResolution()
{
return res;
}
protected void renderCrosshairs(float partialTicks)
@Override
protected void func_194798_c(float partialTicks)
{
if (pre(CROSSHAIRS)) return;
bind(Gui.ICONS);
GlStateManager.enableBlend();
super.renderAttackIndicator(partialTicks, res);
super.func_194798_c(partialTicks);
post(CROSSHAIRS);
}
protected void renderPotionIcons(ScaledResolution resolution)
@Override
protected void func_194809_b()
{
if (pre(POTION_ICONS)) return;
super.renderPotionEffects(resolution);
super.func_194809_b();
post(POTION_ICONS);
}
protected void renderSubtitles(ScaledResolution resolution)
protected void renderSubtitles()
{
if (pre(SUBTITLES)) return;
this.overlaySubtitle.renderSubtitles(res);
this.overlaySubtitle.func_195620_a();
post(SUBTITLES);
}
@ -241,16 +246,16 @@ public class GuiIngameForge extends GuiIngame
if (pre(BOSSHEALTH)) return;
bind(Gui.ICONS);
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
mc.mcProfiler.startSection("bossHealth");
mc.profiler.startSection("bossHealth");
GlStateManager.enableBlend();
this.overlayBoss.renderBossHealth();
GlStateManager.disableBlend();
mc.mcProfiler.endSection();
mc.profiler.endSection();
post(BOSSHEALTH);
}
@Override
protected void renderVignette(float lightLevel, ScaledResolution scaledRes)
protected void func_194800_d(float lightLevel)
{
if (pre(VIGNETTE))
{
@ -259,11 +264,11 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
return;
}
super.renderVignette(lightLevel, scaledRes);
super.func_194800_d(lightLevel);
post(VIGNETTE);
}
private void renderHelmet(ScaledResolution res, float partialTicks)
private void renderHelmet(float partialTicks)
{
if (pre(HELMET)) return;
@ -272,13 +277,13 @@ public class GuiIngameForge extends GuiIngame
if (this.mc.gameSettings.thirdPersonView == 0 && !itemstack.isEmpty())
{
Item item = itemstack.getItem();
if (item == Item.getItemFromBlock(Blocks.PUMPKIN))
if (item == Blocks.field_196625_cS.func_199767_j())
{
renderPumpkinOverlay(res);
func_194808_p();
}
else
{
item.renderHelmetOverlay(itemstack, mc.player, res, partialTicks);
item.renderHelmetOverlay(itemstack, mc.player, this.field_194811_H, this.field_194812_I, partialTicks);
}
}
@ -288,7 +293,7 @@ public class GuiIngameForge extends GuiIngame
protected void renderArmor(int width, int height)
{
if (pre(ARMOR)) return;
mc.mcProfiler.startSection("armor");
mc.profiler.startSection("armor");
GlStateManager.enableBlend();
int left = width / 2 - 91;
@ -314,11 +319,12 @@ public class GuiIngameForge extends GuiIngame
left_height += 10;
GlStateManager.disableBlend();
mc.mcProfiler.endSection();
mc.profiler.endSection();
post(ARMOR);
}
protected void renderPortal(ScaledResolution res, float partialTicks)
@Override
protected void func_194805_e(float partialTicks)
{
if (pre(PORTAL)) return;
@ -326,24 +332,24 @@ public class GuiIngameForge extends GuiIngame
if (f1 > 0.0F)
{
renderPortal(f1, res);
super.func_194805_e(f1);
}
post(PORTAL);
}
@Override
protected void renderHotbar(ScaledResolution res, float partialTicks)
protected void func_194806_b(float partialTicks)
{
if (pre(HOTBAR)) return;
if (mc.playerController.isSpectator())
if (mc.playerController.getCurrentGameType() == GameType.SPECTATOR)
{
this.spectatorGui.renderTooltip(res, partialTicks);
this.spectatorGui.func_195622_a(partialTicks);
}
else
{
super.renderHotbar(res, partialTicks);
super.func_194806_b(partialTicks);
}
post(HOTBAR);
@ -358,15 +364,15 @@ public class GuiIngameForge extends GuiIngame
protected void renderAir(int width, int height)
{
if (pre(AIR)) return;
mc.mcProfiler.startSection("air");
mc.profiler.startSection("air");
EntityPlayer player = (EntityPlayer)this.mc.getRenderViewEntity();
GlStateManager.enableBlend();
int left = width / 2 + 91;
int top = height - right_height;
if (player.isInsideOfMaterial(Material.WATER))
{
int air = player.getAir();
if (player.func_208600_a(FluidTags.field_206959_a) || air < 300)
{
int full = MathHelper.ceil((double)(air - 2) * 10.0D / 300.0D);
int partial = MathHelper.ceil((double)air * 10.0D / 300.0D) - full;
@ -378,7 +384,7 @@ public class GuiIngameForge extends GuiIngame
}
GlStateManager.disableBlend();
mc.mcProfiler.endSection();
mc.profiler.endSection();
post(AIR);
}
@ -386,7 +392,7 @@ public class GuiIngameForge extends GuiIngame
{
bind(ICONS);
if (pre(HEALTH)) return;
mc.mcProfiler.startSection("health");
mc.profiler.startSection("health");
GlStateManager.enableBlend();
EntityPlayer player = (EntityPlayer)this.mc.getRenderViewEntity();
@ -395,20 +401,20 @@ public class GuiIngameForge extends GuiIngame
if (health < this.playerHealth && player.hurtResistantTime > 0)
{
this.lastSystemTime = Minecraft.getSystemTime();
this.lastSystemTime = Util.func_211177_b();
this.healthUpdateCounter = (long)(this.updateCounter + 20);
}
else if (health > this.playerHealth && player.hurtResistantTime > 0)
{
this.lastSystemTime = Minecraft.getSystemTime();
this.lastSystemTime = Util.func_211177_b();
this.healthUpdateCounter = (long)(this.updateCounter + 10);
}
if (Minecraft.getSystemTime() - this.lastSystemTime > 1000L)
if (Util.func_211177_b() - this.lastSystemTime > 1000L)
{
this.playerHealth = health;
this.lastPlayerHealth = health;
this.lastSystemTime = Minecraft.getSystemTime();
this.lastSystemTime = Util.func_211177_b();
}
this.playerHealth = health;
@ -484,14 +490,14 @@ public class GuiIngameForge extends GuiIngame
}
GlStateManager.disableBlend();
mc.mcProfiler.endSection();
mc.profiler.endSection();
post(HEALTH);
}
public void renderFood(int width, int height)
{
if (pre(FOOD)) return;
mc.mcProfiler.startSection("food");
mc.profiler.startSection("food");
EntityPlayer player = (EntityPlayer)this.mc.getRenderViewEntity();
GlStateManager.enableBlend();
@ -531,7 +537,7 @@ public class GuiIngameForge extends GuiIngame
drawTexturedModalRect(x, y, icon + 45, 27, 9, 9);
}
GlStateManager.disableBlend();
mc.mcProfiler.endSection();
mc.profiler.endSection();
post(FOOD);
}
@ -539,7 +545,7 @@ public class GuiIngameForge extends GuiIngame
{
if (mc.player.getSleepTimer() > 0)
{
mc.mcProfiler.startSection("sleep");
mc.profiler.startSection("sleep");
GlStateManager.disableDepth();
GlStateManager.disableAlpha();
int sleepTime = mc.player.getSleepTimer();
@ -554,11 +560,11 @@ public class GuiIngameForge extends GuiIngame
drawRect(0, 0, width, height, color);
GlStateManager.enableAlpha();
GlStateManager.enableDepth();
mc.mcProfiler.endSection();
mc.profiler.endSection();
}
}
protected void renderExperience(int width, int height)
protected void renderExperience(int x)
{
bind(ICONS);
if (pre(EXPERIENCE)) return;
@ -567,41 +573,7 @@ public class GuiIngameForge extends GuiIngame
if (mc.playerController.gameIsSurvivalOrAdventure())
{
mc.mcProfiler.startSection("expBar");
int cap = this.mc.player.xpBarCap();
int left = width / 2 - 91;
if (cap > 0)
{
short barWidth = 182;
int filled = (int)(mc.player.experience * (float)(barWidth + 1));
int top = height - 32 + 3;
drawTexturedModalRect(left, top, 0, 64, barWidth, 5);
if (filled > 0)
{
drawTexturedModalRect(left, top, 0, 69, filled, 5);
}
}
this.mc.mcProfiler.endSection();
if (mc.playerController.gameIsSurvivalOrAdventure() && mc.player.experienceLevel > 0)
{
mc.mcProfiler.startSection("expLevel");
boolean flag1 = false;
int color = flag1 ? 16777215 : 8453920;
String text = "" + mc.player.experienceLevel;
int x = (width - fontrenderer.getStringWidth(text)) / 2;
int y = height - 31 - 4;
fontrenderer.drawString(text, x + 1, y, 0);
fontrenderer.drawString(text, x - 1, y, 0);
fontrenderer.drawString(text, x, y + 1, 0);
fontrenderer.drawString(text, x, y - 1, 0);
fontrenderer.drawString(text, x, y, color);
mc.mcProfiler.endSection();
}
super.func_194804_b(x);
}
GlStateManager.enableBlend();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
@ -609,86 +581,26 @@ public class GuiIngameForge extends GuiIngame
post(EXPERIENCE);
}
protected void renderJumpBar(int width, int height)
@Override
public void func_194803_a(int x)
{
bind(ICONS);
if (pre(JUMPBAR)) return;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
mc.mcProfiler.startSection("jumpBar");
float charge = mc.player.getHorseJumpPower();
final int barWidth = 182;
int x = (width / 2) - (barWidth / 2);
int filled = (int)(charge * (float)(barWidth + 1));
int top = height - 32 + 3;
drawTexturedModalRect(x, top, 0, 84, barWidth, 5);
if (filled > 0)
{
this.drawTexturedModalRect(x, top, 0, 89, filled, 5);
}
super.func_194803_a(x);
GlStateManager.enableBlend();
mc.mcProfiler.endSection();
mc.profiler.endSection();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
post(JUMPBAR);
}
protected void renderToolHighlight(ScaledResolution res)
{
if (this.mc.gameSettings.heldItemTooltips && !this.mc.playerController.isSpectator())
{
mc.mcProfiler.startSection("toolHighlight");
if (this.remainingHighlightTicks > 0 && !this.highlightingItemStack.isEmpty())
{
String name = this.highlightingItemStack.getDisplayName();
if (this.highlightingItemStack.hasDisplayName())
name = TextFormatting.ITALIC + name;
name = this.highlightingItemStack.getItem().getHighlightTip(this.highlightingItemStack, name);
int opacity = (int)((float)this.remainingHighlightTicks * 256.0F / 10.0F);
if (opacity > 255) opacity = 255;
if (opacity > 0)
{
int y = res.getScaledHeight() - 59;
if (!mc.playerController.shouldDrawHUD()) y += 14;
GlStateManager.pushMatrix();
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
if (font != null)
{
int x = (res.getScaledWidth() - font.getStringWidth(name)) / 2;
font.drawStringWithShadow(name, x, y, WHITE | (opacity << 24));
}
else
{
int x = (res.getScaledWidth() - fontrenderer.getStringWidth(name)) / 2;
fontrenderer.drawStringWithShadow(name, x, y, WHITE | (opacity << 24));
}
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}
}
mc.mcProfiler.endSection();
}
else if (this.mc.player.isSpectator())
{
this.spectatorGui.renderSelectedItem(res);
}
}
protected void renderHUDText(int width, int height)
{
mc.mcProfiler.startSection("forgeHudText");
mc.profiler.startSection("forgeHudText");
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
ArrayList<String> listL = new ArrayList<String>();
ArrayList<String> listR = new ArrayList<String>();
@ -721,7 +633,7 @@ public class GuiIngameForge extends GuiIngame
{
if (msg == null) continue;
drawRect(1, top - 1, 2 + fontrenderer.getStringWidth(msg) + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
fontrenderer.drawString(msg, 2, top, 14737632);
fontrenderer.drawStringWithShadow(msg, 2, top, 14737632);
top += fontrenderer.FONT_HEIGHT;
}
@ -732,12 +644,12 @@ public class GuiIngameForge extends GuiIngame
int w = fontrenderer.getStringWidth(msg);
int left = width - 2 - w;
drawRect(left - 1, top - 1, left + w + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
fontrenderer.drawString(msg, left, top, 14737632);
fontrenderer.drawStringWithShadow(msg, left, top, 14737632);
top += fontrenderer.FONT_HEIGHT;
}
}
mc.mcProfiler.endSection();
mc.profiler.endSection();
post(TEXT);
}
@ -754,7 +666,7 @@ public class GuiIngameForge extends GuiIngame
{
if (overlayMessageTime > 0)
{
mc.mcProfiler.startSection("overlayMessage");
mc.profiler.startSection("overlayMessage");
float hue = (float)overlayMessageTime - partialTicks;
int opacity = (int)(hue * 256.0F / 20.0F);
if (opacity > 255) opacity = 255;
@ -766,12 +678,12 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
int color = (animateOverlayMessageColor ? Color.HSBtoRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
fontrenderer.drawString(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
fontrenderer.drawStringWithShadow(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}
mc.mcProfiler.endSection();
mc.profiler.endSection();
}
}
@ -779,7 +691,7 @@ public class GuiIngameForge extends GuiIngame
{
if (titlesTimer > 0)
{
mc.mcProfiler.startSection("titleAndSubtitle");
mc.profiler.startSection("titleAndSubtitle");
float age = (float)this.titlesTimer - partialTicks;
int opacity = 255;
@ -801,23 +713,23 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.pushMatrix();
GlStateManager.scale(4.0F, 4.0F, 4.0F);
int l = opacity << 24 & -16777216;
this.getFontRenderer().drawString(this.displayedTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedTitle) / 2), -10.0F, 16777215 | l, true);
this.getFontRenderer().drawStringWithShadow(this.displayedTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedTitle) / 2), -10.0F, 16777215 | l);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.scale(2.0F, 2.0F, 2.0F);
this.getFontRenderer().drawString(this.displayedSubTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedSubTitle) / 2), 5.0F, 16777215 | l, true);
this.getFontRenderer().drawStringWithShadow(this.displayedSubTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedSubTitle) / 2), 5.0F, 16777215 | l);
GlStateManager.popMatrix();
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}
this.mc.mcProfiler.endSection();
this.mc.profiler.endSection();
}
}
protected void renderChat(int width, int height)
{
mc.mcProfiler.startSection("chat");
mc.profiler.startSection("chat");
RenderGameOverlayEvent.Chat event = new RenderGameOverlayEvent.Chat(eventParent, 0, height - 48);
if (MinecraftForge.EVENT_BUS.post(event)) return;
@ -829,7 +741,7 @@ public class GuiIngameForge extends GuiIngame
post(CHAT);
mc.mcProfiler.endSection();
mc.profiler.endSection();
}
protected void renderPlayerList(int width, int height)
@ -863,7 +775,7 @@ public class GuiIngameForge extends GuiIngame
boolean unused = false;
int left_align = width / 2 + 91;
mc.mcProfiler.endStartSection("mountHealth");
mc.profiler.endStartSection("mountHealth");
GlStateManager.enableBlend();
EntityLivingBase mount = (EntityLivingBase)tmp;
int health = (int)Math.ceil((double)mount.getHealth());
@ -924,10 +836,10 @@ public class GuiIngameForge extends GuiIngame
this.mc = mc;
}
@Override protected void renderDebugInfoLeft(){}
@Override protected void renderDebugInfoRight(ScaledResolution res){}
@Override protected void func_194819_c(){}
private List<String> getLeft()
{
List<String> ret = this.call();
List<String> ret = this.func_209011_c();
ret.add("");
ret.add("Debug: Pie [shift]: " + (this.mc.gameSettings.showDebugProfilerChart ? "visible" : "hidden") + " FPS [alt]: " + (this.mc.gameSettings.showLagometer ? "visible" : "hidden"));
ret.add("For help: press F3 + Q");

View file

@ -23,6 +23,7 @@ import java.util.ArrayList;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import net.minecraft.client.MainWindow;
import net.minecraft.client.gui.BossInfoClient;
@Cancelable
@ -67,7 +68,7 @@ public class RenderGameOverlayEvent extends Event
private final float partialTicks;
private final ElementType type;
public RenderGameOverlayEvent(float partialTicks, Void resolution)
public RenderGameOverlayEvent(float partialTicks, MainWindow resolution)
{
this.partialTicks = partialTicks;
this.type = null;

View file

@ -66,7 +66,11 @@ public net.minecraft.world.World func_175701_a(Lnet/minecraft/util/math/BlockPos
public net.minecraft.world.World func_189509_E(Lnet/minecraft/util/math/BlockPos;)Z # isOutsideBuildHeight
# GuiIngame
protected net.minecraft.client.gui.GuiIngame *
protected net.minecraft.client.gui.GuiIngame *()
protected net.minecraft.client.gui.GuiIngame func_194798_c(F)V
protected net.minecraft.client.gui.GuiIngame func_194800_d(F)V
protected net.minecraft.client.gui.GuiIngame func_194805_e(F)V
protected net.minecraft.client.gui.GuiIngame func_194808_p()V
protected net.minecraft.client.gui.GuiIngame func_194802_a(Lnet/minecraft/scoreboard/ScoreObjective;)V
# ItemStack
default net.minecraft.item.ItemStack field_77991_e
# MapGenStructureIO