some shit

master
PF94 2020-11-22 19:05:03 -05:00
parent 371928d8dc
commit 6a812bf257
4 changed files with 6 additions and 34 deletions

View File

@ -463,7 +463,7 @@ public class Minecraft implements Runnable, LevelLoaderListener
private void setupCamera(final float a) {
GL11.glMatrixMode(5889);
GL11.glLoadIdentity();
GLU.gluPerspective(70.0f, this.width / (float)this.height, 0.05f, 1024.0f);
GLU.gluPerspective(90.0f, this.width / (float)this.height, 0.05f, 1024.0f);
GL11.glMatrixMode(5888);
GL11.glLoadIdentity();
this.moveCameraToPlayer(a);

View File

@ -27,7 +27,7 @@ public class MenuScreen extends Screen
@Override
public void init() {
this.buttons.add(new Button(0, this.width / 2 - 100, this.height / 4 + 0, 200, 20, "New level.."));
this.buttons.add(new Button(1, this.width / 2 - 100, this.height / 4 + 32, 200, 20, "Save level.."));
//this.buttons.add(new Button(1, this.width / 2 - 100, this.height / 4 + 32, 200, 20, "Save level.."));
this.buttons.add(new Button(2, this.width / 2 - 100, this.height / 4 + 64, 200, 20, "Load level.."));
this.buttons.add(new Button(3, this.width / 2 - 100, this.height / 4 + 96, 200, 20, "Continue level.."));
this.buttons.add(new Button(4, this.width / 2 - 100, this.height / 4 + 128, 200, 20, "Exit"));

View File

@ -46,6 +46,10 @@ public class PauseScreen extends Screen
this.minecraft.setScreen(null);
this.minecraft.grabMouse();
}
if (button.id == 2) {
this.minecraft.setScreen(null);
this.minecraft.grabMouse();
}
if (button.id == 3) {
this.minecraft.setScreen(null);
this.minecraft.grabMouse();

View File

@ -25,38 +25,6 @@ public class WhiteCloth extends Tile
}
}
@Override
public void render(final Tesselator t, final Level level, final int layer, final int x, final int y, final int z) {
if (level.isLit(x, y, z) ^ layer != 1) {
return;
}
final int tex = this.getTexture(15);
final float u0 = tex % 16 / 16.0f;
final float u2 = u0 + 0.0624375f;
final float v0 = tex / 16 / 16.0f;
final float v2 = v0 + 0.0624375f;
final int rots = 2;
t.color(255, 255, 255);
for (int r = 0; r < rots; ++r) {
final float xa = (float)(Math.sin(r * 3.141592653589793 / rots + 0.7853981633974483) * 0.5);
final float za = (float)(Math.cos(r * 3.141592653589793 / rots + 0.7853981633974483) * 0.5);
final float x2 = x + 0.5f - xa;
final float x3 = x + 0.5f + xa;
final float y2 = y + 0.0f;
final float y3 = y + 1.0f;
final float z2 = z + 0.5f - za;
final float z3 = z + 0.5f + za;
t.vertexUV(x2, y3, z2, u2, v0);
t.vertexUV(x3, y3, z3, u0, v0);
t.vertexUV(x3, y2, z3, u0, v2);
t.vertexUV(x2, y2, z2, u2, v2);
t.vertexUV(x3, y3, z3, u2, v0);
t.vertexUV(x2, y3, z2, u0, v0);
t.vertexUV(x2, y2, z2, u0, v2);
t.vertexUV(x3, y2, z3, u2, v2);
}
}
@Override
public AABB getAABB(final int x, final int y, final int z) {
return null;