From LuaCraft
Revision as of 11:14, 9 May 2014 by LuaStoned (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Getting started with LuaCraft

LuaCraft is a Minecraft Forge mod, that works both client and serverside. You will need Forge for Minecraft 1.7.2 to use our mod.

Right now we are processing the functions provided by our mod and they should be up soon. In the meantime you can check this link as a reference to the hooks provided by LuaCraft.

Code Examples

Here is a small example that uses two hooks and the entity meta function Entity.SetVelocity to launch the player into the air when jumping.

function entityFall(ent, distance)
    if (IsPlayer(ent)) then
        return true
hook.Add("entity.fall", "Fall!", entityFall)

function entityJump(ent)
    local jumpVec = Vector(0, 0, 1.5)
    if (IsPlayer(ent)) then
hook.Add("entity.jump", "Jump!", entityJump)