generated from AriasCreations/vsmodtemplate
Remove old deprecated code in RTPFactory
This commit is contained in:
parent
7ca713e42a
commit
4c585f647e
2 changed files with 2 additions and 38 deletions
|
@ -59,42 +59,6 @@ public class RTPFactory
|
|||
check.Y = height + 1;
|
||||
PPos.Y = height + 1;
|
||||
return PPos;
|
||||
|
||||
int Y = 255;
|
||||
bool lastBlockAir = true;
|
||||
bool lastLastBlockAir = true;
|
||||
bool curBlockAir = true;
|
||||
bool safe = false;
|
||||
for (Y = 255; Y > 1; Y--)
|
||||
{
|
||||
// Manually scan downwards
|
||||
check.Y = Y;
|
||||
var current = BA.GetBlock(check);
|
||||
|
||||
if (current.BlockMaterial != EnumBlockMaterial.Air)
|
||||
{
|
||||
curBlockAir = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
lastLastBlockAir = lastBlockAir;
|
||||
lastBlockAir = curBlockAir;
|
||||
|
||||
|
||||
if (!curBlockAir && lastBlockAir && lastLastBlockAir)
|
||||
{
|
||||
// We found a safe spot to land
|
||||
check.Y++;
|
||||
safe = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!safe) return null;
|
||||
|
||||
PPos.Y = check.Y;
|
||||
return PPos;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"modid": "ariasserverutils",
|
||||
"name": "Aria's Server Utilities",
|
||||
"authors": ["zontreck"],
|
||||
"description": "A collection of server utilities\n\nBuild Date: 05-3-2025 @ 12:34 PM MST",
|
||||
"version": "1.0.10-dev.1",
|
||||
"description": "A collection of server utilities\n\nBuild Date: 05-3-2025 @ 12:40 PM MST",
|
||||
"version": "1.0.10-dev.2",
|
||||
"dependencies": {
|
||||
"game": ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue