Adjusts the detection of air and solids

#2
This commit is contained in:
zontreck 2025-03-06 17:13:49 -07:00
parent 7120b4083a
commit e53f26717f
5 changed files with 15 additions and 15 deletions

View file

@ -42,10 +42,10 @@ public class RTPFactory
bPos.Y = i;
curBlock = iswa.BlockAccessor.GetBlock(bPos);
if (curBlock != null && !curBlock.IsLiquid() && curBlock.MatterState == EnumMatterState.Solid)
if (curBlock.MatterState == EnumMatterState.Solid)
{
if (lastBlock != null && lastBlock.MatterState == EnumMatterState.Gas &&
lastAboveLast != null && lastAboveLast.MatterState == EnumMatterState.Gas)
if (lastBlock != null && lastBlock.BlockMaterial == EnumBlockMaterial.Air &&
lastAboveLast != null && lastAboveLast.BlockMaterial == EnumBlockMaterial.Air)
{
// Found a valid spot: curBlock is solid, lastBlock & lastAboveLast are gas (air)
PPos.X = bPos.X;