This commit is contained in:
Anuken 2020-04-23 12:52:16 -04:00
parent 1bf5b19889
commit c738dcb42e
2 changed files with 9 additions and 8 deletions

View file

@ -204,6 +204,8 @@ public class Renderer implements ApplicationListener{
blocks.floor.endDraw();
});
Draw.drawRange(Layer.blockBuilding, () -> Draw.shader(Shaders.blockbuild, false), () -> Draw.shader());
if(state.rules.lighting){
Draw.draw(Layer.light, lights::draw);
}

View file

@ -181,19 +181,18 @@ public class BuildBlock extends Block{
}
Draw.draw(Layer.blockBuilding, () -> {
Draw.shader(Shaders.blockbuild);
Shaders.blockbuild.color = Pal.accent;
Block target = cblock == null ? previous : cblock;
if(target == null) return;
if(target != null){
for(TextureRegion region : target.getGeneratedIcons()){
Shaders.blockbuild.region = region;
Shaders.blockbuild.progress = progress;
for(TextureRegion region : target.getGeneratedIcons()){
Shaders.blockbuild.region = region;
Shaders.blockbuild.progress = progress;
Draw.rect(region, x, y, target.rotate ? tile.rotation() * 90 : 0);
Draw.flush();
Draw.rect(region, x, y, target.rotate ? tile.rotation() * 90 : 0);
Draw.flush();
}
}
});
}