2016-06-23 03:49:47 +00:00
|
|
|
/*
|
|
|
|
* Minecraft Forge
|
2019-02-10 22:57:03 +00:00
|
|
|
* Copyright (c) 2016-2019.
|
2016-06-23 03:49:47 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
package net.minecraftforge.client;
|
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
import net.minecraft.client.gui.FontRenderer;
|
2019-05-23 23:02:15 +00:00
|
|
|
import net.minecraft.client.gui.AbstractGui;
|
|
|
|
import net.minecraft.client.gui.IngameGui;
|
|
|
|
import net.minecraft.client.gui.overlay.DebugOverlayGui;
|
|
|
|
import net.minecraft.client.network.play.ClientPlayNetHandler;
|
2013-12-10 05:59:12 +00:00
|
|
|
import net.minecraft.client.resources.I18n;
|
2013-07-01 05:32:11 +00:00
|
|
|
import net.minecraft.entity.Entity;
|
2019-05-23 23:02:15 +00:00
|
|
|
import net.minecraft.entity.LivingEntity;
|
2013-07-01 01:13:01 +00:00
|
|
|
import net.minecraft.entity.SharedMonsterAttributes;
|
2013-12-10 05:59:12 +00:00
|
|
|
import net.minecraft.entity.ai.attributes.IAttributeInstance;
|
2019-05-23 23:02:15 +00:00
|
|
|
import net.minecraft.entity.player.PlayerEntity;
|
|
|
|
import net.minecraft.block.Blocks;
|
|
|
|
import net.minecraft.potion.Effects;
|
2013-12-10 05:59:12 +00:00
|
|
|
import net.minecraft.item.Item;
|
2013-04-18 01:55:06 +00:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.scoreboard.ScoreObjective;
|
|
|
|
import net.minecraft.scoreboard.ScorePlayerTeam;
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
import net.minecraft.scoreboard.Scoreboard;
|
2018-09-06 01:00:14 +00:00
|
|
|
import net.minecraft.tags.FluidTags;
|
2013-04-18 01:55:06 +00:00
|
|
|
import net.minecraft.util.FoodStats;
|
2013-07-08 21:30:25 +00:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2013-04-18 01:55:06 +00:00
|
|
|
import net.minecraft.util.StringUtils;
|
2018-09-06 01:00:14 +00:00
|
|
|
import net.minecraft.util.Util;
|
2016-03-01 12:58:03 +00:00
|
|
|
import net.minecraft.util.math.MathHelper;
|
2018-05-17 07:41:21 +00:00
|
|
|
import net.minecraft.util.text.ITextComponent;
|
2018-09-06 01:00:14 +00:00
|
|
|
import net.minecraft.world.GameType;
|
2013-04-18 01:55:06 +00:00
|
|
|
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
|
|
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
2013-07-01 05:32:11 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
import com.mojang.blaze3d.platform.GlStateManager;
|
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
import org.lwjgl.opengl.GL11;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
public class ForgeIngameGui extends IngameGui
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2014-01-18 05:55:48 +00:00
|
|
|
//private static final ResourceLocation VIGNETTE = new ResourceLocation("textures/misc/vignette.png");
|
2015-11-27 03:38:21 +00:00
|
|
|
//private static final ResourceLocation WIDGITS = new ResourceLocation("textures/gui/widgets.png");
|
2014-01-18 05:55:48 +00:00
|
|
|
//private static final ResourceLocation PUMPKIN_BLUR = new ResourceLocation("textures/misc/pumpkinblur.png");
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
private static final int WHITE = 0xFFFFFF;
|
|
|
|
|
2013-04-21 20:54:11 +00:00
|
|
|
//Flags to toggle the rendering of certain aspects of the HUD, valid conditions
|
|
|
|
//must be met for them to render normally. If those conditions are met, but this flag
|
2013-04-18 01:55:06 +00:00
|
|
|
//is false, they will not be rendered.
|
2017-09-06 21:19:56 +00:00
|
|
|
public static boolean renderVignette = true;
|
2013-04-18 01:55:06 +00:00
|
|
|
public static boolean renderHelmet = true;
|
|
|
|
public static boolean renderPortal = true;
|
2019-05-23 23:02:15 +00:00
|
|
|
public static boolean renderSpectatorTooltip = true;
|
2013-04-18 01:55:06 +00:00
|
|
|
public static boolean renderHotbar = true;
|
|
|
|
public static boolean renderCrosshairs = true;
|
|
|
|
public static boolean renderBossHealth = true;
|
|
|
|
public static boolean renderHealth = true;
|
|
|
|
public static boolean renderArmor = true;
|
|
|
|
public static boolean renderFood = true;
|
2013-07-01 05:32:11 +00:00
|
|
|
public static boolean renderHealthMount = true;
|
2013-04-18 01:55:06 +00:00
|
|
|
public static boolean renderAir = true;
|
|
|
|
public static boolean renderExperiance = true;
|
2013-07-01 05:32:11 +00:00
|
|
|
public static boolean renderJumpBar = true;
|
2013-04-18 01:55:06 +00:00
|
|
|
public static boolean renderObjective = true;
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
public static int left_height = 39;
|
|
|
|
public static int right_height = 39;
|
2019-07-09 00:49:52 +00:00
|
|
|
/*
|
|
|
|
* If the Euclidian distance to the moused-over block in meters is less than this value, the "Looking at" text will appear on the debug overlay.
|
|
|
|
*/
|
|
|
|
public static double rayTraceDistance = 20.0D;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
private FontRenderer fontrenderer = null;
|
|
|
|
private RenderGameOverlayEvent eventParent;
|
2015-11-27 03:38:21 +00:00
|
|
|
//private static final String MC_VERSION = MinecraftForge.MC_VERSION;
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
private GuiOverlayDebugForge debugOverlay;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
public ForgeIngameGui(Minecraft mc)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
super(mc);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
debugOverlay = new GuiOverlayDebugForge(mc);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-12-02 03:11:17 +00:00
|
|
|
public void renderGameOverlay(float partialTicks)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
this.scaledWidth = this.mc.mainWindow.getScaledWidth();
|
|
|
|
this.scaledHeight = this.mc.mainWindow.getScaledHeight();
|
|
|
|
eventParent = new RenderGameOverlayEvent(partialTicks, this.mc.mainWindow);
|
2019-05-23 23:02:15 +00:00
|
|
|
renderHealthMount = mc.player.getRidingEntity() instanceof LivingEntity;
|
2016-12-21 23:52:30 +00:00
|
|
|
renderFood = mc.player.getRidingEntity() == null;
|
|
|
|
renderJumpBar = mc.player.isRidingHorse();
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
right_height = 39;
|
|
|
|
left_height = 39;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
if (pre(ALL)) return;
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2017-06-11 00:59:01 +00:00
|
|
|
fontrenderer = mc.fontRenderer;
|
2018-09-06 03:06:18 +00:00
|
|
|
//mc.entityRenderer.setupOverlayRendering();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2017-09-06 21:19:56 +00:00
|
|
|
if (renderVignette && Minecraft.isFancyGraphicsEnabled())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2019-02-14 23:08:53 +00:00
|
|
|
func_212303_b(mc.getRenderViewEntity());
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.enableDepthTest();
|
|
|
|
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
if (renderHelmet) renderHelmet(partialTicks);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2019-06-22 02:42:16 +00:00
|
|
|
if (renderPortal && !mc.player.isPotionActive(Effects.NAUSEA))
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
renderPortal(partialTicks);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-06-22 02:42:16 +00:00
|
|
|
if (this.mc.playerController.getCurrentGameType() == GameType.SPECTATOR)
|
2019-05-23 23:02:15 +00:00
|
|
|
{
|
2019-06-22 02:42:16 +00:00
|
|
|
if (renderSpectatorTooltip) spectatorGui.renderTooltip(partialTicks);
|
2019-05-23 23:02:15 +00:00
|
|
|
}
|
|
|
|
else if (!this.mc.gameSettings.hideGUI)
|
|
|
|
{
|
|
|
|
if (renderHotbar) renderHotbar(partialTicks);
|
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
if (!this.mc.gameSettings.hideGUI) {
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
2019-05-23 23:02:15 +00:00
|
|
|
blitOffset = -90;
|
2018-09-22 10:40:22 +00:00
|
|
|
rand.setSeed((long)(ticks * 312871));
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
if (renderCrosshairs) renderAttackIndicator();
|
2018-09-06 01:00:14 +00:00
|
|
|
if (renderBossHealth) renderBossHealth();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
2019-06-22 02:42:16 +00:00
|
|
|
if (this.mc.playerController.shouldDrawHUD() && this.mc.getRenderViewEntity() instanceof PlayerEntity)
|
2018-09-06 01:00:14 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
if (renderHealth) renderHealth(this.scaledWidth, this.scaledHeight);
|
|
|
|
if (renderArmor) renderArmor(this.scaledWidth, this.scaledHeight);
|
|
|
|
if (renderFood) renderFood(this.scaledWidth, this.scaledHeight);
|
|
|
|
if (renderHealthMount) renderHealthMount(this.scaledWidth, this.scaledHeight);
|
|
|
|
if (renderAir) renderAir(this.scaledWidth, this.scaledHeight);
|
2018-09-06 01:00:14 +00:00
|
|
|
}
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
if (renderJumpBar)
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
renderHorseJumpBar(this.scaledWidth / 2 - 91);
|
2018-09-06 01:00:14 +00:00
|
|
|
}
|
|
|
|
else if (renderExperiance)
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
renderExperience(this.scaledWidth / 2 - 91);
|
2018-09-06 01:00:14 +00:00
|
|
|
}
|
2019-06-22 02:42:16 +00:00
|
|
|
if (this.mc.gameSettings.heldItemTooltips && this.mc.playerController.getCurrentGameType() != GameType.SPECTATOR) {
|
2018-09-22 10:40:22 +00:00
|
|
|
this.renderSelectedItem();
|
2018-09-06 01:00:14 +00:00
|
|
|
} else if (this.mc.player.isSpectator()) {
|
2019-06-22 02:42:16 +00:00
|
|
|
this.spectatorGui.renderSelectedItem();
|
2018-09-06 01:00:14 +00:00
|
|
|
}
|
2013-07-01 05:32:11 +00:00
|
|
|
}
|
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
renderSleepFade(this.scaledWidth, this.scaledHeight);
|
2018-09-06 01:00:14 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
renderHUDText(this.scaledWidth, this.scaledHeight);
|
2016-07-01 20:53:26 +00:00
|
|
|
renderFPSGraph();
|
2018-09-22 10:40:22 +00:00
|
|
|
renderPotionEffects();
|
2018-09-06 01:00:14 +00:00
|
|
|
if (!mc.gameSettings.hideGUI) {
|
2018-09-22 10:40:22 +00:00
|
|
|
renderRecordOverlay(this.scaledWidth, this.scaledHeight, partialTicks);
|
2018-09-06 01:00:14 +00:00
|
|
|
renderSubtitles();
|
2018-09-22 10:40:22 +00:00
|
|
|
renderTitle(this.scaledWidth, this.scaledHeight, partialTicks);
|
2018-09-06 01:00:14 +00:00
|
|
|
}
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
Scoreboard scoreboard = this.mc.world.getScoreboard();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
ScoreObjective objective = null;
|
2018-09-22 10:40:22 +00:00
|
|
|
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.player.getScoreboardName());
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
if (scoreplayerteam != null)
|
|
|
|
{
|
2017-06-11 00:59:01 +00:00
|
|
|
int slot = scoreplayerteam.getColor().getColorIndex();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
if (slot >= 0) objective = scoreboard.getObjectiveInDisplaySlot(3 + slot);
|
|
|
|
}
|
|
|
|
ScoreObjective scoreobjective1 = objective != null ? objective : scoreboard.getObjectiveInDisplaySlot(1);
|
2014-12-22 13:34:35 +00:00
|
|
|
if (renderObjective && scoreobjective1 != null)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
this.renderScoreboard(scoreobjective1);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.blendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
|
|
|
GlStateManager.disableAlphaTest();
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
renderChat(this.scaledWidth, this.scaledHeight);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
renderPlayerList(this.scaledWidth, this.scaledHeight);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableLighting();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.enableAlphaTest();
|
2013-05-09 12:27:59 +00:00
|
|
|
|
|
|
|
post(ALL);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
@Override
|
2019-05-23 23:02:15 +00:00
|
|
|
protected void renderAttackIndicator()
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
if (pre(CROSSHAIRS)) return;
|
2019-05-23 23:02:15 +00:00
|
|
|
bind(AbstractGui.GUI_ICONS_LOCATION);
|
2016-03-26 06:45:20 +00:00
|
|
|
GlStateManager.enableBlend();
|
2019-02-07 01:44:02 +00:00
|
|
|
GlStateManager.enableAlphaTest();
|
2019-05-23 23:02:15 +00:00
|
|
|
super.renderAttackIndicator();
|
2013-04-18 01:55:06 +00:00
|
|
|
post(CROSSHAIRS);
|
|
|
|
}
|
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
@Override
|
2018-09-22 10:40:22 +00:00
|
|
|
protected void renderPotionEffects()
|
2016-03-08 07:34:40 +00:00
|
|
|
{
|
|
|
|
if (pre(POTION_ICONS)) return;
|
2018-09-22 10:40:22 +00:00
|
|
|
super.renderPotionEffects();
|
2016-03-08 07:34:40 +00:00
|
|
|
post(POTION_ICONS);
|
|
|
|
}
|
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
protected void renderSubtitles()
|
2016-03-08 07:34:40 +00:00
|
|
|
{
|
|
|
|
if (pre(SUBTITLES)) return;
|
2019-06-22 02:42:16 +00:00
|
|
|
this.overlaySubtitle.render();
|
2016-03-08 07:34:40 +00:00
|
|
|
post(SUBTITLES);
|
|
|
|
}
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderBossHealth()
|
|
|
|
{
|
|
|
|
if (pre(BOSSHEALTH)) return;
|
2019-05-23 23:02:15 +00:00
|
|
|
bind(AbstractGui.GUI_ICONS_LOCATION);
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("bossHealth");
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2019-06-22 02:42:16 +00:00
|
|
|
this.overlayBoss.render();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
post(BOSSHEALTH);
|
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2017-09-06 21:19:56 +00:00
|
|
|
@Override
|
2019-02-14 23:08:53 +00:00
|
|
|
protected void func_212303_b(Entity entity)
|
2017-09-06 21:19:56 +00:00
|
|
|
{
|
|
|
|
if (pre(VIGNETTE))
|
|
|
|
{
|
|
|
|
// Need to put this here, since Vanilla assumes this state after the vignette was rendered.
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.enableDepthTest();
|
|
|
|
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
2017-09-06 21:19:56 +00:00
|
|
|
return;
|
|
|
|
}
|
2019-02-14 23:08:53 +00:00
|
|
|
super.func_212303_b(entity);
|
2017-09-06 21:19:56 +00:00
|
|
|
post(VIGNETTE);
|
|
|
|
}
|
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
private void renderHelmet(float partialTicks)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
if (pre(HELMET)) return;
|
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
ItemStack itemstack = this.mc.player.inventory.armorItemInSlot(3);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2017-01-11 23:15:47 +00:00
|
|
|
if (this.mc.gameSettings.thirdPersonView == 0 && !itemstack.isEmpty())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2017-01-11 23:15:47 +00:00
|
|
|
Item item = itemstack.getItem();
|
2018-09-22 10:40:22 +00:00
|
|
|
if (item == Blocks.CARVED_PUMPKIN.asItem())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
renderPumpkinOverlay();
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
item.renderHelmetOverlay(itemstack, mc.player, this.scaledWidth, this.scaledHeight, partialTicks);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post(HELMET);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void renderArmor(int width, int height)
|
|
|
|
{
|
|
|
|
if (pre(ARMOR)) return;
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("armor");
|
2013-04-18 01:55:06 +00:00
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2013-04-18 01:55:06 +00:00
|
|
|
int left = width / 2 - 91;
|
2013-07-01 05:32:11 +00:00
|
|
|
int top = height - left_height;
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2018-12-11 06:19:43 +00:00
|
|
|
int level = mc.player.getTotalArmorValue();
|
2013-04-18 01:55:06 +00:00
|
|
|
for (int i = 1; level > 0 && i < 20; i += 2)
|
|
|
|
{
|
|
|
|
if (i < level)
|
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(left, top, 34, 9, 9, 9);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
else if (i == level)
|
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(left, top, 25, 9, 9, 9);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
else if (i > level)
|
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(left, top, 16, 9, 9, 9);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
left += 8;
|
|
|
|
}
|
2013-07-01 05:32:11 +00:00
|
|
|
left_height += 10;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
post(ARMOR);
|
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
@Override
|
2018-09-22 10:40:22 +00:00
|
|
|
protected void renderPortal(float partialTicks)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
if (pre(PORTAL)) return;
|
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
float f1 = mc.player.prevTimeInPortal + (mc.player.timeInPortal - mc.player.prevTimeInPortal) * partialTicks;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
if (f1 > 0.0F)
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
super.renderPortal(f1);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
post(PORTAL);
|
|
|
|
}
|
|
|
|
|
2014-12-02 03:11:17 +00:00
|
|
|
@Override
|
2018-09-22 10:40:22 +00:00
|
|
|
protected void renderHotbar(float partialTicks)
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
{
|
|
|
|
if (pre(HOTBAR)) return;
|
|
|
|
|
2019-06-22 02:42:16 +00:00
|
|
|
if (mc.playerController.getCurrentGameType() == GameType.SPECTATOR)
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
{
|
2019-06-22 02:42:16 +00:00
|
|
|
this.spectatorGui.renderTooltip(partialTicks);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
super.renderHotbar(partialTicks);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
post(HOTBAR);
|
|
|
|
}
|
|
|
|
|
2018-05-17 07:41:21 +00:00
|
|
|
@Override
|
|
|
|
public void setOverlayMessage(ITextComponent component, boolean animateColor)
|
|
|
|
{
|
|
|
|
this.setOverlayMessage(component.getFormattedText(), animateColor);
|
|
|
|
}
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderAir(int width, int height)
|
|
|
|
{
|
|
|
|
if (pre(AIR)) return;
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("air");
|
2019-05-23 23:02:15 +00:00
|
|
|
PlayerEntity player = (PlayerEntity)this.mc.getRenderViewEntity();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2013-04-18 01:55:06 +00:00
|
|
|
int left = width / 2 + 91;
|
2013-07-01 05:32:11 +00:00
|
|
|
int top = height - right_height;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
int air = player.getAir();
|
2018-09-22 10:40:22 +00:00
|
|
|
if (player.areEyesInFluid(FluidTags.WATER) || air < 300)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2016-12-21 23:52:30 +00:00
|
|
|
int full = MathHelper.ceil((double)(air - 2) * 10.0D / 300.0D);
|
|
|
|
int partial = MathHelper.ceil((double)air * 10.0D / 300.0D) - full;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
for (int i = 0; i < full + partial; ++i)
|
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(left - i * 8 - 9, top, (i < full ? 16 : 25), 18, 9, 9);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2013-07-01 05:32:11 +00:00
|
|
|
right_height += 10;
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
post(AIR);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void renderHealth(int width, int height)
|
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
bind(GUI_ICONS_LOCATION);
|
2013-04-18 01:55:06 +00:00
|
|
|
if (pre(HEALTH)) return;
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("health");
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
PlayerEntity player = (PlayerEntity)this.mc.getRenderViewEntity();
|
2016-12-21 23:52:30 +00:00
|
|
|
int health = MathHelper.ceil(player.getHealth());
|
2018-09-22 10:40:22 +00:00
|
|
|
boolean highlight = healthUpdateCounter > (long)ticks && (healthUpdateCounter - (long)ticks) / 3L %2L == 1L;
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
2015-11-24 04:18:52 +00:00
|
|
|
if (health < this.playerHealth && player.hurtResistantTime > 0)
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
this.lastSystemTime = Util.milliTime();
|
|
|
|
this.healthUpdateCounter = (long)(this.ticks + 20);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
2015-11-24 04:18:52 +00:00
|
|
|
else if (health > this.playerHealth && player.hurtResistantTime > 0)
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
this.lastSystemTime = Util.milliTime();
|
|
|
|
this.healthUpdateCounter = (long)(this.ticks + 10);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
if (Util.milliTime() - this.lastSystemTime > 1000L)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2015-11-24 04:18:52 +00:00
|
|
|
this.playerHealth = health;
|
|
|
|
this.lastPlayerHealth = health;
|
2018-09-22 10:40:22 +00:00
|
|
|
this.lastSystemTime = Util.milliTime();
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-24 04:18:52 +00:00
|
|
|
this.playerHealth = health;
|
|
|
|
int healthLast = this.lastPlayerHealth;
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
IAttributeInstance attrMaxHealth = player.getAttribute(SharedMonsterAttributes.MAX_HEALTH);
|
|
|
|
float healthMax = (float)attrMaxHealth.getValue();
|
2016-12-21 23:52:30 +00:00
|
|
|
float absorb = MathHelper.ceil(player.getAbsorptionAmount());
|
2013-07-01 05:32:11 +00:00
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
int healthRows = MathHelper.ceil((healthMax + absorb) / 2.0F / 10.0F);
|
2013-07-01 05:32:11 +00:00
|
|
|
int rowHeight = Math.max(10 - (healthRows - 2), 3);
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
this.rand.setSeed((long)(ticks * 312871));
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
int left = width / 2 - 91;
|
2013-07-01 05:32:11 +00:00
|
|
|
int top = height - left_height;
|
|
|
|
left_height += (healthRows * rowHeight);
|
|
|
|
if (rowHeight != 10) left_height += 10 - rowHeight;
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
int regen = -1;
|
2019-06-22 02:42:16 +00:00
|
|
|
if (player.isPotionActive(Effects.REGENERATION))
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
regen = ticks % 25;
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
final int TOP = 9 * (mc.world.getWorldInfo().isHardcore() ? 5 : 0);
|
2013-07-01 05:32:11 +00:00
|
|
|
final int BACKGROUND = (highlight ? 25 : 16);
|
|
|
|
int MARGIN = 16;
|
2019-06-22 02:42:16 +00:00
|
|
|
if (player.isPotionActive(Effects.POISON)) MARGIN += 36;
|
|
|
|
else if (player.isPotionActive(Effects.WITHER)) MARGIN += 72;
|
2013-07-01 05:32:11 +00:00
|
|
|
float absorbRemaining = absorb;
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
for (int i = MathHelper.ceil((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2014-01-18 05:55:48 +00:00
|
|
|
//int b0 = (highlight ? 1 : 0);
|
2016-12-21 23:52:30 +00:00
|
|
|
int row = MathHelper.ceil((float)(i + 1) / 10.0F) - 1;
|
2013-07-01 05:32:11 +00:00
|
|
|
int x = left + i % 10 * 8;
|
|
|
|
int y = top - row * rowHeight;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
if (health <= 4) y += rand.nextInt(2);
|
2013-07-08 21:30:25 +00:00
|
|
|
if (i == regen) y -= 2;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, BACKGROUND, TOP, 9, 9);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
if (highlight)
|
|
|
|
{
|
2013-07-01 05:32:11 +00:00
|
|
|
if (i * 2 + 1 < healthLast)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, MARGIN + 54, TOP, 9, 9); //6
|
2013-07-01 05:32:11 +00:00
|
|
|
else if (i * 2 + 1 == healthLast)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, MARGIN + 63, TOP, 9, 9); //7
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
if (absorbRemaining > 0.0F)
|
|
|
|
{
|
|
|
|
if (absorbRemaining == absorb && absorb % 2.0F == 1.0F)
|
2016-03-08 07:34:40 +00:00
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, MARGIN + 153, TOP, 9, 9); //17
|
2016-03-08 07:34:40 +00:00
|
|
|
absorbRemaining -= 1.0F;
|
|
|
|
}
|
2013-07-01 05:32:11 +00:00
|
|
|
else
|
2016-03-08 07:34:40 +00:00
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, MARGIN + 144, TOP, 9, 9); //16
|
2016-03-08 07:34:40 +00:00
|
|
|
absorbRemaining -= 2.0F;
|
|
|
|
}
|
2013-07-01 05:32:11 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (i * 2 + 1 < health)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, MARGIN + 36, TOP, 9, 9); //4
|
2013-07-01 05:32:11 +00:00
|
|
|
else if (i * 2 + 1 == health)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, MARGIN + 45, TOP, 9, 9); //5
|
2013-07-01 05:32:11 +00:00
|
|
|
}
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2013-07-08 21:30:25 +00:00
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
post(HEALTH);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void renderFood(int width, int height)
|
|
|
|
{
|
|
|
|
if (pre(FOOD)) return;
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("food");
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
PlayerEntity player = (PlayerEntity)this.mc.getRenderViewEntity();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2013-04-18 01:55:06 +00:00
|
|
|
int left = width / 2 + 91;
|
2013-07-01 05:32:11 +00:00
|
|
|
int top = height - right_height;
|
|
|
|
right_height += 10;
|
2013-04-18 01:55:06 +00:00
|
|
|
boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic
|
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
FoodStats stats = mc.player.getFoodStats();
|
2013-04-18 01:55:06 +00:00
|
|
|
int level = stats.getFoodLevel();
|
|
|
|
|
|
|
|
for (int i = 0; i < 10; ++i)
|
|
|
|
{
|
|
|
|
int idx = i * 2 + 1;
|
|
|
|
int x = left - i * 8 - 9;
|
|
|
|
int y = top;
|
|
|
|
int icon = 16;
|
2016-03-23 14:34:48 +00:00
|
|
|
byte background = 0;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2019-06-22 02:42:16 +00:00
|
|
|
if (mc.player.isPotionActive(Effects.HUNGER))
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
icon += 36;
|
2016-03-23 14:34:48 +00:00
|
|
|
background = 13;
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2016-03-23 14:34:48 +00:00
|
|
|
if (unused) background = 1; //Probably should be a += 1 but vanilla never uses this
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
if (player.getFoodStats().getSaturationLevel() <= 0.0F && ticks % (level * 3 + 1) == 0)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
y = top + (rand.nextInt(3) - 1);
|
|
|
|
}
|
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, 16 + background * 9, 27, 9, 9);
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
if (idx < level)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, icon + 36, 27, 9, 9);
|
2013-07-01 05:32:11 +00:00
|
|
|
else if (idx == level)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, y, icon + 45, 27, 9, 9);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
post(FOOD);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void renderSleepFade(int width, int height)
|
|
|
|
{
|
2016-12-21 23:52:30 +00:00
|
|
|
if (mc.player.getSleepTimer() > 0)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("sleep");
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.disableDepthTest();
|
|
|
|
GlStateManager.disableAlphaTest();
|
2016-12-21 23:52:30 +00:00
|
|
|
int sleepTime = mc.player.getSleepTimer();
|
2013-04-18 01:55:06 +00:00
|
|
|
float opacity = (float)sleepTime / 100.0F;
|
|
|
|
|
|
|
|
if (opacity > 1.0F)
|
|
|
|
{
|
|
|
|
opacity = 1.0F - (float)(sleepTime - 100) / 10.0F;
|
|
|
|
}
|
|
|
|
|
|
|
|
int color = (int)(220.0F * opacity) << 24 | 1052704;
|
2019-05-23 23:02:15 +00:00
|
|
|
fill(0, 0, width, height, color);
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.enableAlphaTest();
|
|
|
|
GlStateManager.enableDepthTest();
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
protected void renderExperience(int x)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
bind(GUI_ICONS_LOCATION);
|
2013-04-18 01:55:06 +00:00
|
|
|
if (pre(EXPERIENCE)) return;
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2019-06-22 02:42:16 +00:00
|
|
|
if (mc.playerController.gameIsSurvivalOrAdventure())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
super.renderExpBar(x);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
2013-07-01 05:32:11 +00:00
|
|
|
|
|
|
|
post(EXPERIENCE);
|
|
|
|
}
|
|
|
|
|
2018-09-06 01:00:14 +00:00
|
|
|
@Override
|
2018-09-22 10:40:22 +00:00
|
|
|
public void renderHorseJumpBar(int x)
|
2013-07-01 05:32:11 +00:00
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
bind(GUI_ICONS_LOCATION);
|
2013-07-01 05:32:11 +00:00
|
|
|
if (pre(JUMPBAR)) return;
|
|
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
super.renderHorseJumpBar(x);
|
2013-07-01 05:32:11 +00:00
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
post(JUMPBAR);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void renderHUDText(int width, int height)
|
|
|
|
{
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("forgeHudText");
|
2019-05-23 23:02:15 +00:00
|
|
|
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
ArrayList<String> listL = new ArrayList<String>();
|
|
|
|
ArrayList<String> listR = new ArrayList<String>();
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
if (mc.isDemo())
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
long time = mc.world.getGameTime();
|
2013-04-18 01:55:06 +00:00
|
|
|
if (time >= 120500L)
|
|
|
|
{
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
listR.add(I18n.format("demo.demoExpired"));
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
listR.add(I18n.format("demo.remainingTime", StringUtils.ticksToElapsedTime((int)(120500L - time))));
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2014-05-07 20:52:10 +00:00
|
|
|
if (this.mc.gameSettings.showDebugInfo && !pre(DEBUG))
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2018-12-16 20:47:16 +00:00
|
|
|
debugOverlay.update();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
listL.addAll(debugOverlay.getLeft());
|
|
|
|
listR.addAll(debugOverlay.getRight());
|
2014-05-07 20:52:10 +00:00
|
|
|
post(DEBUG);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
RenderGameOverlayEvent.Text event = new RenderGameOverlayEvent.Text(eventParent, listL, listR);
|
2013-04-18 01:55:06 +00:00
|
|
|
if (!MinecraftForge.EVENT_BUS.post(event))
|
|
|
|
{
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
int top = 2;
|
|
|
|
for (String msg : listL)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
if (msg == null) continue;
|
2019-05-23 23:02:15 +00:00
|
|
|
fill(1, top - 1, 2 + fontrenderer.getStringWidth(msg) + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
|
2018-09-06 01:00:14 +00:00
|
|
|
fontrenderer.drawStringWithShadow(msg, 2, top, 14737632);
|
2015-01-28 20:41:39 +00:00
|
|
|
top += fontrenderer.FONT_HEIGHT;
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
top = 2;
|
|
|
|
for (String msg : listR)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
if (msg == null) continue;
|
|
|
|
int w = fontrenderer.getStringWidth(msg);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
int left = width - 2 - w;
|
2019-05-23 23:02:15 +00:00
|
|
|
fill(left - 1, top - 1, left + w + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
|
2018-09-06 01:00:14 +00:00
|
|
|
fontrenderer.drawStringWithShadow(msg, left, top, 14737632);
|
2015-01-28 20:41:39 +00:00
|
|
|
top += fontrenderer.FONT_HEIGHT;
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
post(TEXT);
|
|
|
|
}
|
|
|
|
|
2016-07-01 20:53:26 +00:00
|
|
|
protected void renderFPSGraph()
|
|
|
|
{
|
|
|
|
if (this.mc.gameSettings.showDebugInfo && this.mc.gameSettings.showLagometer && !pre(FPS_GRAPH))
|
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
this.debugOverlay.render();
|
2016-07-01 20:53:26 +00:00
|
|
|
post(FPS_GRAPH);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderRecordOverlay(int width, int height, float partialTicks)
|
|
|
|
{
|
2016-12-21 23:52:30 +00:00
|
|
|
if (overlayMessageTime > 0)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("overlayMessage");
|
2016-12-21 23:52:30 +00:00
|
|
|
float hue = (float)overlayMessageTime - partialTicks;
|
2013-04-18 01:55:06 +00:00
|
|
|
int opacity = (int)(hue * 256.0F / 20.0F);
|
2013-04-21 20:54:11 +00:00
|
|
|
if (opacity > 255) opacity = 255;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
if (opacity > 0)
|
|
|
|
{
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.pushMatrix();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.translatef((float)(width / 2), (float)(height - 68), 0.0F);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
2019-03-25 19:06:20 +00:00
|
|
|
int color = (animateOverlayMessageColor ? MathHelper.hsvToRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
|
2018-09-06 01:00:14 +00:00
|
|
|
fontrenderer.drawStringWithShadow(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
|
|
|
GlStateManager.popMatrix();
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
protected void renderTitle(int width, int height, float partialTicks)
|
|
|
|
{
|
2016-03-13 01:40:03 +00:00
|
|
|
if (titlesTimer > 0)
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
{
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("titleAndSubtitle");
|
2016-03-13 01:40:03 +00:00
|
|
|
float age = (float)this.titlesTimer - partialTicks;
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
int opacity = 255;
|
|
|
|
|
2016-03-13 01:40:03 +00:00
|
|
|
if (titlesTimer > titleFadeOut + titleDisplayTime)
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
{
|
2016-03-13 01:40:03 +00:00
|
|
|
float f3 = (float)(titleFadeIn + titleDisplayTime + titleFadeOut) - age;
|
|
|
|
opacity = (int)(f3 * 255.0F / (float)titleFadeIn);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
2016-03-13 01:40:03 +00:00
|
|
|
if (titlesTimer <= titleFadeOut) opacity = (int)(age * 255.0F / (float)this.titleFadeOut);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
opacity = MathHelper.clamp(opacity, 0, 255);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
|
|
|
if (opacity > 8)
|
|
|
|
{
|
|
|
|
GlStateManager.pushMatrix();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.translatef((float)(width / 2), (float)(height / 2), 0.0F);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.pushMatrix();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.scalef(4.0F, 4.0F, 4.0F);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
int l = opacity << 24 & -16777216;
|
2018-09-06 01:00:14 +00:00
|
|
|
this.getFontRenderer().drawStringWithShadow(this.displayedTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedTitle) / 2), -10.0F, 16777215 | l);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.popMatrix();
|
|
|
|
GlStateManager.pushMatrix();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.scalef(2.0F, 2.0F, 2.0F);
|
2018-09-06 01:00:14 +00:00
|
|
|
this.getFontRenderer().drawStringWithShadow(this.displayedSubTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedSubTitle) / 2), 5.0F, 16777215 | l);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.popMatrix();
|
|
|
|
GlStateManager.disableBlend();
|
|
|
|
GlStateManager.popMatrix();
|
|
|
|
}
|
|
|
|
|
2019-06-08 14:45:28 +00:00
|
|
|
this.mc.getProfiler().endSection();
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderChat(int width, int height)
|
|
|
|
{
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().startSection("chat");
|
2013-09-30 21:32:12 +00:00
|
|
|
|
|
|
|
RenderGameOverlayEvent.Chat event = new RenderGameOverlayEvent.Chat(eventParent, 0, height - 48);
|
|
|
|
if (MinecraftForge.EVENT_BUS.post(event)) return;
|
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.pushMatrix();
|
2018-09-22 10:40:22 +00:00
|
|
|
GlStateManager.translatef((float) event.getPosX(), (float) event.getPosY(), 0.0F);
|
2019-06-22 02:42:16 +00:00
|
|
|
persistantChatGUI.render(ticks);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.popMatrix();
|
2013-09-30 21:32:12 +00:00
|
|
|
|
|
|
|
post(CHAT);
|
|
|
|
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endSection();
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderPlayerList(int width, int height)
|
|
|
|
{
|
2016-12-21 23:52:30 +00:00
|
|
|
ScoreObjective scoreobjective = this.mc.world.getScoreboard().getObjectiveInDisplaySlot(0);
|
2019-06-22 02:42:16 +00:00
|
|
|
ClientPlayNetHandler handler = mc.player.connection;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2015-11-24 04:18:52 +00:00
|
|
|
if (mc.gameSettings.keyBindPlayerList.isKeyDown() && (!mc.isIntegratedServerRunning() || handler.getPlayerInfoMap().size() > 1 || scoreobjective != null))
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2019-06-22 02:42:16 +00:00
|
|
|
this.overlayPlayerList.setVisible(true);
|
2013-10-01 00:06:04 +00:00
|
|
|
if (pre(PLAYER_LIST)) return;
|
2019-06-22 02:42:16 +00:00
|
|
|
this.overlayPlayerList.render(width, this.mc.world.getScoreboard(), scoreobjective);
|
2013-10-01 00:06:04 +00:00
|
|
|
post(PLAYER_LIST);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
else
|
|
|
|
{
|
2019-06-22 02:42:16 +00:00
|
|
|
this.overlayPlayerList.setVisible(false);
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
protected void renderHealthMount(int width, int height)
|
|
|
|
{
|
2019-05-23 23:02:15 +00:00
|
|
|
PlayerEntity player = (PlayerEntity)mc.getRenderViewEntity();
|
2016-03-13 01:40:03 +00:00
|
|
|
Entity tmp = player.getRidingEntity();
|
2019-05-23 23:02:15 +00:00
|
|
|
if (!(tmp instanceof LivingEntity)) return;
|
2013-07-01 05:32:11 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
bind(GUI_ICONS_LOCATION);
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
if (pre(HEALTHMOUNT)) return;
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
boolean unused = false;
|
|
|
|
int left_align = width / 2 + 91;
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2019-06-08 14:45:28 +00:00
|
|
|
mc.getProfiler().endStartSection("mountHealth");
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.enableBlend();
|
2019-05-23 23:02:15 +00:00
|
|
|
LivingEntity mount = (LivingEntity)tmp;
|
2013-09-03 19:52:58 +00:00
|
|
|
int health = (int)Math.ceil((double)mount.getHealth());
|
|
|
|
float healthMax = mount.getMaxHealth();
|
2013-07-01 05:32:11 +00:00
|
|
|
int hearts = (int)(healthMax + 0.5F) / 2;
|
|
|
|
|
|
|
|
if (hearts > 30) hearts = 30;
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
final int MARGIN = 52;
|
|
|
|
final int BACKGROUND = MARGIN + (unused ? 1 : 0);
|
|
|
|
final int HALF = MARGIN + 45;
|
|
|
|
final int FULL = MARGIN + 36;
|
|
|
|
|
|
|
|
for (int heart = 0; hearts > 0; heart += 20)
|
|
|
|
{
|
|
|
|
int top = height - right_height;
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
int rowCount = Math.min(hearts, 10);
|
|
|
|
hearts -= rowCount;
|
|
|
|
|
|
|
|
for (int i = 0; i < rowCount; ++i)
|
|
|
|
{
|
|
|
|
int x = left_align - i * 8 - 9;
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, top, BACKGROUND, 9, 9, 9);
|
2013-07-01 05:32:11 +00:00
|
|
|
|
|
|
|
if (i * 2 + 1 + heart < health)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, top, FULL, 9, 9, 9);
|
2013-07-01 05:32:11 +00:00
|
|
|
else if (i * 2 + 1 + heart == health)
|
2019-05-23 23:02:15 +00:00
|
|
|
blit(x, top, HALF, 9, 9, 9);
|
2013-07-01 05:32:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
right_height += 10;
|
|
|
|
}
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
GlStateManager.disableBlend();
|
2013-07-01 05:32:11 +00:00
|
|
|
post(HEALTHMOUNT);
|
|
|
|
}
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
//Helper macros
|
|
|
|
private boolean pre(ElementType type)
|
|
|
|
{
|
|
|
|
return MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Pre(eventParent, type));
|
|
|
|
}
|
|
|
|
private void post(ElementType type)
|
|
|
|
{
|
|
|
|
MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Post(eventParent, type));
|
|
|
|
}
|
2013-07-01 05:32:11 +00:00
|
|
|
private void bind(ResourceLocation res)
|
|
|
|
{
|
2013-09-03 19:52:58 +00:00
|
|
|
mc.getTextureManager().bindTexture(res);
|
2013-07-01 05:32:11 +00:00
|
|
|
}
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
|
2019-05-23 23:02:15 +00:00
|
|
|
private class GuiOverlayDebugForge extends DebugOverlayGui
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
{
|
2016-07-01 20:53:26 +00:00
|
|
|
private Minecraft mc;
|
|
|
|
private GuiOverlayDebugForge(Minecraft mc)
|
|
|
|
{
|
|
|
|
super(mc);
|
|
|
|
this.mc = mc;
|
|
|
|
}
|
2018-12-16 20:47:16 +00:00
|
|
|
public void update()
|
|
|
|
{
|
|
|
|
Entity entity = this.mc.getRenderViewEntity();
|
2019-07-09 00:49:52 +00:00
|
|
|
this.rayTraceBlock = entity.func_213324_a(rayTraceDistance, 0.0F, false);
|
|
|
|
this.rayTraceFluid = entity.func_213324_a(rayTraceDistance, 0.0F, true);
|
2018-12-16 20:47:16 +00:00
|
|
|
}
|
2014-12-02 03:11:17 +00:00
|
|
|
@Override protected void renderDebugInfoLeft(){}
|
2018-09-22 10:40:22 +00:00
|
|
|
@Override protected void renderDebugInfoRight(){}
|
2016-07-01 20:53:26 +00:00
|
|
|
private List<String> getLeft()
|
|
|
|
{
|
2018-09-22 10:40:22 +00:00
|
|
|
List<String> ret = this.call();
|
2016-07-01 20:53:26 +00:00
|
|
|
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");
|
|
|
|
return ret;
|
|
|
|
}
|
2014-12-02 03:11:17 +00:00
|
|
|
private List<String> getRight(){ return this.getDebugInfoRight(); }
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
}
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|