Giter VIP home page Giter VIP logo

sierracclib's Introduction

Example ComputerCraft Datapack

This is an example datapack for ComputerCraft, which can be used as a skeleton for your own pack.

Datapacks can be used to add or overwrite files in ComputerCraft's own rom, allowing you to add new programs or modules, or adjust the behaviour of existing ones. This pack comes with several features:

  • apis/my_api.lua: Example of a old-style API with a single method my_api.do_something().
  • programs/api_program.lua: A new program api_program, which just calls the above function.
  • modules/main/my_module.lua: A new module with a single method do_something().
  • programs/my_program.lua: A new program my_program, which just calls do_something from my_module.
  • modules/turtle/helpers.lua: A new module with a digColumn method.
  • programs/turtle/demo.lua: A new turtle program that uses the helpers module to dig 3x3 openings.
  • autorun/my-pack.lua: A basic program which is run whenever a computer turns on. This may be used to perform additional setup, such as registering autocompletion for your programs.

(Note: files in turtle folders will only be visible to turtles!)

Using the Pack

The contents of this project should be placed in the datapacks folder in your world's save folder. You may need to zip1 the folder for Minecraft to recognize it. The resulting file structure should resemble the the built-in ROM folder, looking something like this:

datapacks
└─my-pack(.zip)
  ├ pack.mcmeta
  └─data
    └─computercraft
      └─lua
        └─rom
          └─<your files go here>

1 The pack.mcmeta file should be in the root of the resulting zip. Using 7-Zip on Windows go into the my-pack folder, select all, RMB>7-Zip>Add to "my-pack.zip", then move to datapacks folder.

For more information on datapacks, see the Minecraft wiki.

Obviously this is just a skeleton, so is designed to be forked and used for your own programs!

sierracclib's People

Contributors

bartalcorn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.