This commit is contained in:
Anuken
2020-04-10 13:49:36 -04:00
parent 2395bc9308
commit 67a084a5e7
6 changed files with 29 additions and 28 deletions

View File

@@ -231,14 +231,7 @@ public class Floor extends Block{
}
protected boolean doEdge(Floor other, boolean sameLayer){
//TODO this is awful and should not exist.
boolean normal = ((other instanceof ShallowLiquid) == (this instanceof ShallowLiquid)) || (cacheLayer == other.cacheLayer);
return (((other.blendGroup.id > blendGroup.id) || edges() == null) &&
other.edgeOnto(this) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer)) == normal;
}
protected boolean edgeOnto(Floor other){
return true;
return (((other.blendGroup.id > blendGroup.id) || edges() == null) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer));
}
TextureRegion edge(Floor block, int x, int y){

View File

@@ -4,12 +4,14 @@ import mindustry.world.*;
//do not use in mods!
public class ShallowLiquid extends Floor{
public final Floor liquidBase, floorBase;
public Floor liquidBase, floorBase;
public float liquidOpacity = 0.35f;
public ShallowLiquid(String name, Block liquid, Block floor){
public ShallowLiquid(String name){
super(name);
}
public void set(Block liquid, Block floor){
this.liquidBase = liquid.asFloor();
this.floorBase = floor.asFloor();