i fix bug heheheheheheheeeeh (#9808)

This commit is contained in:
Elixias
2024-05-04 07:18:59 -06:00
committed by GitHub
parent c2500b2a1a
commit b12fac3aef

View File

@@ -10,6 +10,7 @@ import mindustry.world.*;
public class TallBlock extends Block{ public class TallBlock extends Block{
public float shadowOffset = -3f; public float shadowOffset = -3f;
public float layer = Layer.power + 1; public float layer = Layer.power + 1;
public float shadowLayer = Layer.power - 1;
public float rotationRand = 20f; public float rotationRand = 20f;
public float shadowAlpha = 0.6f; public float shadowAlpha = 0.6f;
@@ -30,14 +31,14 @@ public class TallBlock extends Block{
public void drawBase(Tile tile){ public void drawBase(Tile tile){
float rot = Mathf.randomSeedRange(tile.pos() + 1, rotationRand); float rot = Mathf.randomSeedRange(tile.pos() + 1, rotationRand);
Draw.z(Layer.power - 1); Draw.z(shadowLayer);
Draw.color(0f, 0f, 0f, shadowAlpha); Draw.color(0f, 0f, 0f, shadowAlpha);
Draw.rect(variants > 0 ? variantShadowRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantShadowRegions.length - 1))] : customShadowRegion, Draw.rect(variants > 0 ? variantShadowRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantShadowRegions.length - 1))] : customShadowRegion,
tile.worldx() + shadowOffset, tile.worldy() + shadowOffset, rot); tile.worldx() + shadowOffset, tile.worldy() + shadowOffset, rot);
Draw.color(); Draw.color();
Draw.z(Layer.power + 1); Draw.z(layer);
Draw.rect(variants > 0 ? variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))] : region, Draw.rect(variants > 0 ? variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))] : region,
tile.worldx(), tile.worldy(), rot); tile.worldx(), tile.worldy(), rot);
} }