oops
This commit is contained in:
parent
49759827f0
commit
5c0b2784b1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
69715
javascript/classes.js
69715
javascript/classes.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -173,6 +173,7 @@ public class RenderItem implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
final IBakedModel model = model1;
|
final IBakedModel model = model1;
|
||||||
|
RenderItem itemRenderer = this;
|
||||||
|
|
||||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||||
if (DeferredStateManager.isInDeferredPass() && isTransparentItem(stack)) {
|
if (DeferredStateManager.isInDeferredPass() && isTransparentItem(stack)) {
|
||||||
|
@ -199,7 +200,9 @@ public class RenderItem implements IResourceManagerReloadListener {
|
||||||
DeferredStateManager.setRoughnessConstant(0.05f);
|
DeferredStateManager.setRoughnessConstant(0.05f);
|
||||||
DeferredStateManager.setMetalnessConstant(0.01f);
|
DeferredStateManager.setMetalnessConstant(0.01f);
|
||||||
GlStateManager.blendFunc(GL_SRC_COLOR, GL_ONE);
|
GlStateManager.blendFunc(GL_SRC_COLOR, GL_ONE);
|
||||||
renderEffect(model);
|
if (!Config.isCustomItems() || !CustomItems.renderCustomEffect(itemRenderer, stack, model)) {
|
||||||
|
renderEffect(model);
|
||||||
|
}
|
||||||
DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||||
}
|
}
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
@ -216,7 +219,6 @@ public class RenderItem implements IResourceManagerReloadListener {
|
||||||
&& !DeferredStateManager.isEnableShadowRender()) {
|
&& !DeferredStateManager.isEnableShadowRender()) {
|
||||||
final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||||
final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||||
RenderItem itemRenderer = this;
|
|
||||||
DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(renderPosX,
|
DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(renderPosX,
|
||||||
renderPosY, renderPosZ, EaglerDeferredPipeline.instance.getPartialTicks()) {
|
renderPosY, renderPosZ, EaglerDeferredPipeline.instance.getPartialTicks()) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -233,7 +235,7 @@ public class RenderItem implements IResourceManagerReloadListener {
|
||||||
GlStateManager.loadMatrix(mat);
|
GlStateManager.loadMatrix(mat);
|
||||||
GlStateManager.texCoords2DDirect(1, lx, ly);
|
GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||||
GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ONE);
|
GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ONE);
|
||||||
if (stack.hasEffect() && (!Config.isCustomItems() || !CustomItems.renderCustomEffect(itemRenderer, stack, model))) {
|
if (!Config.isCustomItems() || !CustomItems.renderCustomEffect(itemRenderer, stack, model)) {
|
||||||
renderEffect(model);
|
renderEffect(model);
|
||||||
}
|
}
|
||||||
DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||||
|
@ -245,7 +247,7 @@ public class RenderItem implements IResourceManagerReloadListener {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GlStateManager.blendFunc(GL_SRC_COLOR, GL_ONE);
|
GlStateManager.blendFunc(GL_SRC_COLOR, GL_ONE);
|
||||||
if (stack.hasEffect() && (!Config.isCustomItems() || !CustomItems.renderCustomEffect(this, stack, model))) {
|
if (!Config.isCustomItems() || !CustomItems.renderCustomEffect(this, stack, model)) {
|
||||||
renderEffect(model);
|
renderEffect(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import java.util.Map;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
import net.PeytonPlayz585.shadow.Config;
|
||||||
|
import net.PeytonPlayz585.shadow.CustomItems;
|
||||||
import net.lax1dude.eaglercraft.v1_8.HString;
|
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||||
|
@ -64,7 +66,9 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
||||||
modelbase.setLivingAnimations(entitylivingbaseIn, armorSlot, parFloat2, parFloat3);
|
modelbase.setLivingAnimations(entitylivingbaseIn, armorSlot, parFloat2, parFloat3);
|
||||||
this.func_177179_a((T) modelbase, parInt1);
|
this.func_177179_a((T) modelbase, parInt1);
|
||||||
boolean flag = this.isSlotForLeggings(parInt1);
|
boolean flag = this.isSlotForLeggings(parInt1);
|
||||||
this.renderer.bindTexture(this.getArmorResource(itemarmor, flag));
|
if (!Config.isCustomItems() || !CustomItems.bindCustomArmorTexture(itemstack, flag ? 2 : 1, (String)null)) {
|
||||||
|
this.renderer.bindTexture(this.getArmorResource(itemarmor, flag));
|
||||||
|
}
|
||||||
DeferredStateManager.setDefaultMaterialConstants();
|
DeferredStateManager.setDefaultMaterialConstants();
|
||||||
switch (itemarmor.getArmorMaterial()) {
|
switch (itemarmor.getArmorMaterial()) {
|
||||||
case CHAIN:
|
case CHAIN:
|
||||||
|
@ -91,7 +95,9 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
||||||
float f2 = (float) (i & 255) / 255.0F;
|
float f2 = (float) (i & 255) / 255.0F;
|
||||||
GlStateManager.color(this.colorR * f, this.colorG * f1, this.colorB * f2, this.alpha);
|
GlStateManager.color(this.colorR * f, this.colorG * f1, this.colorB * f2, this.alpha);
|
||||||
modelbase.render(entitylivingbaseIn, armorSlot, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
modelbase.render(entitylivingbaseIn, armorSlot, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
||||||
this.renderer.bindTexture(this.getArmorResource(itemarmor, flag, "overlay"));
|
if (!Config.isCustomItems() || !CustomItems.bindCustomArmorTexture(itemstack, flag ? 2 : 1, "overlay")) {
|
||||||
|
this.renderer.bindTexture(this.getArmorResource(itemarmor, flag, "overlay"));
|
||||||
|
}
|
||||||
case CHAIN:
|
case CHAIN:
|
||||||
case IRON:
|
case IRON:
|
||||||
case GOLD:
|
case GOLD:
|
||||||
|
@ -100,7 +106,7 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
||||||
modelbase.render(entitylivingbaseIn, armorSlot, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
modelbase.render(entitylivingbaseIn, armorSlot, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
||||||
DeferredStateManager.setDefaultMaterialConstants();
|
DeferredStateManager.setDefaultMaterialConstants();
|
||||||
default:
|
default:
|
||||||
if (!this.field_177193_i && itemstack.isItemEnchanted()) {
|
if (!this.field_177193_i && itemstack.isItemEnchanted() && (!Config.isCustomItems() || !CustomItems.renderCustomArmorEffect(entitylivingbaseIn, itemstack, modelbase, armorSlot, parFloat2, parFloat3, parFloat4, parFloat5, parFloat6, parFloat7))) {
|
||||||
if (DeferredStateManager.isInDeferredPass()) {
|
if (DeferredStateManager.isInDeferredPass()) {
|
||||||
if (!DeferredStateManager.isEnableShadowRender()
|
if (!DeferredStateManager.isEnableShadowRender()
|
||||||
&& DeferredStateManager.forwardCallbackHandler != null) {
|
&& DeferredStateManager.forwardCallbackHandler != null) {
|
||||||
|
@ -159,43 +165,44 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
||||||
return armorSlot == 2;
|
return armorSlot == 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void func_177183_a(EntityLivingBase entitylivingbaseIn, T modelbaseIn, float parFloat1, float parFloat2,
|
private void func_177183_a(EntityLivingBase entitylivingbaseIn, T modelbaseIn, float parFloat1, float parFloat2, float parFloat3, float parFloat4, float parFloat5, float parFloat6, float parFloat7) {
|
||||||
float parFloat3, float parFloat4, float parFloat5, float parFloat6, float parFloat7) {
|
if (!Config.isCustomItems() || CustomItems.isUseGlint()) {
|
||||||
float f = (float) entitylivingbaseIn.ticksExisted + parFloat3;
|
float f = (float) entitylivingbaseIn.ticksExisted + parFloat3;
|
||||||
this.renderer.bindTexture(ENCHANTED_ITEM_GLINT_RES);
|
this.renderer.bindTexture(ENCHANTED_ITEM_GLINT_RES);
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
GlStateManager.depthFunc(GL_EQUAL);
|
GlStateManager.depthFunc(GL_EQUAL);
|
||||||
GlStateManager.depthMask(false);
|
GlStateManager.depthMask(false);
|
||||||
float f1 = 0.5F;
|
float f1 = 0.5F;
|
||||||
boolean d = !DeferredStateManager.isInDeferredPass();
|
boolean d = !DeferredStateManager.isInDeferredPass();
|
||||||
if (d) {
|
|
||||||
GlStateManager.color(f1, f1, f1, 1.0F);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < 2; ++i) {
|
|
||||||
GlStateManager.disableLighting();
|
|
||||||
float f2 = 0.76F;
|
|
||||||
if (d) {
|
if (d) {
|
||||||
GlStateManager.blendFunc(GL_SRC_COLOR, GL_ONE);
|
GlStateManager.color(f1, f1, f1, 1.0F);
|
||||||
GlStateManager.color(0.5F * f2, 0.25F * f2, 0.8F * f2, 1.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; ++i) {
|
||||||
|
GlStateManager.disableLighting();
|
||||||
|
float f2 = 0.76F;
|
||||||
|
if (d) {
|
||||||
|
GlStateManager.blendFunc(GL_SRC_COLOR, GL_ONE);
|
||||||
|
GlStateManager.color(0.5F * f2, 0.25F * f2, 0.8F * f2, 1.0F);
|
||||||
|
}
|
||||||
|
GlStateManager.matrixMode(GL_TEXTURE);
|
||||||
|
GlStateManager.loadIdentity();
|
||||||
|
float f3 = 0.33333334F;
|
||||||
|
GlStateManager.scale(f3, f3, f3);
|
||||||
|
GlStateManager.rotate(30.0F - (float) i * 60.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
GlStateManager.translate(0.0F, f * (0.001F + (float) i * 0.003F) * 20.0F, 0.0F);
|
||||||
|
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||||
|
modelbaseIn.render(entitylivingbaseIn, parFloat1, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
||||||
|
}
|
||||||
|
|
||||||
GlStateManager.matrixMode(GL_TEXTURE);
|
GlStateManager.matrixMode(GL_TEXTURE);
|
||||||
GlStateManager.loadIdentity();
|
GlStateManager.loadIdentity();
|
||||||
float f3 = 0.33333334F;
|
|
||||||
GlStateManager.scale(f3, f3, f3);
|
|
||||||
GlStateManager.rotate(30.0F - (float) i * 60.0F, 0.0F, 0.0F, 1.0F);
|
|
||||||
GlStateManager.translate(0.0F, f * (0.001F + (float) i * 0.003F) * 20.0F, 0.0F);
|
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||||
modelbaseIn.render(entitylivingbaseIn, parFloat1, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
GlStateManager.enableLighting();
|
||||||
|
GlStateManager.depthMask(true);
|
||||||
|
GlStateManager.depthFunc(GL_LEQUAL);
|
||||||
|
GlStateManager.disableBlend();
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.matrixMode(GL_TEXTURE);
|
|
||||||
GlStateManager.loadIdentity();
|
|
||||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
|
||||||
GlStateManager.enableLighting();
|
|
||||||
GlStateManager.depthMask(true);
|
|
||||||
GlStateManager.depthFunc(GL_LEQUAL);
|
|
||||||
GlStateManager.disableBlend();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ResourceLocation getArmorResource(ItemArmor parItemArmor, boolean parFlag) {
|
private ResourceLocation getArmorResource(ItemArmor parItemArmor, boolean parFlag) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user