2016-06-23 03:49:47 +00:00
|
|
|
/*
|
|
|
|
* Minecraft Forge
|
|
|
|
* Copyright (c) 2016.
|
|
|
|
*
|
|
|
|
* 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.awt.Color;
|
|
|
|
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.block.material.Material;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
import net.minecraft.client.gui.FontRenderer;
|
2013-07-01 01:13:01 +00:00
|
|
|
import net.minecraft.client.gui.Gui;
|
2013-04-18 01:55:06 +00:00
|
|
|
import net.minecraft.client.gui.GuiIngame;
|
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.client.gui.GuiOverlayDebug;
|
2013-04-18 01:55:06 +00:00
|
|
|
import net.minecraft.client.gui.ScaledResolution;
|
2013-12-10 05:59:12 +00:00
|
|
|
import net.minecraft.client.network.NetHandlerPlayClient;
|
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.client.renderer.GlStateManager;
|
2013-12-10 05:59:12 +00:00
|
|
|
import net.minecraft.client.renderer.OpenGlHelper;
|
|
|
|
import net.minecraft.client.resources.I18n;
|
2013-07-01 05:32:11 +00:00
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
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;
|
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.entity.player.EntityPlayer;
|
2013-12-10 05:59:12 +00:00
|
|
|
import net.minecraft.init.Blocks;
|
2016-03-08 07:34:40 +00:00
|
|
|
import net.minecraft.init.MobEffects;
|
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;
|
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;
|
2016-03-01 12:58:03 +00:00
|
|
|
import net.minecraft.util.math.MathHelper;
|
|
|
|
import net.minecraft.util.text.TextFormatting;
|
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.ForgeHooks;
|
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
2013-07-01 05:32:11 +00:00
|
|
|
|
|
|
|
import org.lwjgl.opengl.GL11;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
public class GuiIngameForge extends GuiIngame
|
|
|
|
{
|
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;
|
|
|
|
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;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
private ScaledResolution res = null;
|
|
|
|
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
|
|
|
|
|
|
|
public GuiIngameForge(Minecraft mc)
|
|
|
|
{
|
|
|
|
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
|
|
|
{
|
EntityAIAttackOnCollide, ServerStatusResponse, MinecraftServer, NetHandlerLoginServer, Vec3, BiomeGenBase, AnvilChunkLoader, ChunkProviderServer, MapGenRavine, MinecraftServer updated; fix in Block, GuiIngameForge; can load the world and play with ~20 more manual error fixes.
2015-11-10 18:47:08 +00:00
|
|
|
res = new ScaledResolution(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
|
|
|
eventParent = new RenderGameOverlayEvent(partialTicks, res);
|
2013-04-18 01:55:06 +00:00
|
|
|
int width = res.getScaledWidth();
|
|
|
|
int height = res.getScaledHeight();
|
2016-12-21 23:52:30 +00:00
|
|
|
renderHealthMount = mc.player.getRidingEntity() instanceof EntityLivingBase;
|
|
|
|
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;
|
2013-04-18 01:55:06 +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();
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2017-09-06 21:19:56 +00:00
|
|
|
if (renderVignette && Minecraft.isFancyGraphicsEnabled())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2017-06-05 21:04:10 +00:00
|
|
|
renderVignette(mc.player.getBrightness(), res);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-03-08 07:34:40 +00:00
|
|
|
GlStateManager.enableDepth();
|
2016-03-13 01:40:03 +00:00
|
|
|
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
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
|
|
|
if (renderHelmet) renderHelmet(res, partialTicks);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
if (renderPortal && !mc.player.isPotionActive(MobEffects.NAUSEA))
|
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
|
|
|
renderPortal(res, partialTicks);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
2016-03-13 01:40:03 +00:00
|
|
|
if (renderHotbar) renderHotbar(res, partialTicks);
|
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
|
|
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
|
|
|
zLevel = -90.0F;
|
|
|
|
rand.setSeed((long)(updateCounter * 312871));
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2016-03-08 07:34:40 +00:00
|
|
|
if (renderCrosshairs) renderCrosshairs(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 (renderBossHealth) renderBossHealth();
|
|
|
|
|
2016-03-08 07:34:40 +00:00
|
|
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
2014-12-02 03:11:17 +00:00
|
|
|
if (this.mc.playerController.shouldDrawHUD() && this.mc.getRenderViewEntity() instanceof EntityPlayer)
|
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 (renderHealth) renderHealth(width, height);
|
|
|
|
if (renderArmor) renderArmor(width, height);
|
|
|
|
if (renderFood) renderFood(width, height);
|
|
|
|
if (renderHealthMount) renderHealthMount(width, height);
|
|
|
|
if (renderAir) renderAir(width, height);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2016-03-08 07:34:40 +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
|
|
|
renderSleepFade(width, height);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
if (renderJumpBar)
|
|
|
|
{
|
|
|
|
renderJumpBar(width, height);
|
|
|
|
}
|
2013-07-08 21:30:25 +00:00
|
|
|
else if (renderExperiance)
|
2013-07-01 05:32:11 +00:00
|
|
|
{
|
|
|
|
renderExperience(width, height);
|
|
|
|
}
|
|
|
|
|
2016-03-23 14:34:48 +00:00
|
|
|
renderToolHighlight(res);
|
2013-04-18 01:55:06 +00:00
|
|
|
renderHUDText(width, height);
|
2016-07-01 20:53:26 +00:00
|
|
|
renderFPSGraph();
|
2016-03-08 07:34:40 +00:00
|
|
|
renderPotionIcons(res);
|
2013-04-18 01:55:06 +00:00
|
|
|
renderRecordOverlay(width, height, partialTicks);
|
2016-03-08 07:34:40 +00:00
|
|
|
renderSubtitles(res);
|
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
|
|
|
renderTitle(width, height, partialTicks);
|
|
|
|
|
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;
|
2016-12-21 23:52:30 +00:00
|
|
|
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.player.getName());
|
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
|
|
|
{
|
2015-11-24 04:18:52 +00:00
|
|
|
this.renderScoreboard(scoreobjective1, res);
|
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();
|
|
|
|
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
|
|
|
GlStateManager.disableAlpha();
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
renderChat(width, height);
|
|
|
|
|
|
|
|
renderPlayerList(width, height);
|
|
|
|
|
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.color(1.0F, 1.0F, 1.0F, 1.0F);
|
|
|
|
GlStateManager.disableLighting();
|
|
|
|
GlStateManager.enableAlpha();
|
2013-05-09 12:27:59 +00:00
|
|
|
|
|
|
|
post(ALL);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public ScaledResolution getResolution()
|
|
|
|
{
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2016-03-08 07:34:40 +00:00
|
|
|
protected void renderCrosshairs(float partialTicks)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
if (pre(CROSSHAIRS)) return;
|
2016-05-18 12:11:56 +00:00
|
|
|
bind(Gui.ICONS);
|
2016-03-26 06:45:20 +00:00
|
|
|
GlStateManager.enableBlend();
|
2016-03-13 01:40:03 +00:00
|
|
|
super.renderAttackIndicator(partialTicks, res);
|
2013-04-18 01:55:06 +00:00
|
|
|
post(CROSSHAIRS);
|
|
|
|
}
|
|
|
|
|
2016-03-08 07:34:40 +00:00
|
|
|
protected void renderPotionIcons(ScaledResolution resolution)
|
|
|
|
{
|
|
|
|
if (pre(POTION_ICONS)) return;
|
2016-03-13 01:40:03 +00:00
|
|
|
super.renderPotionEffects(resolution);
|
2016-03-08 07:34:40 +00:00
|
|
|
post(POTION_ICONS);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void renderSubtitles(ScaledResolution resolution)
|
|
|
|
{
|
|
|
|
if (pre(SUBTITLES)) return;
|
2016-03-13 01:40:03 +00:00
|
|
|
this.overlaySubtitle.renderSubtitles(res);
|
2016-03-08 07:34:40 +00:00
|
|
|
post(SUBTITLES);
|
|
|
|
}
|
|
|
|
|
|
|
|
//@Override
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderBossHealth()
|
|
|
|
{
|
|
|
|
if (pre(BOSSHEALTH)) return;
|
2016-05-18 12:11:56 +00:00
|
|
|
bind(Gui.ICONS);
|
2016-03-13 01:40:03 +00:00
|
|
|
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
2013-04-18 01:55:06 +00:00
|
|
|
mc.mcProfiler.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();
|
2016-03-13 01:40:03 +00:00
|
|
|
this.overlayBoss.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
|
|
|
GlStateManager.disableBlend();
|
2013-04-18 01:55:06 +00:00
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
post(BOSSHEALTH);
|
|
|
|
}
|
2013-04-21 20:54:11 +00:00
|
|
|
|
2017-09-06 21:19:56 +00:00
|
|
|
@Override
|
|
|
|
protected void renderVignette(float lightLevel, ScaledResolution scaledRes)
|
|
|
|
{
|
|
|
|
if (pre(VIGNETTE))
|
|
|
|
{
|
|
|
|
// Need to put this here, since Vanilla assumes this state after the vignette was rendered.
|
|
|
|
GlStateManager.enableDepth();
|
|
|
|
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
super.renderVignette(lightLevel, scaledRes);
|
|
|
|
post(VIGNETTE);
|
|
|
|
}
|
|
|
|
|
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 void renderHelmet(ScaledResolution res, 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();
|
|
|
|
if (item == Item.getItemFromBlock(Blocks.PUMPKIN))
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2015-11-24 04:18:52 +00:00
|
|
|
renderPumpkinOverlay(res);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-01-11 23:15:47 +00:00
|
|
|
item.renderHelmetOverlay(itemstack, mc.player, res, partialTicks);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post(HELMET);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void renderArmor(int width, int height)
|
|
|
|
{
|
|
|
|
if (pre(ARMOR)) return;
|
|
|
|
mc.mcProfiler.startSection("armor");
|
|
|
|
|
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
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
int level = ForgeHooks.getTotalArmorValue(mc.player);
|
2013-04-18 01:55:06 +00:00
|
|
|
for (int i = 1; level > 0 && i < 20; i += 2)
|
|
|
|
{
|
|
|
|
if (i < level)
|
|
|
|
{
|
|
|
|
drawTexturedModalRect(left, top, 34, 9, 9, 9);
|
|
|
|
}
|
|
|
|
else if (i == level)
|
|
|
|
{
|
|
|
|
drawTexturedModalRect(left, top, 25, 9, 9, 9);
|
|
|
|
}
|
|
|
|
else if (i > level)
|
|
|
|
{
|
|
|
|
drawTexturedModalRect(left, top, 16, 9, 9, 9);
|
|
|
|
}
|
|
|
|
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();
|
2013-04-18 01:55:06 +00:00
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
post(ARMOR);
|
|
|
|
}
|
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
|
|
|
protected void renderPortal(ScaledResolution res, 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)
|
|
|
|
{
|
2015-12-30 04:15:03 +00:00
|
|
|
renderPortal(f1, res);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
post(PORTAL);
|
|
|
|
}
|
|
|
|
|
2014-12-02 03:11:17 +00:00
|
|
|
@Override
|
2016-03-13 01:40:03 +00:00
|
|
|
protected void renderHotbar(ScaledResolution res, 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;
|
|
|
|
|
2014-12-02 03:11:17 +00:00
|
|
|
if (mc.playerController.isSpectator())
|
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
|
|
|
{
|
2014-12-02 03:11:17 +00:00
|
|
|
this.spectatorGui.renderTooltip(res, 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
|
|
|
|
{
|
2016-03-13 01:40:03 +00:00
|
|
|
super.renderHotbar(res, 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);
|
|
|
|
}
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderAir(int width, int height)
|
|
|
|
{
|
|
|
|
if (pre(AIR)) return;
|
|
|
|
mc.mcProfiler.startSection("air");
|
2014-12-02 03:11:17 +00:00
|
|
|
EntityPlayer player = (EntityPlayer)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
|
|
|
|
2016-05-18 12:11:56 +00:00
|
|
|
if (player.isInsideOfMaterial(Material.WATER))
|
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
|
|
|
int air = player.getAir();
|
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)
|
|
|
|
{
|
|
|
|
drawTexturedModalRect(left - i * 8 - 9, top, (i < full ? 16 : 25), 18, 9, 9);
|
|
|
|
}
|
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();
|
2013-04-18 01:55:06 +00:00
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
post(AIR);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void renderHealth(int width, int height)
|
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
bind(ICONS);
|
2013-04-18 01:55:06 +00:00
|
|
|
if (pre(HEALTH)) return;
|
|
|
|
mc.mcProfiler.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
|
|
|
|
2014-12-02 03:11:17 +00:00
|
|
|
EntityPlayer player = (EntityPlayer)this.mc.getRenderViewEntity();
|
2016-12-21 23:52:30 +00:00
|
|
|
int health = MathHelper.ceil(player.getHealth());
|
2015-11-24 04:18:52 +00:00
|
|
|
boolean highlight = healthUpdateCounter > (long)updateCounter && (healthUpdateCounter - (long)updateCounter) / 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
|
|
|
{
|
2014-12-02 03:11:17 +00:00
|
|
|
this.lastSystemTime = Minecraft.getSystemTime();
|
2015-11-24 04:18:52 +00:00
|
|
|
this.healthUpdateCounter = (long)(this.updateCounter + 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
|
|
|
{
|
2014-12-02 03:11:17 +00:00
|
|
|
this.lastSystemTime = Minecraft.getSystemTime();
|
2015-11-24 04:18:52 +00:00
|
|
|
this.healthUpdateCounter = (long)(this.updateCounter + 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
|
|
|
|
2014-12-02 03:11:17 +00:00
|
|
|
if (Minecraft.getSystemTime() - 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;
|
2014-12-02 03:11:17 +00:00
|
|
|
this.lastSystemTime = Minecraft.getSystemTime();
|
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
|
|
|
|
2016-03-13 01:40:03 +00:00
|
|
|
IAttributeInstance attrMaxHealth = player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH);
|
2013-09-03 19:52:58 +00:00
|
|
|
float healthMax = (float)attrMaxHealth.getAttributeValue();
|
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
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
this.rand.setSeed((long)(updateCounter * 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;
|
2016-05-18 12:11:56 +00:00
|
|
|
if (player.isPotionActive(MobEffects.REGENERATION))
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2013-07-01 05:32:11 +00:00
|
|
|
regen = updateCounter % 25;
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
final int TOP = 9 * (mc.world.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0);
|
2013-07-01 05:32:11 +00:00
|
|
|
final int BACKGROUND = (highlight ? 25 : 16);
|
|
|
|
int MARGIN = 16;
|
2016-05-18 12:11:56 +00:00
|
|
|
if (player.isPotionActive(MobEffects.POISON)) MARGIN += 36;
|
|
|
|
else if (player.isPotionActive(MobEffects.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
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
drawTexturedModalRect(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)
|
|
|
|
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6
|
|
|
|
else if (i * 2 + 1 == healthLast)
|
|
|
|
drawTexturedModalRect(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
|
|
|
{
|
2013-07-01 05:32:11 +00:00
|
|
|
drawTexturedModalRect(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
|
|
|
{
|
2013-07-01 05:32:11 +00:00
|
|
|
drawTexturedModalRect(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)
|
|
|
|
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4
|
|
|
|
else if (i * 2 + 1 == health)
|
|
|
|
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5
|
|
|
|
}
|
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();
|
2013-04-18 01:55:06 +00:00
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
post(HEALTH);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void renderFood(int width, int height)
|
|
|
|
{
|
|
|
|
if (pre(FOOD)) return;
|
|
|
|
mc.mcProfiler.startSection("food");
|
|
|
|
|
2014-12-02 03:11:17 +00:00
|
|
|
EntityPlayer player = (EntityPlayer)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
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
if (mc.player.isPotionActive(MobEffects.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
|
|
|
|
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 (player.getFoodStats().getSaturationLevel() <= 0.0F && updateCounter % (level * 3 + 1) == 0)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
y = top + (rand.nextInt(3) - 1);
|
|
|
|
}
|
|
|
|
|
2016-03-23 14:34:48 +00:00
|
|
|
drawTexturedModalRect(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)
|
|
|
|
drawTexturedModalRect(x, y, icon + 36, 27, 9, 9);
|
2013-07-01 05:32:11 +00:00
|
|
|
else if (idx == level)
|
2013-04-18 01:55:06 +00:00
|
|
|
drawTexturedModalRect(x, y, icon + 45, 27, 9, 9);
|
|
|
|
}
|
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-04-18 01:55:06 +00:00
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
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
|
|
|
{
|
|
|
|
mc.mcProfiler.startSection("sleep");
|
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.disableDepth();
|
|
|
|
GlStateManager.disableAlpha();
|
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;
|
|
|
|
drawRect(0, 0, width, height, color);
|
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.enableAlpha();
|
|
|
|
GlStateManager.enableDepth();
|
2013-04-18 01:55:06 +00:00
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void renderExperience(int width, int height)
|
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
bind(ICONS);
|
2013-04-18 01:55:06 +00:00
|
|
|
if (pre(EXPERIENCE)) 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.color(1.0F, 1.0F, 1.0F, 1.0F);
|
|
|
|
GlStateManager.disableBlend();
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2014-02-05 08:05:37 +00:00
|
|
|
if (mc.playerController.gameIsSurvivalOrAdventure())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
mc.mcProfiler.startSection("expBar");
|
2016-12-21 23:52:30 +00:00
|
|
|
int cap = this.mc.player.xpBarCap();
|
2013-04-18 01:55:06 +00:00
|
|
|
int left = width / 2 - 91;
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
if (cap > 0)
|
|
|
|
{
|
2013-07-01 05:32:11 +00:00
|
|
|
short barWidth = 182;
|
2016-12-21 23:52:30 +00:00
|
|
|
int filled = (int)(mc.player.experience * (float)(barWidth + 1));
|
2013-07-01 05:32:11 +00:00
|
|
|
int top = height - 32 + 3;
|
|
|
|
drawTexturedModalRect(left, top, 0, 64, barWidth, 5);
|
2013-07-08 21:30:25 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
if (filled > 0)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2013-07-01 05:32:11 +00:00
|
|
|
drawTexturedModalRect(left, top, 0, 69, filled, 5);
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
2013-07-01 05:32:11 +00:00
|
|
|
|
|
|
|
this.mc.mcProfiler.endSection();
|
2013-07-08 21:30:25 +00:00
|
|
|
|
|
|
|
|
2016-12-21 23:52:30 +00:00
|
|
|
if (mc.playerController.gameIsSurvivalOrAdventure() && mc.player.experienceLevel > 0)
|
2013-07-01 05:32:11 +00:00
|
|
|
{
|
|
|
|
mc.mcProfiler.startSection("expLevel");
|
|
|
|
boolean flag1 = false;
|
|
|
|
int color = flag1 ? 16777215 : 8453920;
|
2016-12-21 23:52:30 +00:00
|
|
|
String text = "" + mc.player.experienceLevel;
|
2013-07-01 05:32:11 +00:00
|
|
|
int x = (width - fontrenderer.getStringWidth(text)) / 2;
|
|
|
|
int y = height - 31 - 4;
|
|
|
|
fontrenderer.drawString(text, x + 1, y, 0);
|
|
|
|
fontrenderer.drawString(text, x - 1, y, 0);
|
|
|
|
fontrenderer.drawString(text, x, y + 1, 0);
|
|
|
|
fontrenderer.drawString(text, x, y - 1, 0);
|
|
|
|
fontrenderer.drawString(text, x, y, color);
|
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
}
|
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();
|
|
|
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
2013-07-01 05:32:11 +00:00
|
|
|
|
|
|
|
post(EXPERIENCE);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void renderJumpBar(int width, int height)
|
|
|
|
{
|
2016-05-18 12:11:56 +00:00
|
|
|
bind(ICONS);
|
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
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
mc.mcProfiler.startSection("jumpBar");
|
2016-12-21 23:52:30 +00:00
|
|
|
float charge = mc.player.getHorseJumpPower();
|
2013-07-01 05:32:11 +00:00
|
|
|
final int barWidth = 182;
|
|
|
|
int x = (width / 2) - (barWidth / 2);
|
|
|
|
int filled = (int)(charge * (float)(barWidth + 1));
|
|
|
|
int top = height - 32 + 3;
|
|
|
|
|
|
|
|
drawTexturedModalRect(x, top, 0, 84, barWidth, 5);
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
if (filled > 0)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2013-07-01 05:32:11 +00:00
|
|
|
this.drawTexturedModalRect(x, top, 0, 89, filled, 5);
|
2013-04-21 20:54:11 +00:00
|
|
|
}
|
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();
|
2013-07-01 05:32:11 +00:00
|
|
|
mc.mcProfiler.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
|
|
|
}
|
|
|
|
|
2016-03-23 14:34:48 +00:00
|
|
|
protected void renderToolHighlight(ScaledResolution res)
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2014-12-02 03:11:17 +00:00
|
|
|
if (this.mc.gameSettings.heldItemTooltips && !this.mc.playerController.isSpectator())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
|
|
|
mc.mcProfiler.startSection("toolHighlight");
|
|
|
|
|
2017-06-19 07:08:29 +00:00
|
|
|
if (this.remainingHighlightTicks > 0 && !this.highlightingItemStack.isEmpty())
|
2013-04-18 01:55:06 +00:00
|
|
|
{
|
2013-04-28 20:28:40 +00:00
|
|
|
String name = this.highlightingItemStack.getDisplayName();
|
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 (this.highlightingItemStack.hasDisplayName())
|
2016-03-01 12:58:03 +00:00
|
|
|
name = TextFormatting.ITALIC + name;
|
2013-04-18 01:55:06 +00:00
|
|
|
|
2015-12-13 10:47:25 +00:00
|
|
|
name = this.highlightingItemStack.getItem().getHighlightTip(this.highlightingItemStack, name);
|
|
|
|
|
2013-04-28 20:28:40 +00:00
|
|
|
int opacity = (int)((float)this.remainingHighlightTicks * 256.0F / 10.0F);
|
2013-04-18 01:55:06 +00:00
|
|
|
if (opacity > 255) opacity = 255;
|
|
|
|
|
|
|
|
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
|
|
|
int y = res.getScaledHeight() - 59;
|
2013-04-18 01:55:06 +00:00
|
|
|
if (!mc.playerController.shouldDrawHUD()) y += 14;
|
|
|
|
|
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();
|
|
|
|
GlStateManager.enableBlend();
|
2016-03-13 01:40:03 +00:00
|
|
|
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
2013-04-28 20:28:40 +00:00
|
|
|
FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
|
2013-04-18 01:55:06 +00:00
|
|
|
if (font != null)
|
|
|
|
{
|
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 x = (res.getScaledWidth() - font.getStringWidth(name)) / 2;
|
2014-12-02 03:11:17 +00:00
|
|
|
font.drawStringWithShadow(name, x, y, WHITE | (opacity << 24));
|
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
|
|
|
int x = (res.getScaledWidth() - fontrenderer.getStringWidth(name)) / 2;
|
2014-12-02 03:11:17 +00:00
|
|
|
fontrenderer.drawStringWithShadow(name, x, y, WHITE | (opacity << 24));
|
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();
|
|
|
|
GlStateManager.popMatrix();
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
}
|
2016-12-21 23:52:30 +00:00
|
|
|
else if (this.mc.player.isSpectator())
|
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
|
|
|
this.spectatorGui.renderSelectedItem(res);
|
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 renderHUDText(int width, int height)
|
|
|
|
{
|
|
|
|
mc.mcProfiler.startSection("forgeHudText");
|
2014-02-05 08:05:37 +00:00
|
|
|
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 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
|
|
|
ArrayList<String> listL = new ArrayList<String>();
|
|
|
|
ArrayList<String> listR = new ArrayList<String>();
|
2013-04-18 01:55:06 +00:00
|
|
|
|
|
|
|
if (mc.isDemo())
|
|
|
|
{
|
2016-12-21 23:52:30 +00:00
|
|
|
long time = mc.world.getTotalWorldTime();
|
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
|
|
|
{
|
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;
|
2014-11-28 19:18:59 +00:00
|
|
|
drawRect(1, top - 1, 2 + fontrenderer.getStringWidth(msg) + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
|
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
|
|
|
fontrenderer.drawString(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;
|
2014-11-28 19:18:59 +00:00
|
|
|
drawRect(left - 1, top - 1, left + w + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
|
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
|
|
|
fontrenderer.drawString(msg, left, top, 14737632);
|
2015-01-28 20:41:39 +00:00
|
|
|
top += fontrenderer.FONT_HEIGHT;
|
2013-04-18 01:55:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mc.mcProfiler.endSection();
|
|
|
|
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))
|
|
|
|
{
|
|
|
|
this.debugOverlay.renderLagometer();
|
|
|
|
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
|
|
|
{
|
|
|
|
mc.mcProfiler.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();
|
2015-03-11 22:25:41 +00:00
|
|
|
GlStateManager.translate((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();
|
2016-03-13 01:40:03 +00:00
|
|
|
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
2016-12-21 23:52:30 +00:00
|
|
|
int color = (animateOverlayMessageColor ? Color.HSBtoRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
|
|
|
|
fontrenderer.drawString(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
|
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
|
|
|
}
|
|
|
|
|
|
|
|
mc.mcProfiler.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
|
|
|
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
|
|
|
{
|
|
|
|
mc.mcProfiler.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();
|
|
|
|
GlStateManager.translate((float)(width / 2), (float)(height / 2), 0.0F);
|
|
|
|
GlStateManager.enableBlend();
|
2016-03-13 01:40:03 +00:00
|
|
|
GlStateManager.tryBlendFuncSeparate(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();
|
|
|
|
GlStateManager.scale(4.0F, 4.0F, 4.0F);
|
|
|
|
int l = opacity << 24 & -16777216;
|
2016-03-13 01:40:03 +00:00
|
|
|
this.getFontRenderer().drawString(this.displayedTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedTitle) / 2), -10.0F, 16777215 | l, true);
|
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();
|
|
|
|
GlStateManager.scale(2.0F, 2.0F, 2.0F);
|
2016-03-13 01:40:03 +00:00
|
|
|
this.getFontRenderer().drawString(this.displayedSubTitle, (float)(-this.getFontRenderer().getStringWidth(this.displayedSubTitle) / 2), 5.0F, 16777215 | l, true);
|
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();
|
|
|
|
}
|
|
|
|
|
|
|
|
this.mc.mcProfiler.endSection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-18 01:55:06 +00:00
|
|
|
protected void renderChat(int width, int height)
|
|
|
|
{
|
|
|
|
mc.mcProfiler.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();
|
2016-03-24 08:44:52 +00:00
|
|
|
GlStateManager.translate((float) event.getPosX(), (float) event.getPosY(), 0.0F);
|
2014-02-05 08:05:37 +00:00
|
|
|
persistantChatGUI.drawChat(updateCounter);
|
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);
|
|
|
|
|
|
|
|
mc.mcProfiler.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);
|
|
|
|
NetHandlerPlayClient 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
|
|
|
{
|
2015-11-24 04:18:52 +00:00
|
|
|
this.overlayPlayerList.updatePlayerList(true);
|
2013-10-01 00:06:04 +00:00
|
|
|
if (pre(PLAYER_LIST)) return;
|
2016-12-21 23:52:30 +00:00
|
|
|
this.overlayPlayerList.renderPlayerlist(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
|
|
|
|
{
|
2015-11-24 04:18:52 +00:00
|
|
|
this.overlayPlayerList.updatePlayerList(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)
|
|
|
|
{
|
2014-12-02 03:11:17 +00:00
|
|
|
EntityPlayer player = (EntityPlayer)mc.getRenderViewEntity();
|
2016-03-13 01:40:03 +00:00
|
|
|
Entity tmp = player.getRidingEntity();
|
2013-07-01 05:32:11 +00:00
|
|
|
if (!(tmp instanceof EntityLivingBase)) return;
|
|
|
|
|
2016-05-18 12:11:56 +00:00
|
|
|
bind(ICONS);
|
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
|
|
|
|
2013-07-01 05:32:11 +00:00
|
|
|
mc.mcProfiler.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();
|
2013-07-01 05:32:11 +00:00
|
|
|
EntityLivingBase mount = (EntityLivingBase)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;
|
|
|
|
drawTexturedModalRect(x, top, BACKGROUND, 9, 9, 9);
|
|
|
|
|
|
|
|
if (i * 2 + 1 + heart < health)
|
|
|
|
drawTexturedModalRect(x, top, FULL, 9, 9, 9);
|
|
|
|
else if (i * 2 + 1 + heart == health)
|
|
|
|
drawTexturedModalRect(x, top, HALF, 9, 9, 9);
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
private class GuiOverlayDebugForge extends GuiOverlayDebug
|
|
|
|
{
|
2016-07-01 20:53:26 +00:00
|
|
|
private Minecraft mc;
|
|
|
|
private GuiOverlayDebugForge(Minecraft mc)
|
|
|
|
{
|
|
|
|
super(mc);
|
|
|
|
this.mc = mc;
|
|
|
|
}
|
2014-12-02 03:11:17 +00:00
|
|
|
@Override protected void renderDebugInfoLeft(){}
|
|
|
|
@Override protected void renderDebugInfoRight(ScaledResolution res){}
|
2016-07-01 20:53:26 +00:00
|
|
|
private List<String> getLeft()
|
|
|
|
{
|
|
|
|
List<String> ret = this.call();
|
|
|
|
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
|
|
|
}
|