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

16
.vscode/launch.json vendored
View file

@ -8,12 +8,12 @@
"name": "Launch Client (Debug)", "name": "Launch Client (Debug)",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"program": "${env:VINTAGE_STORY}/Vintagestory.exe", "program": ".game/Vintagestory.exe",
"linux": { "linux": {
"program": "${env:VINTAGE_STORY}/Vintagestory" "program": ".game/Vintagestory"
}, },
"osx": { "osx": {
"program": "${env:VINTAGE_STORY}/Vintagestory" "program": ".game/Vintagestory"
}, },
"preLaunchTask": "build", "preLaunchTask": "build",
"args": [ "args": [
@ -21,7 +21,7 @@
// "--openWorld" , "modding test world", // "--openWorld" , "modding test world",
"--tracelog", "--tracelog",
"--addModPath", "--addModPath",
"${workspaceFolder}/ModTemplate/bin/Debug/Mods" "${workspaceFolder}/AriasServerUtils/bin/Debug/Mods"
], ],
"console": "internalConsole", "console": "internalConsole",
"stopAtEntry": false "stopAtEntry": false
@ -30,18 +30,18 @@
"name": "Launch Server", "name": "Launch Server",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"program": "${env:VINTAGE_STORY}/VintagestoryServer.exe", "program": ".game/VintagestoryServer.exe",
"linux": { "linux": {
"program": "${env:VINTAGE_STORY}/VintagestoryServer" "program": ".game/VintagestoryServer"
}, },
"osx": { "osx": {
"program": "${env:VINTAGE_STORY}/VintagestoryServer" "program": ".game/VintagestoryServer"
}, },
"preLaunchTask": "build", "preLaunchTask": "build",
"args": [ "args": [
"--tracelog", "--tracelog",
"--addModPath", "--addModPath",
"${workspaceFolder}/ModTemplate/bin/Debug/Mods" "${workspaceFolder}/AriasServerUtils/bin/Debug/Mods"
], ],
"console": "internalConsole", "console": "internalConsole",
"stopAtEntry": false "stopAtEntry": false

View file

@ -1,5 +1,5 @@
{ {
"dotnet.defaultSolution": "ModTemplate.sln", "dotnet.defaultSolution": "AriasServerUtils.sln",
"files.associations": { "files.associations": {
"server-*.txt": "log", "server-*.txt": "log",
"client-*.txt": "log" "client-*.txt": "log"

2
.vscode/tasks.json vendored
View file

@ -9,7 +9,7 @@
"build", "build",
"-c", "-c",
"Debug", "Debug",
"${workspaceFolder}/ModTemplate/ModTemplate.csproj" "${workspaceFolder}/AriasServerUtils/AriasServerUtils.csproj"
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
}, },

View file

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

View file

@ -3,8 +3,8 @@
"modid": "ariasserverutils", "modid": "ariasserverutils",
"name": "Aria's Server Utilities", "name": "Aria's Server Utilities",
"authors": ["zontreck"], "authors": ["zontreck"],
"description": "A collection of server utilities\n\nBuild Date: 03-06-2025 @ 4:58 PM MST", "description": "A collection of server utilities\n\nBuild Date: 03-06-2025 @ 5:13 PM MST",
"version": "1.0.4-dev.6", "version": "1.0.4-dev.7",
"dependencies": { "dependencies": {
"game": "" "game": ""
} }