Skip to content

Lua

Learn Lua from zero, then build your first Celestial mods with the CLight API.

  1. 1Start here

    1. 1.1Learn Lua
  2. 2Getting started

    1. 2.1What is Lua?
    2. 2.2Running Lua code
  3. 3The basics

    1. 3.1Values and variables
    2. 3.2Numbers and maths
    3. 3.3Strings
    4. 3.4Booleans and logic
  4. 4Control flow

    1. 4.1If and else
    2. 4.2Loops
  5. 5Functions

    1. 5.1Functions
    2. 5.2More about functions
  6. 6Tables

    1. 6.1Lists
    2. 6.2Dictionaries
    3. 6.3Working with tables
    4. 6.4Modules
  7. 7Metatables and objects

    1. 7.1Metatables
    2. 7.2Classes and inheritance
  8. 8Going further

    1. 8.1Error handling
    2. 8.2Coroutines
    3. 8.3String patterns
    4. 8.4The standard library
    5. 8.5Style and common mistakes
  9. 9Your first mod

    1. 9.1Setting up
    2. 9.2The manifest
    3. 9.3Running and reloading
  10. 10Events

    1. 10.1Listening to events
    2. 10.2Changing and cancelling events
    3. 10.3The event list
  11. 11Players and text

    1. 11.1Players
    2. 11.2Messages and text
    3. 11.3Colours and formatting
  12. 12Items and blocks

    1. 12.1Items
    2. 12.2Blocks
    3. 12.3Recipes and data packs
    4. 12.4The world
    5. 12.5Entities
    6. 12.6Models and animation
    7. 12.7Entity gameplay
    8. 12.8World access
    9. 12.9Player control
    10. 12.10AI and saved data
  13. 13Commands and timers

    1. 13.1Commands
    2. 13.2Timers and tasks
    3. 13.3Config
  14. 14The client

    1. 14.1Client and server
    2. 14.2Keys and client events
    3. 14.3The HUD
    4. 14.4Screens and menus
    5. 14.5Sound and music
    6. 14.6Audio and effects
    7. 14.7Particles, post effects and the camera
    8. 14.8Entity shadows in shader packs
    9. 14.9Themed GUIs, HUD elements and appearance pages
    10. 14.10Components: GUIs that update themselves
    11. 14.11HTML and CSS: overlays and panels
  15. 15Networking and permissions

    1. 15.1Talking between client and server
    2. 15.2Permissions
    3. 15.3Files and the web
  16. 16Finishing up

    1. 16.1Debugging
    2. 16.2Publishing
    3. 16.3Project: ruby tools
  17. 17Mixins

    1. 17.1What is a mixin?
    2. 17.2Head, return and cancel
    3. 17.3Points and values
    4. 17.4Wrap, overwrite and invokers
    5. 17.5Priorities, conflicts and debugging
    6. 17.6Project: spider bounty