Check out these code samples, they should give you a pretty good idea of what is possible.
function entityFall(ent, distance) if (IsPlayer(ent)) then return true end end hook.Add("entity.fall", "Fall!", entityFall) function entityJump(ent) local jumpVec = Vector(0, 0, 1.5) if (IsPlayer(ent)) then ent:SetVelocity(jumpVec) end end hook.Add("entity.jump", "Jump!", entityJump)
local vec1 = Vector(-190, 315, 72) local vec2 = vec1 + Vector(0, 0, 1.2) local ang1 = Angle(0, 160, 0) local lightGrey = Color(200, 200, 200, 255) local lightBlue = Color(50, 50, 230, 255) function gameRender(renderTime) render.SetDrawColor(lightBlue) render.DrawText("LuaCraft!", vec2, ang1, 1.25, true) render.SetDrawColor(lightGrey) render.DrawText("Forge modding with Lua", vec3, ang1, 0.5) end hook.Add("render.world", "3D Render", gameRender)
Fully compatible with Minecraft Forge and works with your favourite existing modifications, rolling updates to the latest stable Forge version.
JNLua integrates Lua into Java based on the original implementation of Lua which is written in ANSI C. The Lua C code is integrated into Java using the Java Native API.
One of LuaCraft's leading features is the abilty to let you connect to any server with LuaCraft scripts and content, and it will automagically download them to your client and set things up.
The stable version is recommended for all general public who want to install, use and join servers with LuaCraft.
The latest version is for people who want to test new features or scripts before they are released and stable. You may experience problems with this version.
© 2014 The LuaCraft Team