New water textures
This commit is contained in:
@@ -231,7 +231,9 @@ public class Floor extends Block{
|
||||
}
|
||||
|
||||
protected boolean doEdge(Floor other, boolean sameLayer){
|
||||
return (other.blendGroup.id > blendGroup.id || edges() == null) && other.edgeOnto(this) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer);
|
||||
boolean dir = !((other instanceof ShallowLiquid && ((ShallowLiquid)other).floorBase == this) || (this instanceof ShallowLiquid && ((ShallowLiquid)this).floorBase == other));
|
||||
return ((other.blendGroup.id > blendGroup.id == dir) || edges() == null) &&
|
||||
other.edgeOnto(this) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer);
|
||||
}
|
||||
|
||||
protected boolean edgeOnto(Floor other){
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package mindustry.world.blocks.environment;
|
||||
|
||||
import mindustry.world.*;
|
||||
|
||||
//do not use in mods!
|
||||
public class ShallowLiquid extends Floor{
|
||||
public final Floor liquidBase, floorBase;
|
||||
|
||||
public ShallowLiquid(String name, Block liquid, Block floor){
|
||||
super(name);
|
||||
|
||||
this.liquidBase = liquid.asFloor();
|
||||
this.floorBase = floor.asFloor();
|
||||
|
||||
isLiquid = true;
|
||||
variants = floor.asFloor().variants;
|
||||
status = liquid.asFloor().status;
|
||||
liquidDrop = liquid.asFloor().liquidDrop;
|
||||
cacheLayer = liquid.asFloor().cacheLayer;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user