Compare commits
5 Commits
v1.0-1.15-
...
v1.1-1.15.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f972d5fe42 | ||
|
|
4d069b15a2 | ||
|
|
b4ebd7d6a2 | ||
|
|
a94b7f2929 | ||
|
|
db9225a6ca |
@@ -4,12 +4,12 @@ org.gradle.jvmargs=-Xmx3G
|
|||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
# Forge Properties
|
# Forge Properties
|
||||||
minecraft_version=1.15
|
minecraft_version=1.15.2
|
||||||
mappings=20190719-1.14.3
|
mappings=20200514-1.15.1
|
||||||
forge_version=29.0.4
|
forge_version=31.2.0
|
||||||
|
|
||||||
|
|
||||||
# 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
|
||||||
@@ -155,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;
|
||||||
@@ -182,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")
|
||||||
@@ -189,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);
|
||||||
@@ -282,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.
|
||||||
*
|
*
|
||||||
@@ -292,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.
|
||||||
*
|
*
|
||||||
@@ -334,6 +364,16 @@ public class ConfigManager
|
|||||||
this.crosshairTime.set(time);
|
this.crosshairTime.set(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the crosshairs should be hidden after a period of time.
|
||||||
|
*
|
||||||
|
* @param hide - Whether or not crosshairs will be hidden.
|
||||||
|
*/
|
||||||
|
public void hideCrosshair(boolean hide)
|
||||||
|
{
|
||||||
|
this.hideCrosshair.set(hide);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the time that the hands are allowed to display.
|
* Sets the time that the hands are allowed to display.
|
||||||
*
|
*
|
||||||
@@ -344,6 +384,16 @@ public class ConfigManager
|
|||||||
this.handTime.set(time);
|
this.handTime.set(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether hands should be hidden after a period of time.
|
||||||
|
*
|
||||||
|
* @param hide - Whether or not hands will be hidden.
|
||||||
|
*/
|
||||||
|
public void hideHands(boolean hide)
|
||||||
|
{
|
||||||
|
this.hideHands.set(hide);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether the armor bar should render.
|
* Determines whether the armor bar should render.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ 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.RenderHandEvent;
|
||||||
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;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
@@ -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
|
||||||
@@ -97,7 +116,9 @@ public class EventBus
|
|||||||
* @param event - event data
|
* @param event - event data
|
||||||
*/
|
*/
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onRenderHand(final RenderSpecificHandEvent event)
|
public static void onRenderHand(final RenderHandEvent event)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (TimerUtils.onRenderHand(event.getHand(),
|
if (TimerUtils.onRenderHand(event.getHand(),
|
||||||
event.getMatrixStack(),
|
event.getMatrixStack(),
|
||||||
@@ -106,6 +127,14 @@ public class EventBus
|
|||||||
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
|
||||||
@@ -115,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;
|
||||||
@@ -265,4 +296,11 @@ public class EventBus
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LOGGER.error(
|
||||||
|
"Error in running markil3.immersive_hud.EventBus#onGUIDraw event",
|
||||||
|
e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ public class RenderUtils
|
|||||||
IngameGui gui,
|
IngameGui gui,
|
||||||
float ticks)
|
float ticks)
|
||||||
{
|
{
|
||||||
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
int scaledWidth = mc.getMainWindow().getScaledWidth();
|
||||||
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
int scaledHeight = mc.getMainWindow().getScaledHeight();
|
||||||
|
|
||||||
Collection<EffectInstance> collection =
|
Collection<EffectInstance> collection =
|
||||||
mc.player.getActivePotionEffects();
|
mc.player.getActivePotionEffects();
|
||||||
@@ -137,8 +137,8 @@ public class RenderUtils
|
|||||||
float f1 = effectAlpha;
|
float f1 = effectAlpha;
|
||||||
list.add(() -> {
|
list.add(() -> {
|
||||||
mc.getTextureManager()
|
mc.getTextureManager()
|
||||||
.bindTexture(textureatlassprite.func_229241_m_()
|
.bindTexture(textureatlassprite.getAtlasTexture()
|
||||||
.func_229223_g_());
|
.getTextureLocation());
|
||||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
|
||||||
gui.blit(j1 + 3,
|
gui.blit(j1 + 3,
|
||||||
k1 + 3,
|
k1 + 3,
|
||||||
@@ -185,8 +185,8 @@ public class RenderUtils
|
|||||||
jump.getMaxTime(),
|
jump.getMaxTime(),
|
||||||
jump.getFadeInTime(),
|
jump.getFadeInTime(),
|
||||||
jump.getFadeOutTime());
|
jump.getFadeOutTime());
|
||||||
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
int scaledWidth = mc.getMainWindow().getScaledWidth();
|
||||||
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
int scaledHeight = mc.getMainWindow().getScaledHeight();
|
||||||
int xPosition = scaledWidth / 2 - 91;
|
int xPosition = scaledWidth / 2 - 91;
|
||||||
|
|
||||||
mc.getProfiler().startSection("jumpBar");
|
mc.getProfiler().startSection("jumpBar");
|
||||||
@@ -240,8 +240,8 @@ public class RenderUtils
|
|||||||
|
|
||||||
if (mc.playerController.gameIsSurvivalOrAdventure())
|
if (mc.playerController.gameIsSurvivalOrAdventure())
|
||||||
{
|
{
|
||||||
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
int scaledWidth = mc.getMainWindow().getScaledWidth();
|
||||||
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
int scaledHeight = mc.getMainWindow().getScaledHeight();
|
||||||
int x = scaledWidth / 2 - 91;
|
int x = scaledWidth / 2 - 91;
|
||||||
|
|
||||||
mc.getProfiler().startSection("expBar");
|
mc.getProfiler().startSection("expBar");
|
||||||
@@ -339,8 +339,8 @@ public class RenderUtils
|
|||||||
hotbar.getFadeInTime(),
|
hotbar.getFadeInTime(),
|
||||||
hotbar.getFadeOutTime());
|
hotbar.getFadeOutTime());
|
||||||
|
|
||||||
int scaledWidth = mc.func_228018_at_().getScaledWidth();
|
int scaledWidth = mc.getMainWindow().getScaledWidth();
|
||||||
int scaledHeight = mc.func_228018_at_().getScaledHeight();
|
int scaledHeight = mc.getMainWindow().getScaledHeight();
|
||||||
if (playerentity != null)
|
if (playerentity != null)
|
||||||
{
|
{
|
||||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
RenderSystem.color4f(1.0F, 1.0F, 1.0F, alpha);
|
||||||
@@ -502,7 +502,7 @@ public class RenderUtils
|
|||||||
IBakedModel bakedmodel = mc.getItemRenderer().getItemModelWithOverrides(itemIn, (World)null, entityIn);
|
IBakedModel bakedmodel = mc.getItemRenderer().getItemModelWithOverrides(itemIn, (World)null, entityIn);
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
mc.getTextureManager().bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
mc.getTextureManager().bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
|
||||||
mc.getTextureManager().func_229267_b_(AtlasTexture.LOCATION_BLOCKS_TEXTURE).setBlurMipmapDirect(false, false);
|
mc.getTextureManager().getTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE).setBlurMipmapDirect(false, false);
|
||||||
RenderSystem.enableRescaleNormal();
|
RenderSystem.enableRescaleNormal();
|
||||||
RenderSystem.enableAlphaTest();
|
RenderSystem.enableAlphaTest();
|
||||||
RenderSystem.defaultAlphaFunc();
|
RenderSystem.defaultAlphaFunc();
|
||||||
@@ -514,18 +514,18 @@ public class RenderUtils
|
|||||||
RenderSystem.scalef(1.0F, -1.0F, 1.0F);
|
RenderSystem.scalef(1.0F, -1.0F, 1.0F);
|
||||||
RenderSystem.scalef(16.0F, 16.0F, 16.0F);
|
RenderSystem.scalef(16.0F, 16.0F, 16.0F);
|
||||||
MatrixStack matrixstack = new MatrixStack();
|
MatrixStack matrixstack = new MatrixStack();
|
||||||
IRenderTypeBuffer.Impl irendertypebuffer$impl = Minecraft.getInstance().func_228019_au_().func_228487_b_();
|
IRenderTypeBuffer.Impl irendertypebuffer$impl = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource();
|
||||||
Item item = itemIn.getItem();
|
Item item = itemIn.getItem();
|
||||||
boolean flag = !bakedmodel.isGui3d() || item == Items.SHIELD || item == Items.TRIDENT;
|
boolean flag = !bakedmodel.isGui3d() || item == Items.SHIELD || item == Items.TRIDENT;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
RenderHelper.func_227783_c_();
|
RenderHelper.setupGuiFlatDiffuseLighting();
|
||||||
}
|
}
|
||||||
|
|
||||||
mc.getItemRenderer().func_229111_a_(itemIn, ItemCameraTransforms.TransformType.GUI, false, matrixstack, irendertypebuffer$impl, 15728880, OverlayTexture.field_229196_a_, bakedmodel);
|
mc.getItemRenderer().renderItem(itemIn, ItemCameraTransforms.TransformType.GUI, false, matrixstack, irendertypebuffer$impl, 15728880, OverlayTexture.NO_OVERLAY, bakedmodel);
|
||||||
irendertypebuffer$impl.func_228461_a_();
|
irendertypebuffer$impl.finish();
|
||||||
RenderSystem.enableDepthTest();
|
RenderSystem.enableDepthTest();
|
||||||
if (flag) {
|
if (flag) {
|
||||||
RenderHelper.func_227784_d_();
|
RenderHelper.setupGui3DDiffuseLighting();
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderSystem.disableAlphaTest();
|
RenderSystem.disableAlphaTest();
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import net.minecraft.potion.Effect;
|
|||||||
import net.minecraft.potion.EffectInstance;
|
import net.minecraft.potion.EffectInstance;
|
||||||
import net.minecraft.potion.Effects;
|
import net.minecraft.potion.Effects;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.Util;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
|
|
||||||
@@ -297,6 +296,10 @@ public class TimerUtils
|
|||||||
{
|
{
|
||||||
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:
|
||||||
@@ -305,7 +308,7 @@ public class TimerUtils
|
|||||||
/*
|
/*
|
||||||
* Undo the transformation of the previous hand
|
* Undo the transformation of the previous hand
|
||||||
*/
|
*/
|
||||||
matrixStack.func_227862_a_(0,
|
matrixStack.translate(0,
|
||||||
(float) (1.0F * (HAND_UP_TIME - mainHandTime) / HAND_UP_TIME),
|
(float) (1.0F * (HAND_UP_TIME - mainHandTime) / HAND_UP_TIME),
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
@@ -322,7 +325,7 @@ public class TimerUtils
|
|||||||
if (offHandTime < HAND_UP_TIME)
|
if (offHandTime < HAND_UP_TIME)
|
||||||
{
|
{
|
||||||
matrixStack
|
matrixStack
|
||||||
.func_227862_a_(0,
|
.translate(0,
|
||||||
(float) (-1.0F * (HAND_UP_TIME - offHandTime) / HAND_UP_TIME),
|
(float) (-1.0F * (HAND_UP_TIME - offHandTime) / HAND_UP_TIME),
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
@@ -342,13 +345,14 @@ public class TimerUtils
|
|||||||
if (mainHandTime < HAND_UP_TIME)
|
if (mainHandTime < HAND_UP_TIME)
|
||||||
{
|
{
|
||||||
matrixStack
|
matrixStack
|
||||||
.func_227861_a_(0,
|
.translate(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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,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)
|
||||||
@@ -412,6 +420,7 @@ public class TimerUtils
|
|||||||
{
|
{
|
||||||
crosshairTime -= ticks;
|
crosshairTime -= ticks;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return canceled;
|
return canceled;
|
||||||
}
|
}
|
||||||
@@ -474,7 +483,8 @@ public class TimerUtils
|
|||||||
}
|
}
|
||||||
else if (effectinstance.getDuration() <= BLINK_TIME + potion.getFadeInTime())
|
else if (effectinstance.getDuration() <= BLINK_TIME + potion.getFadeInTime())
|
||||||
{
|
{
|
||||||
effectAlpha = -(effectinstance.getDuration() - BLINK_TIME) / 22F + 0.454F;
|
effectAlpha =
|
||||||
|
-(effectinstance.getDuration() - BLINK_TIME) / 22F + 0.454F;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -757,7 +767,8 @@ public class TimerUtils
|
|||||||
* Only makes a change if the player is healthy. Otherwise,
|
* Only makes a change if the player is healthy. Otherwise,
|
||||||
* the bar is shown.
|
* the bar is shown.
|
||||||
*/
|
*/
|
||||||
if (health / maxHealth > HEALTH_BOUNDARY && !mc.player.isPotionActive(Effects.WITHER) && !mc.player.isPotionActive(Effects.POISON))
|
if (health / maxHealth > HEALTH_BOUNDARY && !mc.player.isPotionActive(
|
||||||
|
Effects.WITHER) && !mc.player.isPotionActive(Effects.POISON))
|
||||||
{
|
{
|
||||||
if (healthTime > 0)
|
if (healthTime > 0)
|
||||||
{
|
{
|
||||||
@@ -926,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;
|
||||||
|
|||||||
@@ -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="[28,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
loaderVersion="[31,)" #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="[28,)" #mandatory
|
versionRange="[31,)" #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.15,1.15.2)"
|
versionRange="[1.15.2,1.16)"
|
||||||
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