summaryrefslogtreecommitdiffstats
path: root/cwd/assets/altcraft
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-05-19 10:20:44 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-05-19 10:20:44 +0200
commit1d965bebefe11f1fd5e34c686058fa932bb6b82e (patch)
tree6205b3f36fdba69fa2af054d33b94a9949eca14e /cwd/assets/altcraft
parentImplemented more scripting APIs (diff)
downloadAltCraft-1d965bebefe11f1fd5e34c686058fa932bb6b82e.tar
AltCraft-1d965bebefe11f1fd5e34c686058fa932bb6b82e.tar.gz
AltCraft-1d965bebefe11f1fd5e34c686058fa932bb6b82e.tar.bz2
AltCraft-1d965bebefe11f1fd5e34c686058fa932bb6b82e.tar.lz
AltCraft-1d965bebefe11f1fd5e34c686058fa932bb6b82e.tar.xz
AltCraft-1d965bebefe11f1fd5e34c686058fa932bb6b82e.tar.zst
AltCraft-1d965bebefe11f1fd5e34c686058fa932bb6b82e.zip
Diffstat (limited to '')
-rw-r--r--cwd/assets/altcraft/scripts/init.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/cwd/assets/altcraft/scripts/init.lua b/cwd/assets/altcraft/scripts/init.lua
index 2137464..de58b90 100644
--- a/cwd/assets/altcraft/scripts/init.lua
+++ b/cwd/assets/altcraft/scripts/init.lua
@@ -20,9 +20,15 @@ function plugin.onUnload ()
end
function plugin.onTick (deltaTime)
- if AC.GetGameState() and AC.GetGameState():GetPlayer() then
- local player = AC.GetGameState():GetPlayer()
- player.pos.x = player.pos.x + deltaTime * 0.5
+ if AC.GetGameState() and AC.GetGameState():GetPlayer() and AC.GetGameState():GetTimeStatus().worldAge > 0 then
+ -- local player = AC.GetGameState():GetPlayer()
+ -- player.pos.x = player.pos.x + deltaTime * 0.5
+
+ -- local playerPos = AC.GetGameState():GetPlayer().pos
+ -- local wrld = AC.GetGameState():GetWorld()
+ -- playerPosV = Vector.new(playerPos.x, playerPos.y - 1, playerPos.z)
+ -- bid = wrld:GetBlockId(playerPosV)
+ -- print(bid.id..":"..bid.state)
end
end