Backport of fixed lighting + overflow crash fix
This commit is contained in:
@@ -24,6 +24,10 @@ public class LightRenderer{
|
||||
lights.add(run);
|
||||
}
|
||||
|
||||
public void add(Position pos, float radius, Color color, float opacity){
|
||||
add(pos.getX(), pos.getY(), radius, color, opacity);
|
||||
}
|
||||
|
||||
public void add(float x, float y, float radius, Color color, float opacity){
|
||||
if(!enabled()) return;
|
||||
|
||||
@@ -180,13 +184,14 @@ public class LightRenderer{
|
||||
|
||||
Draw.color();
|
||||
buffer.beginDraw(Color.clear);
|
||||
Draw.blend(Blending.normal);
|
||||
Gl.blendEquationSeparate(Gl.funcAdd, Gl.max);
|
||||
|
||||
for(Runnable run : lights){
|
||||
run.run();
|
||||
}
|
||||
Draw.reset();
|
||||
Draw.blend();
|
||||
buffer.endDraw();
|
||||
Gl.blendEquationSeparate(Gl.funcAdd, Gl.funcAdd);
|
||||
|
||||
Draw.color();
|
||||
Shaders.light.ambient.set(state.rules.ambientLight);
|
||||
@@ -196,4 +201,4 @@ public class LightRenderer{
|
||||
|
||||
lights.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,11 @@ public class OverflowGate extends Block{
|
||||
}
|
||||
|
||||
if(entity.lastItem != null){
|
||||
if(entity.lastInput == null){
|
||||
entity.lastItem = null;
|
||||
return;
|
||||
}
|
||||
|
||||
entity.time += 1f / speed * Time.delta();
|
||||
Tile target = getTileTarget(tile, entity.lastItem, entity.lastInput, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user