Made the tile selection box transparent, fixed some syntax errors in the

shaders, and improved break particles.
This commit is contained in:
jsrobson10 2020-10-21 13:32:32 +11:00
parent 01a86a5a1e
commit 2057d78cd0
6 changed files with 20 additions and 16 deletions

View File

@ -101,7 +101,7 @@ public class ParticleBreak extends EntityParticle
particles[i] = particle; particles[i] = particle;
} }
still_ypos = 0.0125; still_ypos = 1/256.0;
time = 1000; time = 1000;
still = 0; still = 0;
} }

View File

@ -463,7 +463,7 @@ public class EntityPlayer extends Entity implements
if(ts.tile.canTileBreak(ts, holding, tool) || ts.tile.canUse(ts)) if(ts.tile.canTileBreak(ts, holding, tool) || ts.tile.canUse(ts))
{ {
Models.TILE_BORDER.setModel(Matrix4.translate( Models.TILE_BORDER.setModel(Matrix4.translate(
new Vec3d(pos.x + 0.5 - ppos.x, 0, pos.y + 0.5 - ppos.z))); new Vec3d(pos.x - ppos.x, 0, pos.y - ppos.z)));
Models.TILE_BORDER.render(); Models.TILE_BORDER.render();
break; break;

View File

@ -38,21 +38,21 @@ public class ModelTileBorder extends Model
float h = 0.0078125f; float h = 0.0078125f;
float f = 0b10; float f = 0b10;
float c = 0b101111101111101111; float c = 0b101111101111101111;
float o = 0.5f; float o = 0.75f;
return new float[] return new float[]
{ {
0-o, h, 0-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 0, h, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
1-o, h, 0-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 1, h, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
0-o, h, 1-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 0, h, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
1-o, h, 1-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 1, h, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
0-o, h, 0-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 0, h, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
0-o, h, 1-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 0, h, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
1-o, h, 0-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 1, h, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
1-o, h, 1-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f, 1, h, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, o, c, f,
}; };
} }

View File

@ -255,7 +255,7 @@ public class Chunk implements ClassBdf
upto = renderEntities(((EntityHoldsEntities) e).getEntities(), particle_pool, upto); upto = renderEntities(((EntityHoldsEntities) e).getEntities(), particle_pool, upto);
} }
if(e instanceof EntityParticle && Main.world.isPoolDirty()) if(e instanceof EntityParticle && particle_pool != null && Main.world.isPoolDirty())
{ {
EntityParticle ep = (EntityParticle)e; EntityParticle ep = (EntityParticle)e;

View File

@ -6,6 +6,6 @@ out vec2 pPos;
void main() void main()
{ {
gl_Position = new vec4(aPos, 0, 1); gl_Position = vec4(aPos, 0, 1);
pPos = aPos; pPos = aPos;
} }

View File

@ -98,7 +98,11 @@ void main()
* saturation + contrast; * saturation + contrast;
} }
discard(textureRGB.a == 0 || (do_discard_coords == 1 && ( if(
textureRGB.a == 0 || (do_discard_coords == 1 && (
pVertex.x < discard_coords.x || pVertex.y < discard_coords.y || pVertex.x < discard_coords.x || pVertex.y < discard_coords.y ||
pVertex.x > discard_coords.z || pVertex.y > discard_coords.w))); pVertex.x > discard_coords.z || pVertex.y > discard_coords.w)))
{
discard;
}
} }