Merge branch '1.12.2' of https://github.com/Electroblob77/Wizardry into 1.12.2
This commit is contained in:
@@ -112,7 +112,7 @@ public class LayerFrost implements LayerRenderer<EntityLivingBase> {
|
|||||||
double scaleX = 1, scaleY = 1;
|
double scaleX = 1, scaleY = 1;
|
||||||
// It's more logical to use the model's texture size, but some classes don't bother setting it properly
|
// It's more logical to use the model's texture size, but some classes don't bother setting it properly
|
||||||
// (e.g. ModelVillager), so to get the correct dimensions I'm getting them from the first box instead.
|
// (e.g. ModelVillager), so to get the correct dimensions I'm getting them from the first box instead.
|
||||||
if(model.boxList != null && model.boxList.get(0) != null){
|
if(model.boxList != null && model.boxList.size() >= 1 && model.boxList.get(0) != null){
|
||||||
scaleX = (double)model.boxList.get(0).textureWidth / 16d;
|
scaleX = (double)model.boxList.get(0).textureWidth / 16d;
|
||||||
scaleY = (double)model.boxList.get(0).textureHeight / 16d;
|
scaleY = (double)model.boxList.get(0).textureHeight / 16d;
|
||||||
}else{ // Fallback to model fields; should never be needed
|
}else{ // Fallback to model fields; should never be needed
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public class RenderArcaneLock {
|
|||||||
|
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
|
boolean lighting = GL11.glIsEnabled(GL11.GL_LIGHTING);
|
||||||
GlStateManager.disableLighting();
|
GlStateManager.disableLighting();
|
||||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
|
||||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
@@ -84,7 +85,9 @@ public class RenderArcaneLock {
|
|||||||
|
|
||||||
GlStateManager.disableBlend();
|
GlStateManager.disableBlend();
|
||||||
GlStateManager.enableTexture2D();
|
GlStateManager.enableTexture2D();
|
||||||
GlStateManager.enableLighting();
|
if (lighting) {
|
||||||
|
GlStateManager.enableLighting();
|
||||||
|
}
|
||||||
GlStateManager.disableRescaleNormal();
|
GlStateManager.disableRescaleNormal();
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user