Created
May 13, 2018 10:18
-
-
Save supertassu/516d6bd3bb97daebf41345f43430eb85 to your computer and use it in GitHub Desktop.
1.7.10 fullbright
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From db2661686c77b55a017762bc594c4012c8bd25a8 Mon Sep 17 00:00:00 2001 | |
From: Tassu <git@tassu.me> | |
Date: Sun, 13 May 2018 13:14:10 +0300 | |
Subject: [PATCH] [feat] fullbright | |
Signed-off-by: Tassu <git@tassu.me> | |
--- | |
src/minecraft/com/you/modules/Fullbright.java | 19 +++++++++++++++++++ | |
.../client/renderer/EntityRenderer.java | 6 ++++++ | |
.../minecraft/entity/EntityLivingBase.java | 6 ++++++ | |
3 files changed, 31 insertions(+) | |
create mode 100644 src/minecraft/com/you/modules/Fullbright.java | |
diff --git a/src/minecraft/com/you/modules/Fullbright.java b/src/minecraft/com/you/modules/Fullbright.java | |
new file mode 100644 | |
index 0000000..9c441d4 | |
--- /dev/null | |
+++ b/src/minecraft/com/you/modules/Fullbright.java | |
@@ -0,0 +1,19 @@ | |
+/* | |
+ * This file is part of a project by Tassu_. | |
+ * Usage of this file (or parts of it) is not allowed | |
+ * without a permission from Tassu_. | |
+ * | |
+ * You may contact Tassu_ by e-mailing to <tassu@tassu.me>. | |
+ * | |
+ * Current Package: com.you.modules | |
+ * | |
+ * @author tassu | |
+ */ | |
+ | |
+package com.you.modules; | |
+ | |
+public class Fullbright { | |
+ | |
+ public static boolean enabled = false; | |
+ | |
+} | |
diff --git a/src/minecraft/net/minecraft/client/renderer/EntityRenderer.java b/src/minecraft/net/minecraft/client/renderer/EntityRenderer.java | |
index 1e5fdf6..4d365f5 100644 | |
--- a/src/minecraft/net/minecraft/client/renderer/EntityRenderer.java | |
+++ b/src/minecraft/net/minecraft/client/renderer/EntityRenderer.java | |
@@ -1040,6 +1040,12 @@ public class EntityRenderer implements IResourceManagerReloadListener | |
*/ | |
private float getNightVisionBrightness(EntityPlayer p_82830_1_, float p_82830_2_) | |
{ | |
+ // tassu patch start - allow fullbright | |
+ if (com.you.modules.Fullbright.enabled) { | |
+ return 1.0f; | |
+ } | |
+ // tassu patch end | |
+ | |
int var3 = p_82830_1_.getActivePotionEffect(Potion.nightVision).getDuration(); | |
return var3 > 200 ? 1.0F : 0.7F + MathHelper.sin(((float)var3 - p_82830_2_) * (float)Math.PI * 0.2F) * 0.3F; | |
} | |
diff --git a/src/minecraft/net/minecraft/entity/EntityLivingBase.java b/src/minecraft/net/minecraft/entity/EntityLivingBase.java | |
index 1fda974..2221e17 100644 | |
--- a/src/minecraft/net/minecraft/entity/EntityLivingBase.java | |
+++ b/src/minecraft/net/minecraft/entity/EntityLivingBase.java | |
@@ -717,6 +717,12 @@ public abstract class EntityLivingBase extends Entity | |
public boolean isPotionActive(Potion p_70644_1_) | |
{ | |
+ // tassu patch start - allow fullbright | |
+ if (com.you.modules.Fullbright.enabled && p_70644_1_ == net.minecraft.potion.Potion.nightVision) { | |
+ return true; | |
+ } | |
+ // tassu patch end | |
+ | |
return this.activePotionsMap.containsKey(Integer.valueOf(p_70644_1_.id)); | |
} | |
-- | |
2.17.0.windows.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment