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;
|
||||
RenderItem itemRenderer = this;
|
||||
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
if (DeferredStateManager.isInDeferredPass() && isTransparentItem(stack)) {
|
||||
|
@ -199,7 +200,9 @@ public class RenderItem implements IResourceManagerReloadListener {
|
|||
DeferredStateManager.setRoughnessConstant(0.05f);
|
||||
DeferredStateManager.setMetalnessConstant(0.01f);
|
||||
GlStateManager.blendFunc(GL_SRC_COLOR, GL_ONE);
|
||||
if (!Config.isCustomItems() || !CustomItems.renderCustomEffect(itemRenderer, stack, model)) {
|
||||
renderEffect(model);
|
||||
}
|
||||
DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
}
|
||||
GlStateManager.popMatrix();
|
||||
|
@ -216,7 +219,6 @@ public class RenderItem implements IResourceManagerReloadListener {
|
|||
&& !DeferredStateManager.isEnableShadowRender()) {
|
||||
final Matrix4f mat = new Matrix4f(GlStateManager.getModelViewReference());
|
||||
final float lx = GlStateManager.getTexCoordX(1), ly = GlStateManager.getTexCoordY(1);
|
||||
RenderItem itemRenderer = this;
|
||||
DeferredStateManager.forwardCallbackHandler.push(new ShadersRenderPassFuture(renderPosX,
|
||||
renderPosY, renderPosZ, EaglerDeferredPipeline.instance.getPartialTicks()) {
|
||||
@Override
|
||||
|
@ -233,7 +235,7 @@ public class RenderItem implements IResourceManagerReloadListener {
|
|||
GlStateManager.loadMatrix(mat);
|
||||
GlStateManager.texCoords2DDirect(1, lx, ly);
|
||||
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);
|
||||
}
|
||||
DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
|
@ -245,7 +247,7 @@ public class RenderItem implements IResourceManagerReloadListener {
|
|||
}
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import java.util.Map;
|
|||
|
||||
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.opengl.GlStateManager;
|
||||
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);
|
||||
this.func_177179_a((T) modelbase, parInt1);
|
||||
boolean flag = this.isSlotForLeggings(parInt1);
|
||||
if (!Config.isCustomItems() || !CustomItems.bindCustomArmorTexture(itemstack, flag ? 2 : 1, (String)null)) {
|
||||
this.renderer.bindTexture(this.getArmorResource(itemarmor, flag));
|
||||
}
|
||||
DeferredStateManager.setDefaultMaterialConstants();
|
||||
switch (itemarmor.getArmorMaterial()) {
|
||||
case CHAIN:
|
||||
|
@ -91,7 +95,9 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
|||
float f2 = (float) (i & 255) / 255.0F;
|
||||
GlStateManager.color(this.colorR * f, this.colorG * f1, this.colorB * f2, this.alpha);
|
||||
modelbase.render(entitylivingbaseIn, armorSlot, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
||||
if (!Config.isCustomItems() || !CustomItems.bindCustomArmorTexture(itemstack, flag ? 2 : 1, "overlay")) {
|
||||
this.renderer.bindTexture(this.getArmorResource(itemarmor, flag, "overlay"));
|
||||
}
|
||||
case CHAIN:
|
||||
case IRON:
|
||||
case GOLD:
|
||||
|
@ -100,7 +106,7 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
|||
modelbase.render(entitylivingbaseIn, armorSlot, parFloat2, parFloat4, parFloat5, parFloat6, parFloat7);
|
||||
DeferredStateManager.setDefaultMaterialConstants();
|
||||
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.isEnableShadowRender()
|
||||
&& DeferredStateManager.forwardCallbackHandler != null) {
|
||||
|
@ -159,8 +165,8 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
|||
return armorSlot == 2;
|
||||
}
|
||||
|
||||
private void func_177183_a(EntityLivingBase entitylivingbaseIn, T modelbaseIn, float parFloat1, float parFloat2,
|
||||
float parFloat3, float parFloat4, float parFloat5, float parFloat6, float parFloat7) {
|
||||
private void func_177183_a(EntityLivingBase entitylivingbaseIn, T modelbaseIn, float parFloat1, float parFloat2, float parFloat3, float parFloat4, float parFloat5, float parFloat6, float parFloat7) {
|
||||
if (!Config.isCustomItems() || CustomItems.isUseGlint()) {
|
||||
float f = (float) entitylivingbaseIn.ticksExisted + parFloat3;
|
||||
this.renderer.bindTexture(ENCHANTED_ITEM_GLINT_RES);
|
||||
GlStateManager.enableBlend();
|
||||
|
@ -197,6 +203,7 @@ public abstract class LayerArmorBase<T extends ModelBase> implements LayerRender
|
|||
GlStateManager.depthFunc(GL_LEQUAL);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
}
|
||||
|
||||
private ResourceLocation getArmorResource(ItemArmor parItemArmor, boolean parFlag) {
|
||||
return this.getArmorResource(parItemArmor, parFlag, (String) null);
|
||||
|
|
Loading…
Reference in New Issue
Block a user