1
0
Fork 0

Unhardcoded nil

hollow_logs_ref_recovery
Dehydrate6684 2023-10-18 08:04:54 +08:00
parent 23468cc2dd
commit b320d008ca
No known key found for this signature in database
GPG Key ID: 5926A2FA9B7653EF
1 changed files with 1 additions and 2 deletions

View File

@ -19,14 +19,13 @@ end
---@return boolean If the ladder and trapdoor are in the same direction.
function mcl_core.check_direction(ladder, trapdoor)
local convert_table = {
nil,
{ 1, 23 },
{ 3, 21 },
{ 0, 20 },
{ 2, 22 },
}
local conversion = convert_table[ladder];
local conversion = convert_table[ladder - 1];
if not conversion then
return false
elseif conversion[1] == trapdoor or conversion[2] == trapdoor then