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(); blocks.floor.endDraw();
}); });
Draw.drawRange(Layer.blockBuilding, () -> Draw.shader(Shaders.blockbuild, false), () -> Draw.shader());
if(state.rules.lighting){ if(state.rules.lighting){
Draw.draw(Layer.light, lights::draw); Draw.draw(Layer.light, lights::draw);
} }

View File

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