Compare commits
4 Commits
v1.0-1.14-
...
v1.1-1.15-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7bbb03736d | ||
|
|
c5c62a0675 | ||
|
|
a357b924d8 | ||
|
|
3c2e6baa0c |
@@ -4,12 +4,12 @@ org.gradle.jvmargs=-Xmx3G
|
|||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
# Forge Properties
|
# Forge Properties
|
||||||
minecraft_version=1.14.2
|
minecraft_version=1.15
|
||||||
mappings=20190621-1.14.2
|
mappings=20190719-1.14.3
|
||||||
forge_version=26.0.63
|
forge_version=29.0.4
|
||||||
|
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0
|
mod_version = 1.1
|
||||||
maven_group = markil3
|
maven_group = markil3
|
||||||
archives_base_name = immersive_hud
|
archives_base_name = immersive_hud
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ import static markil3.immersive_hud.Main.TICKS_PER_SECOND;
|
|||||||
* <p>
|
* <p>
|
||||||
* The methods that change this mod's configuration do not automatically write
|
* The methods that change this mod's configuration do not automatically write
|
||||||
* those changes to the configuration file on disk. Instead, they only update
|
* those changes to the configuration file on disk. Instead, they only update
|
||||||
* the configuration in memory.
|
* the configuration in memory. To write any changes, use the {@link #save()}
|
||||||
|
* method.
|
||||||
*
|
*
|
||||||
* @author Markil 3
|
* @author Markil 3
|
||||||
*/
|
*/
|
||||||
@@ -131,20 +132,20 @@ public class ConfigManager
|
|||||||
return this.fadeOut.get();
|
return this.fadeOut.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void setMaxTime(int time)
|
public void setMaxTime(int time)
|
||||||
// {
|
{
|
||||||
// this.maxTime.set(time);
|
this.maxTime.set(time);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setFadeInTime(int time)
|
public void setFadeInTime(int time)
|
||||||
// {
|
{
|
||||||
// this.fadeIn.set(time);
|
this.fadeIn.set(time);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setFadeOutTime(int time)
|
public void setFadeOutTime(int time)
|
||||||
// {
|
{
|
||||||
// this.fadeOut.set(time);
|
this.fadeOut.set(time);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final TimeValues hotbarTime;
|
private final TimeValues hotbarTime;
|
||||||
@@ -154,7 +155,9 @@ public class ConfigManager
|
|||||||
private final TimeValues hungerTime;
|
private final TimeValues hungerTime;
|
||||||
private final TimeValues effectTime;
|
private final TimeValues effectTime;
|
||||||
private final ForgeConfigSpec.IntValue crosshairTime;
|
private final ForgeConfigSpec.IntValue crosshairTime;
|
||||||
|
private final ForgeConfigSpec.BooleanValue hideCrosshair;
|
||||||
private final ForgeConfigSpec.IntValue handTime;
|
private final ForgeConfigSpec.IntValue handTime;
|
||||||
|
private final ForgeConfigSpec.BooleanValue hideHands;
|
||||||
private final ForgeConfigSpec.BooleanValue showArmor;
|
private final ForgeConfigSpec.BooleanValue showArmor;
|
||||||
private final ForgeConfigSpec.DoubleValue minHealth;
|
private final ForgeConfigSpec.DoubleValue minHealth;
|
||||||
private final ForgeConfigSpec.IntValue minHunger;
|
private final ForgeConfigSpec.IntValue minHunger;
|
||||||
@@ -181,6 +184,10 @@ public class ConfigManager
|
|||||||
6 * TICKS_PER_SECOND,
|
6 * TICKS_PER_SECOND,
|
||||||
0,
|
0,
|
||||||
10 * 60 * TICKS_PER_SECOND);
|
10 * 60 * TICKS_PER_SECOND);
|
||||||
|
this.hideCrosshair =
|
||||||
|
configSpecBuilder.translation(
|
||||||
|
"immersive_hud.configGui.hideCrosshair.title")
|
||||||
|
.define("hideCrosshair", true);
|
||||||
this.handTime =
|
this.handTime =
|
||||||
configSpecBuilder.translation(
|
configSpecBuilder.translation(
|
||||||
"immersive_hud.configGui.handTime.title")
|
"immersive_hud.configGui.handTime.title")
|
||||||
@@ -188,6 +195,10 @@ public class ConfigManager
|
|||||||
30 * TICKS_PER_SECOND,
|
30 * TICKS_PER_SECOND,
|
||||||
0,
|
0,
|
||||||
10 * 60 * TICKS_PER_SECOND);
|
10 * 60 * TICKS_PER_SECOND);
|
||||||
|
this.hideHands =
|
||||||
|
configSpecBuilder.translation(
|
||||||
|
"immersive_hud.configGui.hideHands.title")
|
||||||
|
.define("hideHands", true);
|
||||||
this.showArmor = configSpecBuilder.translation(
|
this.showArmor = configSpecBuilder.translation(
|
||||||
"immersive_hud.configGui.showArmor.title")
|
"immersive_hud.configGui.showArmor.title")
|
||||||
.define("showArmor", true);
|
.define("showArmor", true);
|
||||||
@@ -281,6 +292,16 @@ public class ConfigManager
|
|||||||
return this.crosshairTime.get();
|
return this.crosshairTime.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the crosshairs should be hidden after a period of time.
|
||||||
|
*
|
||||||
|
* @return - Whether or not crosshairs will be hidden.
|
||||||
|
*/
|
||||||
|
public boolean hideCrosshair()
|
||||||
|
{
|
||||||
|
return this.hideCrosshair.get();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtains the time that the hands are allowed to display.
|
* Obtains the time that the hands are allowed to display.
|
||||||
*
|
*
|
||||||
@@ -291,6 +312,16 @@ public class ConfigManager
|
|||||||
return this.handTime.get();
|
return this.handTime.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether hands should be hidden after a period of time.
|
||||||
|
*
|
||||||
|
* @return - Whether or not hands will be hidden.
|
||||||
|
*/
|
||||||
|
public boolean hideHands()
|
||||||
|
{
|
||||||
|
return this.hideHands.get();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the armor bar should render.
|
* Checks whether the armor bar should render.
|
||||||
*
|
*
|
||||||
@@ -323,63 +354,83 @@ public class ConfigManager
|
|||||||
return this.minHunger.get();
|
return this.minHunger.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * Sets the time that the hands are allowed to display.
|
* Sets the time that the hands are allowed to display.
|
||||||
// *
|
*
|
||||||
// * @param time - The hand display time values.
|
* @param time - The hand display time values.
|
||||||
// */
|
*/
|
||||||
// public void setCrosshairTime(int time)
|
public void setCrosshairTime(int time)
|
||||||
// {
|
{
|
||||||
// this.crosshairTime.set(time);
|
this.crosshairTime.set(time);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * Sets the time that the hands are allowed to display.
|
* Sets whether the crosshairs should be hidden after a period of time.
|
||||||
// *
|
*
|
||||||
// * @param time - The hand display time values.
|
* @param hide - Whether or not crosshairs will be hidden.
|
||||||
// */
|
*/
|
||||||
// public void setHandTime(int time)
|
public void hideCrosshair(boolean hide)
|
||||||
// {
|
{
|
||||||
// this.handTime.set(time);
|
this.hideCrosshair.set(hide);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * Determines whether the armor bar should render.
|
* Sets the time that the hands are allowed to display.
|
||||||
// *
|
*
|
||||||
// * @param show - Whether or not armor shows on the HUD.
|
* @param time - The hand display time values.
|
||||||
// */
|
*/
|
||||||
// public void shouldShowArmor(boolean show)
|
public void setHandTime(int time)
|
||||||
// {
|
{
|
||||||
// this.showArmor.set(show);
|
this.handTime.set(time);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * Sets the minimum health for fading. Anything below that and the health
|
* Sets whether hands should be hidden after a period of time.
|
||||||
// * always displays.
|
*
|
||||||
// *
|
* @param hide - Whether or not hands will be hidden.
|
||||||
// * @param boundary - The health boundary, from 0 to 1.
|
*/
|
||||||
// */
|
public void hideHands(boolean hide)
|
||||||
// public void setMinHealth(double boundary)
|
{
|
||||||
// {
|
this.hideHands.set(hide);
|
||||||
// this.minHealth.set(MathHelper.clamp(boundary, 0, 1));
|
}
|
||||||
// }
|
|
||||||
//
|
/**
|
||||||
// /**
|
* Determines whether the armor bar should render.
|
||||||
// * Sets the minimum hunger for fading. Anything below that and the hunger
|
*
|
||||||
// * always displays.
|
* @param show - Whether or not armor shows on the HUD.
|
||||||
// *
|
*/
|
||||||
// * @param boundary - The hunger boundary, from 0 to 20.
|
public void shouldShowArmor(boolean show)
|
||||||
// */
|
{
|
||||||
// public void setMinHunger(int boundary)
|
this.showArmor.set(show);
|
||||||
// {
|
}
|
||||||
// this.minHunger.set(MathHelper.clamp(boundary, 0, 20));
|
|
||||||
// }
|
/**
|
||||||
|
* Sets the minimum health for fading. Anything below that and the health
|
||||||
|
* always displays.
|
||||||
|
*
|
||||||
|
* @param boundary - The health boundary, from 0 to 1.
|
||||||
|
*/
|
||||||
|
public void setMinHealth(double boundary)
|
||||||
|
{
|
||||||
|
this.minHealth.set(MathHelper.clamp(boundary, 0, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the minimum hunger for fading. Anything below that and the hunger
|
||||||
|
* always displays.
|
||||||
|
*
|
||||||
|
* @param boundary - The hunger boundary, from 0 to 20.
|
||||||
|
*/
|
||||||
|
public void setMinHunger(int boundary)
|
||||||
|
{
|
||||||
|
this.minHunger.set(MathHelper.clamp(boundary, 0, 20));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves changes to this mod's configuration.
|
* Saves changes to this mod's configuration.
|
||||||
*/
|
*/
|
||||||
// public void save()
|
public void save()
|
||||||
// {
|
{
|
||||||
// SPEC.save();
|
SPEC.save();
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
package markil3.immersive_hud;
|
package markil3.immersive_hud;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||||
import net.minecraftforge.client.event.RenderHandEvent;
|
|
||||||
import net.minecraftforge.client.event.RenderSpecificHandEvent;
|
import net.minecraftforge.client.event.RenderSpecificHandEvent;
|
||||||
import net.minecraftforge.event.entity.EntityMountEvent;
|
import net.minecraftforge.event.entity.EntityMountEvent;
|
||||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||||
@@ -61,6 +60,8 @@ public class EventBus
|
|||||||
*/
|
*/
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClick(final PlayerInteractEvent event)
|
public static void onClick(final PlayerInteractEvent event)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () ->
|
DistExecutor.runWhenOn(Dist.CLIENT, () -> () ->
|
||||||
{
|
{
|
||||||
@@ -71,6 +72,14 @@ public class EventBus
|
|||||||
TimerUtils.onClick(event.getHand(), item);
|
TimerUtils.onClick(event.getHand(), item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LOGGER.error(
|
||||||
|
"Error in running markil3.immersive_hud.EventBus#onClick " +
|
||||||
|
"event",
|
||||||
|
e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run whenever the player mounts something. This brings the mount's health
|
* Run whenever the player mounts something. This brings the mount's health
|
||||||
@@ -83,12 +92,22 @@ public class EventBus
|
|||||||
*/
|
*/
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onMount(final EntityMountEvent event)
|
public static void onMount(final EntityMountEvent event)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
DistExecutor.runWhenOn(Dist.CLIENT, () -> () ->
|
DistExecutor.runWhenOn(Dist.CLIENT, () -> () ->
|
||||||
{
|
{
|
||||||
TimerUtils.resetMountHealth();
|
TimerUtils.resetMountHealth();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LOGGER.error(
|
||||||
|
"Error in running markil3.immersive_hud.EventBus#onMount " +
|
||||||
|
"event",
|
||||||
|
e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run whenever a hand is rendered in 1st person. This brings the player
|
* Run whenever a hand is rendered in 1st person. This brings the player
|
||||||
@@ -98,13 +117,24 @@ public class EventBus
|
|||||||
*/
|
*/
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onRenderHand(final RenderSpecificHandEvent event)
|
public static void onRenderHand(final RenderSpecificHandEvent event)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (TimerUtils.onRenderHand(event.getHand(),
|
if (TimerUtils.onRenderHand(event.getHand(),
|
||||||
|
event.getMatrixStack(),
|
||||||
event.getPartialTicks()))
|
event.getPartialTicks()))
|
||||||
{
|
{
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LOGGER.error(
|
||||||
|
"Error in running markil3.immersive_hud" +
|
||||||
|
".EventBus#onRenderHand event",
|
||||||
|
e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called whenever we are drawing a part of the GUI. This is where most of
|
* Called whenever we are drawing a part of the GUI. This is where most of
|
||||||
@@ -114,6 +144,8 @@ public class EventBus
|
|||||||
*/
|
*/
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onGUIDraw(final RenderGameOverlayEvent event)
|
public static void onGUIDraw(final RenderGameOverlayEvent event)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
boolean fadeIn = false;
|
boolean fadeIn = false;
|
||||||
@@ -167,7 +199,7 @@ public class EventBus
|
|||||||
}
|
}
|
||||||
else if (event instanceof RenderGameOverlayEvent.Post)
|
else if (event instanceof RenderGameOverlayEvent.Post)
|
||||||
{
|
{
|
||||||
GlStateManager.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
resetAlpha();
|
resetAlpha();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -184,7 +216,7 @@ public class EventBus
|
|||||||
*/
|
*/
|
||||||
else if (event instanceof RenderGameOverlayEvent.Post)
|
else if (event instanceof RenderGameOverlayEvent.Post)
|
||||||
{
|
{
|
||||||
GlStateManager.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
resetAlpha();
|
resetAlpha();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -201,7 +233,7 @@ public class EventBus
|
|||||||
*/
|
*/
|
||||||
else if (event instanceof RenderGameOverlayEvent.Post)
|
else if (event instanceof RenderGameOverlayEvent.Post)
|
||||||
{
|
{
|
||||||
GlStateManager.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
resetAlpha();
|
resetAlpha();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -218,7 +250,7 @@ public class EventBus
|
|||||||
*/
|
*/
|
||||||
else if (event instanceof RenderGameOverlayEvent.Post)
|
else if (event instanceof RenderGameOverlayEvent.Post)
|
||||||
{
|
{
|
||||||
GlStateManager.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
resetAlpha();
|
resetAlpha();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -232,7 +264,7 @@ public class EventBus
|
|||||||
}
|
}
|
||||||
else if (event instanceof RenderGameOverlayEvent.Post)
|
else if (event instanceof RenderGameOverlayEvent.Post)
|
||||||
{
|
{
|
||||||
GlStateManager.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
resetAlpha();
|
resetAlpha();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -264,4 +296,11 @@ public class EventBus
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LOGGER.error(
|
||||||
|
"Error in running markil3.immersive_hud.EventBus#onGUIDraw event",
|
||||||
|
e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,34 +16,39 @@ package markil3.immersive_hud;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Ordering;
|
import com.google.common.collect.Ordering;
|
||||||
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
import com.mojang.blaze3d.platform.GlStateManager;
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.AbstractGui;
|
import net.minecraft.client.gui.AbstractGui;
|
||||||
import net.minecraft.client.gui.IngameGui;
|
import net.minecraft.client.gui.IngameGui;
|
||||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||||
import net.minecraft.client.renderer.ItemRenderer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.model.IBakedModel;
|
import net.minecraft.client.renderer.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
import net.minecraft.client.renderer.model.ItemCameraTransforms;
|
||||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||||
|
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||||
import net.minecraft.client.renderer.texture.PotionSpriteUploader;
|
import net.minecraft.client.renderer.texture.PotionSpriteUploader;
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureManager;
|
||||||
import net.minecraft.client.settings.AttackIndicatorStatus;
|
import net.minecraft.client.settings.AttackIndicatorStatus;
|
||||||
import net.minecraft.crash.CrashReport;
|
import net.minecraft.crash.CrashReport;
|
||||||
import net.minecraft.crash.CrashReportCategory;
|
import net.minecraft.crash.CrashReportCategory;
|
||||||
import net.minecraft.crash.ReportedException;
|
import net.minecraft.crash.ReportedException;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.potion.Effect;
|
import net.minecraft.potion.Effect;
|
||||||
import net.minecraft.potion.EffectInstance;
|
import net.minecraft.potion.EffectInstance;
|
||||||
import net.minecraft.util.HandSide;
|
import net.minecraft.util.HandSide;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -58,79 +63,18 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class RenderUtils
|
public class RenderUtils
|
||||||
{
|
{
|
||||||
private static int getBlitOffset(IngameGui gui)
|
|
||||||
{
|
|
||||||
Field blitAccessField = null;
|
|
||||||
int blitAccess = 0;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
blitAccessField = AbstractGui.class.getDeclaredField("blitOffset");
|
|
||||||
}
|
|
||||||
catch (NoSuchFieldException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
if (!blitAccessField.isAccessible())
|
|
||||||
{
|
|
||||||
blitAccessField.setAccessible(true);
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
blitAccess = (int) blitAccessField.get(gui);
|
|
||||||
}
|
|
||||||
catch (IllegalAccessException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
return blitAccess;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean setBlitOffset(IngameGui gui, int value)
|
|
||||||
{
|
|
||||||
Field blitAccessField = null;
|
|
||||||
int blitAccess = 0;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
blitAccessField = AbstractGui.class.getDeclaredField("blitOffset");
|
|
||||||
}
|
|
||||||
catch (NoSuchFieldException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!blitAccessField.isAccessible())
|
|
||||||
{
|
|
||||||
blitAccessField.setAccessible(true);
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
blitAccessField.set(gui, value);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (IllegalAccessException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void renderPotionIcons(Minecraft mc,
|
public static void renderPotionIcons(Minecraft mc,
|
||||||
IngameGui gui,
|
IngameGui gui,
|
||||||
float ticks)
|
float ticks)
|
||||||
{
|
{
|
||||||
|
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
||||||
int scaledWidth = mc.mainWindow.getScaledWidth();
|
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
||||||
int scaledHeight = mc.mainWindow.getScaledHeight();
|
|
||||||
|
|
||||||
Collection<EffectInstance> collection =
|
Collection<EffectInstance> collection =
|
||||||
mc.player.getActivePotionEffects();
|
mc.player.getActivePotionEffects();
|
||||||
|
|
||||||
|
|
||||||
if (!collection.isEmpty())
|
if (!collection.isEmpty())
|
||||||
{
|
{
|
||||||
GlStateManager.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int j = 0;
|
int j = 0;
|
||||||
PotionSpriteUploader potionspriteuploader =
|
PotionSpriteUploader potionspriteuploader =
|
||||||
@@ -148,7 +92,7 @@ public class RenderUtils
|
|||||||
float effectAlpha = TimerUtils.getPotionAlpha(mc.player,
|
float effectAlpha = TimerUtils.getPotionAlpha(mc.player,
|
||||||
effectinstance,
|
effectinstance,
|
||||||
ticks);
|
ticks);
|
||||||
if (!effectinstance.isShowIcon() || effectAlpha < 0.01F)
|
if (!effectinstance.shouldRenderHUD() || effectAlpha < 0.01F)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -176,7 +120,7 @@ public class RenderUtils
|
|||||||
l += 26;
|
l += 26;
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, effectAlpha);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, effectAlpha);
|
||||||
if (effectinstance.isAmbient())
|
if (effectinstance.isAmbient())
|
||||||
{
|
{
|
||||||
gui.blit(k, l, 165, 166, 24, 24);
|
gui.blit(k, l, 165, 166, 24, 24);
|
||||||
@@ -186,25 +130,31 @@ public class RenderUtils
|
|||||||
gui.blit(k, l, 141, 166, 24, 24);
|
gui.blit(k, l, 141, 166, 24, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
float f_f = effectAlpha;
|
|
||||||
int k_f = k;
|
|
||||||
int l_f = l;
|
|
||||||
|
|
||||||
TextureAtlasSprite textureatlassprite =
|
TextureAtlasSprite textureatlassprite =
|
||||||
potionspriteuploader.func_215288_a(effect);
|
potionspriteuploader.getSprite(effect);
|
||||||
|
int j1 = k;
|
||||||
|
int k1 = l;
|
||||||
|
float f1 = effectAlpha;
|
||||||
list.add(() -> {
|
list.add(() -> {
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, f_f);
|
mc.getTextureManager()
|
||||||
gui.blit(k_f + 3, l_f + 3, getBlitOffset(gui), 18, 18, textureatlassprite);
|
.bindTexture(textureatlassprite.func_229241_m_()
|
||||||
|
.func_229223_g_());
|
||||||
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
|
||||||
|
gui.blit(j1 + 3,
|
||||||
|
k1 + 3,
|
||||||
|
gui.getBlitOffset(),
|
||||||
|
18,
|
||||||
|
18,
|
||||||
|
textureatlassprite);
|
||||||
});
|
});
|
||||||
effect.renderHUDEffect(effectinstance, gui,
|
effectinstance.renderHUDEffect(gui,
|
||||||
k,
|
k,
|
||||||
l,
|
l,
|
||||||
getBlitOffset(gui),
|
gui.getBlitOffset(),
|
||||||
effectAlpha);
|
effectAlpha);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mc.getTextureManager().bindTexture(AtlasTexture.LOCATION_EFFECTS_TEXTURE);
|
|
||||||
list.forEach(Runnable::run);
|
list.forEach(Runnable::run);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,7 +168,7 @@ public class RenderUtils
|
|||||||
* @param renderTime - How much time before this element becomes fully
|
* @param renderTime - How much time before this element becomes fully
|
||||||
* transparent.
|
* transparent.
|
||||||
*
|
*
|
||||||
* @see IngameGui#renderHorseJumpBar(int)
|
* @see IngameGui#renderHorseJumpBar(MatrixStack, int)
|
||||||
*/
|
*/
|
||||||
public static void renderHorseJumpBar(Minecraft mc,
|
public static void renderHorseJumpBar(Minecraft mc,
|
||||||
IngameGui gui,
|
IngameGui gui,
|
||||||
@@ -235,13 +185,13 @@ public class RenderUtils
|
|||||||
jump.getMaxTime(),
|
jump.getMaxTime(),
|
||||||
jump.getFadeInTime(),
|
jump.getFadeInTime(),
|
||||||
jump.getFadeOutTime());
|
jump.getFadeOutTime());
|
||||||
int scaledWidth = mc.mainWindow.getScaledWidth();
|
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
||||||
int scaledHeight = mc.mainWindow.getScaledHeight();
|
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
||||||
int xPosition = scaledWidth / 2 - 91;
|
int xPosition = scaledWidth / 2 - 91;
|
||||||
|
|
||||||
mc.getProfiler().startSection("jumpBar");
|
mc.getProfiler().startSection("jumpBar");
|
||||||
GlStateManager.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, alpha);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
||||||
mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
|
mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
|
||||||
float f = mc.player.getHorseJumpPower();
|
float f = mc.player.getHorseJumpPower();
|
||||||
int i = 182;
|
int i = 182;
|
||||||
@@ -252,9 +202,9 @@ public class RenderUtils
|
|||||||
{
|
{
|
||||||
gui.blit(xPosition, k, 0, 89, j, 5);
|
gui.blit(xPosition, k, 0, 89, j, 5);
|
||||||
}
|
}
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
GlStateManager.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
mc.getProfiler().endSection();
|
mc.getProfiler().endSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +217,7 @@ public class RenderUtils
|
|||||||
* @param renderTime - How much time before this element becomes fully
|
* @param renderTime - How much time before this element becomes fully
|
||||||
* transparent.
|
* transparent.
|
||||||
*
|
*
|
||||||
* @see IngameGui#func_238454_b_(int)
|
* @see IngameGui#func_238454_b_(MatrixStack, int)
|
||||||
*/
|
*/
|
||||||
public static void renderExperience(Minecraft mc,
|
public static void renderExperience(Minecraft mc,
|
||||||
IngameGui gui,
|
IngameGui gui,
|
||||||
@@ -286,16 +236,16 @@ public class RenderUtils
|
|||||||
experience.getMaxTime(),
|
experience.getMaxTime(),
|
||||||
experience.getFadeInTime(),
|
experience.getFadeInTime(),
|
||||||
experience.getFadeOutTime());
|
experience.getFadeOutTime());
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, alpha);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
||||||
|
|
||||||
if (mc.playerController.gameIsSurvivalOrAdventure())
|
if (mc.playerController.gameIsSurvivalOrAdventure())
|
||||||
{
|
{
|
||||||
int scaledWidth = mc.mainWindow.getScaledWidth();
|
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
||||||
int scaledHeight = mc.mainWindow.getScaledHeight();
|
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
||||||
int x = scaledWidth / 2 - 91;
|
int x = scaledWidth / 2 - 91;
|
||||||
|
|
||||||
mc.getProfiler().startSection("expBar");
|
mc.getProfiler().startSection("expBar");
|
||||||
GlStateManager.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
|
mc.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
|
||||||
int i = mc.player.xpBarCap();
|
int i = mc.player.xpBarCap();
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
@@ -310,12 +260,12 @@ public class RenderUtils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
mc.getProfiler().endSection();
|
mc.getProfiler().endSection();
|
||||||
if (mc.player.experienceLevel > 0)
|
if (mc.player.experienceLevel > 0)
|
||||||
{
|
{
|
||||||
mc.getProfiler().startSection("expLevel");
|
mc.getProfiler().startSection("expLevel");
|
||||||
GlStateManager.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
String s = "" + mc.player.experienceLevel;
|
String s = "" + mc.player.experienceLevel;
|
||||||
int i1 = (scaledWidth - gui.getFontRenderer()
|
int i1 = (scaledWidth - gui.getFontRenderer()
|
||||||
.getStringWidth(s)) / 2;
|
.getStringWidth(s)) / 2;
|
||||||
@@ -349,11 +299,11 @@ public class RenderUtils
|
|||||||
(float) i1,
|
(float) i1,
|
||||||
(float) j1,
|
(float) j1,
|
||||||
8453920);
|
8453920);
|
||||||
GlStateManager.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
mc.getProfiler().endSection();
|
mc.getProfiler().endSection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -389,21 +339,25 @@ public class RenderUtils
|
|||||||
hotbar.getFadeInTime(),
|
hotbar.getFadeInTime(),
|
||||||
hotbar.getFadeOutTime());
|
hotbar.getFadeOutTime());
|
||||||
|
|
||||||
int scaledWidth = mc.mainWindow.getScaledWidth();
|
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
||||||
int scaledHeight = mc.mainWindow.getScaledHeight();
|
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
||||||
if (playerentity != null)
|
if (playerentity != null)
|
||||||
{
|
{
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, alpha);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
mc.getTextureManager().bindTexture(WIDGETS_TEX_PATH);
|
mc.getTextureManager().bindTexture(WIDGETS_TEX_PATH);
|
||||||
ItemStack itemstack = playerentity.getHeldItemOffhand();
|
ItemStack itemstack = playerentity.getHeldItemOffhand();
|
||||||
HandSide handside = playerentity.getPrimaryHand().opposite();
|
HandSide handside = playerentity.getPrimaryHand().opposite();
|
||||||
int i = scaledWidth / 2;
|
int i = scaledWidth / 2;
|
||||||
int j = getBlitOffset(gui);
|
int j = gui.getBlitOffset();
|
||||||
int k = 182;
|
int k = 182;
|
||||||
int l = 91;
|
int l = 91;
|
||||||
setBlitOffset(gui, -90);
|
gui.setBlitOffset(-90);
|
||||||
gui.blit(i - 91, scaledHeight - TimerUtils.getHotbarTranslation(), 0, 0, 182, 22);
|
gui.blit(i - 91,
|
||||||
|
scaledHeight - TimerUtils.getHotbarTranslation(),
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
182,
|
||||||
|
22);
|
||||||
gui.blit(i - 91 - 1 + playerentity.inventory.currentItem * 20,
|
gui.blit(i - 91 - 1 + playerentity.inventory.currentItem * 20,
|
||||||
scaledHeight - (int) (22F * alpha) - 1,
|
scaledHeight - (int) (22F * alpha) - 1,
|
||||||
0,
|
0,
|
||||||
@@ -415,7 +369,7 @@ public class RenderUtils
|
|||||||
if (handside == HandSide.LEFT)
|
if (handside == HandSide.LEFT)
|
||||||
{
|
{
|
||||||
gui.blit(i - 91 - 29,
|
gui.blit(i - 91 - 29,
|
||||||
scaledHeight - (int) (23 * alpha),
|
scaledHeight - (int) (23F * alpha),
|
||||||
24,
|
24,
|
||||||
22,
|
22,
|
||||||
29,
|
29,
|
||||||
@@ -423,26 +377,25 @@ public class RenderUtils
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gui.blit(i + 91, scaledHeight - (int) (23 * alpha), 53, 22, 29, 24);
|
gui.blit(i + 91,
|
||||||
|
scaledHeight - (int) (23F * alpha),
|
||||||
|
53,
|
||||||
|
22,
|
||||||
|
29,
|
||||||
|
24);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setBlitOffset(gui, j);
|
gui.setBlitOffset(j);
|
||||||
GlStateManager.enableRescaleNormal();
|
RenderSystem.enableRescaleNormal();
|
||||||
GlStateManager.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA,
|
RenderSystem.defaultBlendFunc();
|
||||||
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA,
|
|
||||||
GlStateManager.SourceFactor.ONE,
|
|
||||||
GlStateManager.DestFactor.ZERO);
|
|
||||||
RenderHelper.enableGUIStandardItemLighting();
|
|
||||||
|
|
||||||
for (int i1 = 0; i1 < 9; ++i1)
|
for (int i1 = 0; i1 < 9; ++i1)
|
||||||
{
|
{
|
||||||
int j1 = i - 90 + i1 * 20 + 2;
|
int j1 = i - 90 + i1 * 20 + 2;
|
||||||
int k1 = scaledHeight - (int) (16 * alpha) - 3;
|
int k1 = scaledHeight - (int) (16F * alpha) - 3;
|
||||||
renderHotbarItem(mc,
|
renderHotbarItem(mc, alpha, j1,
|
||||||
alpha,
|
|
||||||
j1,
|
|
||||||
k1,
|
k1,
|
||||||
partialTicks,
|
partialTicks,
|
||||||
playerentity,
|
playerentity,
|
||||||
@@ -451,12 +404,10 @@ public class RenderUtils
|
|||||||
|
|
||||||
if (!itemstack.isEmpty())
|
if (!itemstack.isEmpty())
|
||||||
{
|
{
|
||||||
int i2 = scaledHeight - (int) (16 * alpha) - 3;
|
int i2 = scaledHeight - (int) (16F * alpha) - 3;
|
||||||
if (handside == HandSide.LEFT)
|
if (handside == HandSide.LEFT)
|
||||||
{
|
{
|
||||||
renderHotbarItem(mc,
|
renderHotbarItem(mc, alpha, i - 91 - 26,
|
||||||
alpha,
|
|
||||||
i - 91 - 26,
|
|
||||||
i2,
|
i2,
|
||||||
partialTicks,
|
partialTicks,
|
||||||
playerentity,
|
playerentity,
|
||||||
@@ -464,9 +415,7 @@ public class RenderUtils
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
renderHotbarItem(mc,
|
renderHotbarItem(mc, alpha, i + 91 + 10,
|
||||||
alpha,
|
|
||||||
i + 91 + 10,
|
|
||||||
i2,
|
i2,
|
||||||
partialTicks,
|
partialTicks,
|
||||||
playerentity,
|
playerentity,
|
||||||
@@ -489,15 +438,19 @@ public class RenderUtils
|
|||||||
mc.getTextureManager()
|
mc.getTextureManager()
|
||||||
.bindTexture(AbstractGui.GUI_ICONS_LOCATION);
|
.bindTexture(AbstractGui.GUI_ICONS_LOCATION);
|
||||||
int l1 = (int) (f * 19.0F);
|
int l1 = (int) (f * 19.0F);
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
||||||
gui.blit(k2, j2, 0, 94, 18, 18);
|
gui.blit(k2, j2, 0, 94, 18, 18);
|
||||||
gui.blit(k2, j2 + 18 - l1, 18, 112 - l1, 18, l1);
|
gui.blit(k2,
|
||||||
|
j2 + 18 - l1,
|
||||||
|
18,
|
||||||
|
112 - l1,
|
||||||
|
18,
|
||||||
|
l1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderHelper.disableStandardItemLighting();
|
RenderSystem.disableRescaleNormal();
|
||||||
GlStateManager.disableRescaleNormal();
|
RenderSystem.disableBlend();
|
||||||
GlStateManager.disableBlend();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -520,119 +473,76 @@ public class RenderUtils
|
|||||||
PlayerEntity player,
|
PlayerEntity player,
|
||||||
ItemStack stack)
|
ItemStack stack)
|
||||||
{
|
{
|
||||||
if (!stack.isEmpty())
|
if (!stack.isEmpty()) {
|
||||||
{
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, alpha);
|
float f = (float)stack.getAnimationsToGo() - partialTicks;
|
||||||
float f = (float) stack.getAnimationsToGo() - partialTicks;
|
if (f > 0.0F) {
|
||||||
if (f > 0.0F)
|
RenderSystem.pushMatrix();
|
||||||
{
|
|
||||||
GlStateManager.pushMatrix();
|
|
||||||
float f1 = 1.0F + f / 5.0F;
|
float f1 = 1.0F + f / 5.0F;
|
||||||
GlStateManager.translatef((float) (x + 8),
|
RenderSystem.translatef((float)(x + 8), (float)(y + 12), 0.0F);
|
||||||
(float) (y + 12),
|
RenderSystem.scalef(1.0F / f1, (f1 + 1.0F) / 2.0F, 1.0F);
|
||||||
0.0F);
|
RenderSystem.translatef((float)(-(x + 8)), (float)(-(y + 12)), 0.0F);
|
||||||
GlStateManager.scalef(1.0F / f1, (f1 + 1.0F) / 2.0F, 1.0F);
|
|
||||||
GlStateManager.translatef((float) (-(x + 8)),
|
|
||||||
(float) (-(y + 12)),
|
|
||||||
0.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
renderItemAndEffectIntoGUI(mc, player, stack, x, y, alpha);
|
renderItemAndEffectIntoGUI(mc, player, stack, x, y, alpha);
|
||||||
if (f > 0.0F)
|
if (f > 0.0F) {
|
||||||
{
|
RenderSystem.popMatrix();
|
||||||
GlStateManager.popMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mc.getItemRenderer()
|
mc.getItemRenderer().renderItemOverlays(mc.fontRenderer, stack, x, y);
|
||||||
.renderItemOverlays(mc.fontRenderer, stack, x, y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void renderItemAndEffectIntoGUI(Minecraft mc,
|
private static void renderItemAndEffectIntoGUI(Minecraft mc, LivingEntity entityIn, ItemStack itemIn, int x, int y, float alpha)
|
||||||
LivingEntity entityIn,
|
|
||||||
ItemStack itemIn,
|
|
||||||
int x,
|
|
||||||
int y,
|
|
||||||
float alpha)
|
|
||||||
{
|
|
||||||
if (!itemIn.isEmpty())
|
|
||||||
{
|
{
|
||||||
|
if (!itemIn.isEmpty()) {
|
||||||
float zLevel = 50.0F;
|
float zLevel = 50.0F;
|
||||||
|
|
||||||
try
|
try {
|
||||||
{
|
IBakedModel bakedmodel = mc.getItemRenderer().getItemModelWithOverrides(itemIn, (World)null, entityIn);
|
||||||
IBakedModel bakedmodel = mc.getItemRenderer()
|
RenderSystem.pushMatrix();
|
||||||
.getItemModelWithOverrides(itemIn,
|
mc.getTextureManager().bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||||
(World) null,
|
mc.getTextureManager().func_229267_b_(AtlasTexture.LOCATION_BLOCKS_TEXTURE).setBlurMipmapDirect(false, false);
|
||||||
entityIn);
|
RenderSystem.enableRescaleNormal();
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.enableAlphaTest();
|
||||||
mc.getTextureManager()
|
RenderSystem.defaultAlphaFunc();
|
||||||
.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
RenderSystem.enableBlend();
|
||||||
mc.getTextureManager()
|
RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
||||||
.getTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE)
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
.setBlurMipmap(false, false);
|
RenderSystem.translatef((float)x, (float)y, 100.0F + zLevel);
|
||||||
GlStateManager.enableRescaleNormal();
|
RenderSystem.translatef(8.0F, 8.0F, 0.0F);
|
||||||
GlStateManager.enableAlphaTest();
|
RenderSystem.scalef(1.0F, -1.0F, 1.0F);
|
||||||
GlStateManager.alphaFunc(516, 0.1F);
|
RenderSystem.scalef(16.0F, 16.0F, 16.0F);
|
||||||
GlStateManager.enableBlend();
|
MatrixStack matrixstack = new MatrixStack();
|
||||||
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA,
|
IRenderTypeBuffer.Impl irendertypebuffer$impl = Minecraft.getInstance().func_228019_au_().func_228487_b_();
|
||||||
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
|
Item item = itemIn.getItem();
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, alpha);
|
boolean flag = !bakedmodel.isGui3d() || item == Items.SHIELD || item == Items.TRIDENT;
|
||||||
Method transformMethod = null;
|
if (flag) {
|
||||||
try
|
RenderHelper.func_227783_c_();
|
||||||
{
|
|
||||||
transformMethod = ItemRenderer.class.getDeclaredMethod("setupGuiTransform", int.class, int.class, boolean.class);
|
|
||||||
}
|
}
|
||||||
catch (NoSuchMethodException e)
|
|
||||||
{
|
mc.getItemRenderer().func_229111_a_(itemIn, ItemCameraTransforms.TransformType.GUI, false, matrixstack, irendertypebuffer$impl, 15728880, OverlayTexture.field_229196_a_, bakedmodel);
|
||||||
try
|
irendertypebuffer$impl.func_228461_a_();
|
||||||
{
|
RenderSystem.enableDepthTest();
|
||||||
transformMethod = ItemRenderer.class.getDeclaredMethod("func_180452_a", int.class, int.class, boolean.class);
|
if (flag) {
|
||||||
|
RenderHelper.func_227784_d_();
|
||||||
}
|
}
|
||||||
catch (NoSuchMethodException e1)
|
|
||||||
{
|
RenderSystem.disableAlphaTest();
|
||||||
e.printStackTrace();
|
RenderSystem.disableRescaleNormal();
|
||||||
}
|
RenderSystem.popMatrix();
|
||||||
}
|
} catch (Throwable throwable) {
|
||||||
if (transformMethod != null)
|
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Rendering item");
|
||||||
{
|
CrashReportCategory crashreportcategory = crashreport.makeCategory("Item being rendered");
|
||||||
if (!transformMethod.isAccessible())
|
|
||||||
{
|
|
||||||
transformMethod.setAccessible(true);
|
|
||||||
}
|
|
||||||
transformMethod.invoke(mc.getItemRenderer(), x, y, bakedmodel.isGui3d());
|
|
||||||
}
|
|
||||||
bakedmodel =
|
|
||||||
net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(
|
|
||||||
bakedmodel,
|
|
||||||
ItemCameraTransforms.TransformType.GUI,
|
|
||||||
false);
|
|
||||||
mc.getItemRenderer().renderItem(itemIn, bakedmodel);
|
|
||||||
GlStateManager.disableAlphaTest();
|
|
||||||
GlStateManager.disableRescaleNormal();
|
|
||||||
GlStateManager.disableLighting();
|
|
||||||
GlStateManager.popMatrix();
|
|
||||||
mc.textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
|
||||||
mc.textureManager.getTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE)
|
|
||||||
.restoreLastBlurMipmap();
|
|
||||||
}
|
|
||||||
catch (Throwable throwable)
|
|
||||||
{
|
|
||||||
CrashReport crashreport = CrashReport.makeCrashReport(throwable,
|
|
||||||
"Rendering item");
|
|
||||||
CrashReportCategory crashreportcategory =
|
|
||||||
crashreport.makeCategory("Item being rendered");
|
|
||||||
crashreportcategory.addDetail("Item Type", () -> {
|
crashreportcategory.addDetail("Item Type", () -> {
|
||||||
return String.valueOf((Object) itemIn.getItem());
|
return String.valueOf((Object)itemIn.getItem());
|
||||||
});
|
});
|
||||||
crashreportcategory.addDetail("Registry Name",
|
crashreportcategory.addDetail("Registry Name", () -> String.valueOf(itemIn.getItem().getRegistryName()));
|
||||||
() -> String.valueOf(itemIn.getItem()
|
|
||||||
.getRegistryName()));
|
|
||||||
crashreportcategory.addDetail("Item Damage", () -> {
|
crashreportcategory.addDetail("Item Damage", () -> {
|
||||||
return String.valueOf(itemIn.getDamage());
|
return String.valueOf(itemIn.getDamage());
|
||||||
});
|
});
|
||||||
crashreportcategory.addDetail("Item NBT", () -> {
|
crashreportcategory.addDetail("Item NBT", () -> {
|
||||||
return String.valueOf((Object) itemIn.getTag());
|
return String.valueOf((Object)itemIn.getTag());
|
||||||
});
|
});
|
||||||
crashreportcategory.addDetail("Item Foil", () -> {
|
crashreportcategory.addDetail("Item Foil", () -> {
|
||||||
return String.valueOf(itemIn.hasEffect());
|
return String.valueOf(itemIn.hasEffect());
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package markil3.immersive_hud;
|
package markil3.immersive_hud;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
import net.minecraft.client.entity.player.ClientPlayerEntity;
|
||||||
@@ -14,11 +15,10 @@ import net.minecraft.item.FilledMapItem;
|
|||||||
import net.minecraft.item.FishingRodItem;
|
import net.minecraft.item.FishingRodItem;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.LingeringPotionItem;
|
|
||||||
import net.minecraft.item.ShieldItem;
|
import net.minecraft.item.ShieldItem;
|
||||||
import net.minecraft.item.ShootableItem;
|
import net.minecraft.item.ShootableItem;
|
||||||
import net.minecraft.item.SnowballItem;
|
import net.minecraft.item.SnowballItem;
|
||||||
import net.minecraft.item.SplashPotionItem;
|
import net.minecraft.item.ThrowablePotionItem;
|
||||||
import net.minecraft.item.TridentItem;
|
import net.minecraft.item.TridentItem;
|
||||||
import net.minecraft.potion.Effect;
|
import net.minecraft.potion.Effect;
|
||||||
import net.minecraft.potion.EffectInstance;
|
import net.minecraft.potion.EffectInstance;
|
||||||
@@ -169,7 +169,7 @@ public class TimerUtils
|
|||||||
*/
|
*/
|
||||||
public static void setAlpha(float alpha)
|
public static void setAlpha(float alpha)
|
||||||
{
|
{
|
||||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, alpha);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -283,6 +283,7 @@ public class TimerUtils
|
|||||||
* hands into and out of view as needed.
|
* hands into and out of view as needed.
|
||||||
*
|
*
|
||||||
* @param hand - The hand being rendered.
|
* @param hand - The hand being rendered.
|
||||||
|
* @param matrixStack - The rendering stack.
|
||||||
* @param ticks
|
* @param ticks
|
||||||
*
|
*
|
||||||
* @return If true, then don't render this hand at all.
|
* @return If true, then don't render this hand at all.
|
||||||
@@ -290,10 +291,15 @@ public class TimerUtils
|
|||||||
* @since 0.2-1.16.4-forge
|
* @since 0.2-1.16.4-forge
|
||||||
*/
|
*/
|
||||||
public static boolean onRenderHand(Hand hand,
|
public static boolean onRenderHand(Hand hand,
|
||||||
|
MatrixStack matrixStack,
|
||||||
float ticks)
|
float ticks)
|
||||||
{
|
{
|
||||||
float HAND_UP_TIME = 20F;
|
float HAND_UP_TIME = 20F;
|
||||||
|
|
||||||
|
boolean hideHands =
|
||||||
|
ConfigManager.getInstance().hideHands();
|
||||||
|
if (hideHands)
|
||||||
|
{
|
||||||
switch (hand)
|
switch (hand)
|
||||||
{
|
{
|
||||||
case OFF_HAND:
|
case OFF_HAND:
|
||||||
@@ -302,7 +308,7 @@ public class TimerUtils
|
|||||||
/*
|
/*
|
||||||
* Undo the transformation of the previous hand
|
* Undo the transformation of the previous hand
|
||||||
*/
|
*/
|
||||||
GlStateManager.translatef(0,
|
matrixStack.func_227862_a_(0,
|
||||||
(float) (1.0F * (HAND_UP_TIME - mainHandTime) / HAND_UP_TIME),
|
(float) (1.0F * (HAND_UP_TIME - mainHandTime) / HAND_UP_TIME),
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
@@ -318,7 +324,8 @@ public class TimerUtils
|
|||||||
}
|
}
|
||||||
if (offHandTime < HAND_UP_TIME)
|
if (offHandTime < HAND_UP_TIME)
|
||||||
{
|
{
|
||||||
GlStateManager.translatef(0,
|
matrixStack
|
||||||
|
.func_227862_a_(0,
|
||||||
(float) (-1.0F * (HAND_UP_TIME - offHandTime) / HAND_UP_TIME),
|
(float) (-1.0F * (HAND_UP_TIME - offHandTime) / HAND_UP_TIME),
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
@@ -337,13 +344,15 @@ public class TimerUtils
|
|||||||
}
|
}
|
||||||
if (mainHandTime < HAND_UP_TIME)
|
if (mainHandTime < HAND_UP_TIME)
|
||||||
{
|
{
|
||||||
GlStateManager.translatef(0,
|
matrixStack
|
||||||
|
.func_227861_a_(0,
|
||||||
(float) (-1.0F * (HAND_UP_TIME - mainHandTime) / HAND_UP_TIME),
|
(float) (-1.0F * (HAND_UP_TIME - mainHandTime) / HAND_UP_TIME),
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,6 +387,10 @@ public class TimerUtils
|
|||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
boolean canceled = false;
|
boolean canceled = false;
|
||||||
|
|
||||||
|
boolean hideCrosshair =
|
||||||
|
ConfigManager.getInstance().hideCrosshair();
|
||||||
|
if (hideCrosshair)
|
||||||
|
{
|
||||||
if (mc.objectMouseOver != null && mc.objectMouseOver.getType() != RayTraceResult.Type.MISS)
|
if (mc.objectMouseOver != null && mc.objectMouseOver.getType() != RayTraceResult.Type.MISS)
|
||||||
{
|
{
|
||||||
if (mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY)
|
if (mc.objectMouseOver.getType() == RayTraceResult.Type.ENTITY)
|
||||||
@@ -407,6 +420,7 @@ public class TimerUtils
|
|||||||
{
|
{
|
||||||
crosshairTime -= ticks;
|
crosshairTime -= ticks;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return canceled;
|
return canceled;
|
||||||
}
|
}
|
||||||
@@ -598,7 +612,7 @@ public class TimerUtils
|
|||||||
* Items that have the crosshairs enabled for as long
|
* Items that have the crosshairs enabled for as long
|
||||||
* as the item is being held at all.
|
* as the item is being held at all.
|
||||||
*/
|
*/
|
||||||
else if (item instanceof SplashPotionItem || item instanceof LingeringPotionItem || item instanceof SnowballItem || item instanceof EggItem || item instanceof EnderPearlItem || item instanceof FishingRodItem)
|
else if (item instanceof ThrowablePotionItem || item instanceof SnowballItem || item instanceof EggItem || item instanceof EnderPearlItem || item instanceof FishingRodItem)
|
||||||
{
|
{
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
@@ -758,8 +772,8 @@ public class TimerUtils
|
|||||||
{
|
{
|
||||||
if (healthTime > 0)
|
if (healthTime > 0)
|
||||||
{
|
{
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
setAlpha(Main.getAlpha(healthTime,
|
setAlpha(Main.getAlpha(healthTime,
|
||||||
@@ -770,8 +784,8 @@ public class TimerUtils
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
return false;
|
return false;
|
||||||
@@ -832,16 +846,16 @@ public class TimerUtils
|
|||||||
hungerTimes.getMaxTime(),
|
hungerTimes.getMaxTime(),
|
||||||
hungerTimes.getFadeInTime(),
|
hungerTimes.getFadeInTime(),
|
||||||
hungerTimes.getFadeOutTime()));
|
hungerTimes.getFadeOutTime()));
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
return false;
|
return false;
|
||||||
@@ -870,8 +884,8 @@ public class TimerUtils
|
|||||||
healthTimes.getMaxTime(),
|
healthTimes.getMaxTime(),
|
||||||
healthTimes.getFadeInTime(),
|
healthTimes.getFadeInTime(),
|
||||||
healthTimes.getFadeOutTime()));
|
healthTimes.getFadeOutTime()));
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
return false;
|
return false;
|
||||||
@@ -890,8 +904,8 @@ public class TimerUtils
|
|||||||
*/
|
*/
|
||||||
public static boolean drawAir(float ticks)
|
public static boolean drawAir(float ticks)
|
||||||
{
|
{
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
return false;
|
return false;
|
||||||
@@ -923,7 +937,7 @@ public class TimerUtils
|
|||||||
Entity tmp = mc.player.getRidingEntity();
|
Entity tmp = mc.player.getRidingEntity();
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
|
||||||
if (tmp == null)
|
if (tmp == null || !(tmp instanceof LivingEntity))
|
||||||
{
|
{
|
||||||
mountHealth = -1;
|
mountHealth = -1;
|
||||||
mountMaxHealth = -1;
|
mountMaxHealth = -1;
|
||||||
@@ -962,8 +976,8 @@ public class TimerUtils
|
|||||||
{
|
{
|
||||||
if (mountTime > 0)
|
if (mountTime > 0)
|
||||||
{
|
{
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
setAlpha(Main.getAlpha(mountTime,
|
setAlpha(Main.getAlpha(mountTime,
|
||||||
@@ -974,8 +988,8 @@ public class TimerUtils
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
GlStateManager.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
GlStateManager.translatef(0F,
|
RenderSystem.translatef(0F,
|
||||||
getHealthTranslation(),
|
getHealthTranslation(),
|
||||||
0F);
|
0F);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||||
modLoader="javafml" #mandatory
|
modLoader="javafml" #mandatory
|
||||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||||
loaderVersion="[26,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
loaderVersion="[28,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||||
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
|
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
|
||||||
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||||
license="GPL-3.0-only"
|
license="GPL-3.0-only"
|
||||||
@@ -57,7 +57,7 @@ The following elements will only show up under certain conditions:
|
|||||||
# Does this dependency have to exist - if not, ordering below must be specified
|
# Does this dependency have to exist - if not, ordering below must be specified
|
||||||
mandatory=true #mandatory
|
mandatory=true #mandatory
|
||||||
# The version range of the dependency
|
# The version range of the dependency
|
||||||
versionRange="[26,)" #mandatory
|
versionRange="[28,)" #mandatory
|
||||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||||
@@ -78,6 +78,6 @@ The following elements will only show up under certain conditions:
|
|||||||
[[dependencies.immersive_hud]]
|
[[dependencies.immersive_hud]]
|
||||||
modId="minecraft"
|
modId="minecraft"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
versionRange="[1.14,1.15)"
|
versionRange="[1.15,1.15.2)"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="CLIENT"
|
side="CLIENT"
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
"option.immersive_hud.effectFadeIn": "Potion Fade In Time",
|
"option.immersive_hud.effectFadeIn": "Potion Fade In Time",
|
||||||
"option.immersive_hud.effectFadeOut": "Potion Fade Out Time",
|
"option.immersive_hud.effectFadeOut": "Potion Fade Out Time",
|
||||||
"option.immersive_hud.crosshairTime": "Crosshair Display Time",
|
"option.immersive_hud.crosshairTime": "Crosshair Display Time",
|
||||||
|
"option.immersive_hud.hideCrosshair": "Hide Crosshair",
|
||||||
"option.immersive_hud.handTime": "Hand Display Time",
|
"option.immersive_hud.handTime": "Hand Display Time",
|
||||||
|
"option.immersive_hud.hideHands": "Hide Hands",
|
||||||
"option.immersive_hud.minHealth": "Minimum Health Fade",
|
"option.immersive_hud.minHealth": "Minimum Health Fade",
|
||||||
"option.immersive_hud.minHunger": "Minimum Hunger Fade",
|
"option.immersive_hud.minHunger": "Minimum Hunger Fade",
|
||||||
"option.immersive_hud.showArmor": "Show Armor",
|
"option.immersive_hud.showArmor": "Show Armor",
|
||||||
@@ -42,7 +44,9 @@
|
|||||||
"tooltip.immersive_hud.effectFadeIn": "How many seconds it takes for potion icons to fade in",
|
"tooltip.immersive_hud.effectFadeIn": "How many seconds it takes for potion icons to fade in",
|
||||||
"tooltip.immersive_hud.effectFadeOut": "How many seconds it takes for potion icons to fade out",
|
"tooltip.immersive_hud.effectFadeOut": "How many seconds it takes for potion icons to fade out",
|
||||||
"tooltip.immersive_hud.crosshairTime": "How many seconds the crosshairs can be on screen",
|
"tooltip.immersive_hud.crosshairTime": "How many seconds the crosshairs can be on screen",
|
||||||
|
"tooltip.immersive_hud.hideCrosshair": "Whether or not the crosshairs should be hidden after a period of time",
|
||||||
"tooltip.immersive_hud.handTime": "How many seconds the hands can be on screen",
|
"tooltip.immersive_hud.handTime": "How many seconds the hands can be on screen",
|
||||||
|
"tooltip.immersive_hud.hideHands": "Whether or not hands should be hidden after a period of time",
|
||||||
"tooltip.immersive_hud.minHealth": "When the percentage of health goes below this level, the health bar won't fade away",
|
"tooltip.immersive_hud.minHealth": "When the percentage of health goes below this level, the health bar won't fade away",
|
||||||
"tooltip.immersive_hud.minHunger": "When the hunger level goes below this level, the hunger bar won't fade away",
|
"tooltip.immersive_hud.minHunger": "When the hunger level goes below this level, the hunger bar won't fade away",
|
||||||
"tooltip.immersive_hud.showArmor": "Whether or not the armor bar should display on the HUD"
|
"tooltip.immersive_hud.showArmor": "Whether or not the armor bar should display on the HUD"
|
||||||
|
|||||||
Reference in New Issue
Block a user