Fixed phase weaver blink / Fixed item image offset (again)

This commit is contained in:
Anuken
2018-10-20 13:53:25 -04:00
parent e55f6ecd6b
commit 85cde62039
2 changed files with 18 additions and 21 deletions

View File

@@ -14,7 +14,7 @@ public class ItemImage extends Stack{
public ItemImage(TextureRegion region, Supplier<CharSequence> text){
Table t = new Table().left().bottom();
t.label(text).color(Color.DARK_GRAY).padBottom(-26).get().setFontScale(Unit.dp.scl(0.5f));
t.label(text).color(Color.DARK_GRAY).padBottom(-20).get().setFontScale(Unit.dp.scl(0.5f));
t.row();
t.label(text).get().setFontScale(Unit.dp.scl(0.5f));
@@ -25,7 +25,7 @@ public class ItemImage extends Stack{
public ItemImage(ItemStack stack){
Table t = new Table().left().bottom();
t.add(stack.amount + "").color(Color.DARK_GRAY).padBottom(-26).get().setFontScale(Unit.dp.scl(0.5f));
t.add(stack.amount + "").color(Color.DARK_GRAY).padBottom(-20).get().setFontScale(Unit.dp.scl(0.5f));
t.row();
t.add(stack.amount + "").get().setFontScale(Unit.dp.scl(0.5f));

View File

@@ -40,30 +40,27 @@ public class PhaseWeaver extends PowerSmelter{
Draw.rect(bottomRegion, tile.drawx(), tile.drawy());
if(entity.heat > 0.001f){
float progress = 0.5f;
float progress = 0.5f;
Shaders.build.region = weaveRegion;
Shaders.build.progress = progress;
Shaders.build.color.set(Palette.accent);
Shaders.build.color.a = entity.heat;
Shaders.build.time = -entity.time / 10f;
Shaders.build.region = weaveRegion;
Shaders.build.progress = progress;
Shaders.build.color.set(Palette.accent);
Shaders.build.time = -entity.time / 10f;
Graphics.shader(Shaders.build, false);
Shaders.build.apply();
Draw.rect(weaveRegion, tile.drawx(), tile.drawy(), entity.time);
Graphics.shader();
Graphics.shader(Shaders.build, false);
Shaders.build.apply();
Draw.rect(weaveRegion, tile.drawx(), tile.drawy(), entity.time);
Graphics.shader();
Draw.color(Palette.accent);
Draw.color(Palette.accent);
Lines.lineAngleCenter(
tile.drawx() + Mathf.sin(entity.time, 6f, Vars.tilesize / 3f * size),
tile.drawy(),
90,
size * Vars.tilesize / 2f);
Lines.lineAngleCenter(
tile.drawx() + Mathf.sin(entity.time, 6f, Vars.tilesize / 3f * size),
tile.drawy(),
90,
size * Vars.tilesize / 2f);
Draw.reset();
}
Draw.reset();
Draw.rect(region, tile.drawx(), tile.drawy());
}