Giter Club home page Giter Club logo

computercraftlib's Introduction

KineCraft Library

The KineCraft Library is a module loader and framework for ComputerCraft. It aims to provide the following functionality:

  • Downloading modules from online repositories (github/pastebin)
  • Installing modules into versioned folders
  • Managing dependencies between modules
  • Providing a framework for modules to hook into
  • An event system for inter-module communication

Usage

The module is automatically downloaded into the versioned folder and is linked as the startup command

You can then download and install modules like this:

unimplemented()

This will download the example_mod.lua file from the repository specified in the file, determine its version, and install it into a versioned folder.

The installed module can then be required and used in your program.

Contributing Contributions to the KineCraft Library are welcome! You can contribute by:

  • Reporting issues or bugs
  • Suggesting new features
  • Submitting pull requests with new functionality
  • Writing documentation
  • Please follow the Contributing Guidelines if you wish to submit a pull request.

craft([limit=64]) Craft a recipe based on the turtle's inventory. forward() Move the turtle forward one block. back() Move the turtle backwards one block. up() Move the turtle up one block. down() Move the turtle down one block. turnLeft() Rotate the turtle 90 degrees to the left. turnRight() Rotate the turtle 90 degrees to the right. dig([side]) Attempt to break the block in front of the turtle. digUp([side]) Attempt to break the block above the turtle. digDown([side]) Attempt to break the block below the turtle. place([text]) Place a block or item into the world in front of the turtle. placeUp([text]) Place a block or item into the world above the turtle. placeDown([text]) Place a block or item into the world below the turtle. drop([count]) Drop the currently selected stack into the inventory in front of the turtle, or as an item into the world if there is no inventory. dropUp([count]) Drop the currently selected stack into the inventory above the turtle, or as an item into the world if there is no inventory. dropDown([count]) Drop the currently selected stack into the inventory in front of the turtle, or as an item into the world if there is no inventory. select(slot) Change the currently selected slot. getItemCount([slot]) Get the number of items in the given slot. getItemSpace([slot]) Get the remaining number of items which may be stored in this stack. detect() Check if there is a solid block in front of the turtle. detectUp() Check if there is a solid block above the turtle. detectDown() Check if there is a solid block below the turtle. compare() Check if the block in front of the turtle is equal to the item in the currently selected slot. compareUp() Check if the block above the turtle is equal to the item in the currently selected slot. compareDown() Check if the block below the turtle is equal to the item in the currently selected slot. attack([side]) Attack the entity in front of the turtle. attackUp([side]) Attack the entity above the turtle. attackDown([side]) Attack the entity below the turtle. suck([count]) Suck an item from the inventory in front of the turtle, or from an item floating in the world. suckUp([count]) Suck an item from the inventory above the turtle, or from an item floating in the world. suckDown([count]) Suck an item from the inventory below the turtle, or from an item floating in the world. getFuelLevel() Get the maximum amount of fuel this turtle currently holds. refuel([count]) Refuel this turtle. compareTo(slot) Compare the item in the currently selected slot to the item in another slot. transferTo(slot [, count]) Move an item from the selected slot to another one. getSelectedSlot() Get the currently selected slot. getFuelLimit() Get the maximum amount of fuel this turtle can hold. equipLeft() Equip (or unequip) an item on the left side of this turtle. equipRight() Equip (or unequip) an item on the right side of this turtle. inspect() Get information about the block in front of the turtle. inspectUp() Get information about the block above the turtle. inspectDown() Get information about the block below the turtle. getItemDetail([slot [, detailed]]) Get detailed information about the items in the given slot.

computercraftlib's People

Contributors

akinevz0 avatar

Watchers

Kirill Nevzorov 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.