Jump to content

LuaStoned

Members
  • Posts

    6
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    http://luacraft.com
  • Location
    Austria
  • Personal Text
    LuaCraft

LuaStoned's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey there, BlackAwps and I have been working on LuaCraft again, this time around it is a Forge mod. Right now we support Minecraft 1.7.2 / Forge 10.12.1.1060, future versions should be easy to port. Repo: https://bitbucket.org/luastoned/luacraft-forge Download: http://luacraft.com/#download We have our own forum at: http://forum.luacraft.com http://img.luastoned.com/luacraft_forge_v4.png[/img] Here are some code samples to get everyone started. High Jump, makes players jump quite high and take no fall damage. 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) Biome name, your position and information about what you look at. local font = surface.GetDefaultFont() local matEye = Resource("silkicons:eye.png") local matMap = Resource("silkicons:map.png") local matTime = Resource("silkicons:time.png") local matWorld = Resource("silkicons:world.png") function _R.World:GetTimeString() local worldTime = (self:GetTime() + 8000) % 24000 local hour = math.floor(worldTime / 1000) local minute = math.floor((worldTime % 1000 / 1000) * 60) % 60 return string.format("%02d:%02d", hour, minute) end function extraInfo(time, phase) local world = World() local me = LocalPlayer() local pos = me:GetPos() local biome = world:GetBiome(pos) surface.SetTexture(matWorld) surface.DrawTexturedRect(2, 2, 8, font:DrawText(biome, 12, 2, true) surface.SetTexture(matMap) surface.DrawTexturedRect(2, 12, 8, font:DrawText(string.format("%d, %d", math.floor(pos.x), math.floor(pos.y)), 12, 12, true) surface.SetTexture(matTime) surface.DrawTexturedRect(2, 22, 8, font:DrawText(world:GetTimeString(), 12, 22, true) local tr = me:GetEyeTrace() if (tr.HitBlock) then surface.SetTexture(matEye) surface.DrawTexturedRect(2, 32, 8, font:DrawText(tr.HitBlock:GetName(), 12, 32, true) end end hook.Add("render.gameoverlay", "Extra Info", extraInfo) 3D rendering, because everyone loves that! 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) Have fun with this and feel free to post suggestions or whatever else is on your mind. Happy coding!
  2. People on the IRC helped me out, I needed a Core container. Thanks for the GitHub link though, it really helped!
  3. Well, I thought that would work but now I'm getting this error: cpw.mods.fml.common.LoaderException: java.lang.ClassCastException: com.luacraft.LuaCraft cannot be cast to cpw.mods.fml.common.ModContainer at cpw.mods.fml.common.Loader.identifyMods(Loader.java:326) at cpw.mods.fml.common.Loader.loadMods(Loader.java:465) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:465) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:813) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.ClassCastException: com.luacraft.LuaCraft cannot be cast to cpw.mods.fml.common.ModContainer
  4. Yeah I do have those, though I'm not sure if I am using them right.
  5. Hey, I have been using access transformers for the past month without problems, until about a week ago. They still work fine for my workspace but when I try to build a release version they don't get applied anymore. When I start Minecraft with my mod loaded (and enter a world) the mod tries to access Minecraft.timer and errors out. Here is what my AT looks like: I'm not sure wether I am straight up missing something but.. this is rather odd.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.