mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 23:12:18 +00:00
Implemented tint rendering
This commit is contained in:
1 parent
a86ab2b84d
commit
6dcbee69cd
4 files changed
+38
-10
No files matched your search
@@ -11,6 +11,7 @@ import noppes.npcs.client.model.part.legs.ModelMermaidLegs2;
|
||||
import noppes.npcs.client.model.part.legs.ModelNagaLegs;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.controllers.data.CustomTintData;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.data.ModelPartData;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -386,7 +387,9 @@ public class ModelLegs extends ModelScaleRenderer{
|
||||
y *= 2f;
|
||||
}
|
||||
}
|
||||
boolean bo = entity.hurtTime <= 0 && entity.deathTime <= 0 && !base.isArmor;
|
||||
CustomTintData customTintData = entity.display.customTintData;
|
||||
boolean bo = entity.hurtTime <= 0 && entity.deathTime <= 0 && !base.isArmor &&
|
||||
!(customTintData.isEnableCustomTint() && customTintData.isEnableNpcTint());
|
||||
if(bo){
|
||||
float red = (entity.modelData.legParts.color >> 16 & 255) / 255f;
|
||||
float green = (entity.modelData.legParts.color >> 8 & 255) / 255f;
|
||||
|
||||
@@ -10,6 +10,7 @@ import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.client.model.part.tails.*;
|
||||
import noppes.npcs.client.model.util.ModelScaleRenderer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.controllers.data.CustomTintData;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.data.ModelPartData;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -150,7 +151,9 @@ public class ModelTail extends ModelScaleRenderer {
|
||||
base.currentlyPlayerTexture = true;
|
||||
}
|
||||
}
|
||||
boolean bo = entity.hurtTime <= 0 && entity.deathTime <= 0;
|
||||
CustomTintData customTintData = entity.display.customTintData;
|
||||
boolean bo = entity.hurtTime <= 0 && entity.deathTime <= 0 && !base.isArmor &&
|
||||
!(customTintData.isEnableCustomTint() && customTintData.isEnableNpcTint());
|
||||
if(bo){
|
||||
float red = (color >> 16 & 255) / 255f;
|
||||
float green = (color >> 8 & 255) / 255f;
|
||||
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.client.ClientProxy;
|
||||
import noppes.npcs.client.model.ModelMPM;
|
||||
import noppes.npcs.controllers.data.CustomTintData;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.data.ModelData;
|
||||
import noppes.npcs.entity.data.ModelPartData;
|
||||
@@ -59,7 +60,9 @@ public abstract class ModelPartInterface extends ModelRenderer {
|
||||
base.currentlyPlayerTexture = true;
|
||||
}
|
||||
}
|
||||
boolean bo = entity.hurtTime <= 0 && entity.deathTime <= 0 && !base.isArmor;
|
||||
CustomTintData customTintData = entity.display.customTintData;
|
||||
boolean bo = entity.hurtTime <= 0 && entity.deathTime <= 0 && !base.isArmor &&
|
||||
!(customTintData.isEnableCustomTint() && customTintData.isEnableNpcTint());
|
||||
if(bo){
|
||||
float red = (color >> 16 & 255) / 255f;
|
||||
float green = (color >> 8 & 255) / 255f;
|
||||
|
||||
Reference in new issue
Block a user