mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 11:10:50 +03:00
API fix
This commit is contained in:
@@ -1275,13 +1275,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
/** Called only if {@link Block#drawCached} is true (off by default). */
|
||||
public void drawCached(){
|
||||
if(block.variants == 0 || block.variantRegions == null){
|
||||
Draw.rect(block.region, x, y, drawrot());
|
||||
}else{
|
||||
Draw.rect(block.variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, block.variantRegions.length - 1))], x, y, drawrot());
|
||||
}
|
||||
|
||||
drawTeamTop();
|
||||
draw();
|
||||
}
|
||||
|
||||
public void recache(){
|
||||
|
||||
@@ -640,6 +640,7 @@ public class BlockRenderer{
|
||||
SpriteCache.getDefaultShader().bind();
|
||||
SpriteCache.getDefaultShader().setUniformMatrix4("u_projectionViewMatrix", camera.mat);
|
||||
|
||||
if(false)
|
||||
queuedCacheIndices.each(spriteCacheIndex -> {
|
||||
SpriteCache sprites = caches.get(spriteCacheIndex);
|
||||
IntSeq cachesToDraw = queuedCacheDraws.get(spriteCacheIndex);
|
||||
|
||||
@@ -114,7 +114,7 @@ public class DirectionalUnloader extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawCached(){
|
||||
public void draw(){
|
||||
Draw.rect(region, x, y);
|
||||
|
||||
Draw.rect(topRegion, x, y, rotdeg());
|
||||
|
||||
@@ -80,7 +80,7 @@ public class DuctRouter extends Block{
|
||||
public @Nullable Item current;
|
||||
|
||||
@Override
|
||||
public void drawCached(){
|
||||
public void draw(){
|
||||
Draw.rect(region, x, y);
|
||||
if(sortItem != null){
|
||||
Draw.color(sortItem.color);
|
||||
|
||||
@@ -65,7 +65,7 @@ public class OverflowDuct extends Block{
|
||||
public @Nullable Item current;
|
||||
|
||||
@Override
|
||||
public void drawCached(){
|
||||
public void draw(){
|
||||
Draw.rect(region, x, y);
|
||||
Draw.rect(topRegion, x, y, rotdeg());
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Sorter extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawCached(){
|
||||
public void draw(){
|
||||
|
||||
if(sortItem == null){
|
||||
Draw.rect(cross, x, y);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class LiquidJunction extends LiquidBlock{
|
||||
|
||||
public class LiquidJunctionBuild extends Building{
|
||||
@Override
|
||||
public void drawCached(){
|
||||
public void draw(){
|
||||
Draw.rect(region, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ public class Unloader extends Block{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawCached(){
|
||||
public void draw(){
|
||||
super.draw();
|
||||
|
||||
Draw.color(sortItem == null ? Color.clear : sortItem.color);
|
||||
|
||||
Reference in New Issue
Block a user