Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -15,28 +15,29 @@ import net.minecraft.util.ResourceLocation;
public class RenderIceSpike extends Render<EntityIceSpike> {
private static final ResourceLocation texture = new ResourceLocation(Wizardry.MODID, "textures/entity/ice_spike.png");
private static final ResourceLocation texture = new ResourceLocation(Wizardry.MODID,
"textures/entity/ice_spike.png");
public RenderIceSpike(RenderManager renderManager){
super(renderManager);
}
@Override
public void doRender(EntityIceSpike entity, double x, double y, double z, float fa, float partialTickTime) {
public void doRender(EntityIceSpike entity, double x, double y, double z, float fa, float partialTickTime){
GlStateManager.pushMatrix();
GlStateManager.translate((float)x, (float)y, (float)z);
// Apparently, disabling lighting... doesn't disable lighting. Or at least, you can still set the brightness
// with setLightmapTextureCoords.
GlStateManager.disableLighting();
GlStateManager.disableLighting();
int j = entity.getBrightnessForRender(partialTickTime);
int k = j % 65536;
int l = j / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)k / 1.0F, (float)l / 1.0F);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
int k = j % 65536;
int l = j / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)k / 1.0F, (float)l / 1.0F);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer buffer = tessellator.getBuffer();
@@ -45,15 +46,15 @@ public class RenderIceSpike extends Render<EntityIceSpike> {
// West face
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
buffer.pos(0, 0, 0.5).tex(1, 1).endVertex();
buffer.pos(0, 1, 0.5).tex(1, 0).endVertex();
buffer.pos(0, 0, 0.5).tex(1, 1).endVertex();
buffer.pos(0, 1, 0.5).tex(1, 0).endVertex();
buffer.pos(0, 1, -0.5).tex(0, 0).endVertex();
buffer.pos(0, 0, -0.5).tex(0, 1).endVertex();
tessellator.draw();
// South face
buffer.begin(GL11.GL_QUADS, net.minecraft.client.renderer.vertex.DefaultVertexFormats.POSITION_TEX);
buffer.pos( 0.5, 0, 0).tex(1, 1).endVertex();
buffer.pos( 0.5, 1, 0).tex(1, 0).endVertex();
buffer.pos(0.5, 0, 0).tex(1, 1).endVertex();
buffer.pos(0.5, 1, 0).tex(1, 0).endVertex();
buffer.pos(-0.5, 1, 0).tex(0, 0).endVertex();
buffer.pos(-0.5, 0, 0).tex(0, 1).endVertex();
tessellator.draw();
@@ -61,23 +62,23 @@ public class RenderIceSpike extends Render<EntityIceSpike> {
buffer.begin(GL11.GL_QUADS, net.minecraft.client.renderer.vertex.DefaultVertexFormats.POSITION_TEX);
buffer.pos(0, 0, -0.5).tex(0, 1).endVertex();
buffer.pos(0, 1, -0.5).tex(0, 0).endVertex();
buffer.pos(0, 1, 0.5).tex(1, 0).endVertex();
buffer.pos(0, 0, 0.5).tex(1, 1).endVertex();
buffer.pos(0, 1, 0.5).tex(1, 0).endVertex();
buffer.pos(0, 0, 0.5).tex(1, 1).endVertex();
tessellator.draw();
// North face
buffer.begin(GL11.GL_QUADS, net.minecraft.client.renderer.vertex.DefaultVertexFormats.POSITION_TEX);
buffer.pos(-0.5, 0, 0).tex(0, 1).endVertex();
buffer.pos(-0.5, 1, 0).tex(0, 0).endVertex();
buffer.pos( 0.5, 1, 0).tex(1, 0).endVertex();
buffer.pos( 0.5, 0, 0).tex(1, 1).endVertex();
buffer.pos(0.5, 1, 0).tex(1, 0).endVertex();
buffer.pos(0.5, 0, 0).tex(1, 1).endVertex();
tessellator.draw();
GlStateManager.enableLighting();
GlStateManager.enableLighting();
GlStateManager.popMatrix();
}
@Override
protected ResourceLocation getEntityTexture(EntityIceSpike entity) {
protected ResourceLocation getEntityTexture(EntityIceSpike entity){
return texture;
}