GithubHelp home page GithubHelp logo

computercraft's Introduction

ComputerCraft

Build Status

ComputerCraft is a Minecraft modification which adds programmable Robots and Computers to the world of Minecraft. If you're not familiar with ComputerCraft, visit the Website or the Wiki to find out more.

About this Repository

ComputerCraft was originally released in late 2011 by Daniel Ratcliffe. In early 2017, after working on the mod solo for five years, it was decided to release the source code publicly to allow Dan to devote time to other projects. This repository marks the first public release of this source code.

The code in this repository will always represent the "bleeding edge" of the ComputerCraft codebase, but stable builds back to 1.79 will be marked on the Releases page.

Contributing

While ComputerCraft will no longer be actively developed by Daniel Ratcliffe, you may still contribute pull requests which will be reviewed and incorporated into releases periodically. A pull request is more likely to be accepted if it meets the following criteria:

  • It does not add any new dependencies for compiling, running or using the mod.
  • It does not break compatibility with world saves or programs created with previous versions of the mod.
  • It does not add unneccessary complexity for users of the mod, and maintains the accessibility for which the mod is known.
  • It does not add unneccessary complexity or stylistic changes to the code, especially where functionality is not being changed.
  • It does not create bugs!

The pull requests most likely to be accepted are those which fix bugs, simplify code, or make the mod compatible with newer versions of Minecraft.

computercraft's People

Contributors

bombbloke avatar boq avatar crazedprogrammer avatar cruor avatar dan200 avatar dirthsj avatar dmarcuse avatar gegy avatar jakobdev avatar jlleitschuh avatar luca0208 avatar lupus590 avatar minerobber9000 avatar obloxcc avatar restioson avatar squiddev avatar techman749 avatar timia2109 avatar wojbie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

computercraft's Issues

computercraft crash upon placing a sign

Computercraft website is down so I am bug reporting here...
I hope my error report is in the correct format. either way, I'm sure you'll fuigure it out.
I will also put this report on the forums when I notice the site back online.

Versions
Computercraft version 1.64pr4
minecraft 1.7.10

Action:
Executing any turtle.place(), turtle.placeDown() etc.. command with or without a string in the parameters, with a vanilla sign in the selected turtle inventory slot on any type of turtle.

Expected outcome:
Turtle successfully places a sign with any sting in the parameters.

Actual outcome:
Minecraft crashes. Upon restarting, a blank sign is placed and the turtle's inventory remains unchanged.

Crash report:
http://pastebin.com/raw.php?i=hfpgfgx8

Turtle Name

This isn't really an issue, but something I've been struggling with the past week. I couldn't find a better place to post this than here. What I'm trying to do is find a certain name for turtles. The name is supposed to be used in a format similar to: ThermalExpansion:Strongbox, ThermalExpansion:Cache, or MineFactoryReloaded:machine.1. I've tried multiple variations of the name. BlockType, Class name, real name, different capitalization-- I've tried a lot. Not one of my guesses has been successfully recognized. All of them are listed here: http://pastebin.com/8cNP9tpH . I've tried googling around to find the right answer, but nothing has helped me. I was hoping some of you might be able to help a brother out by offering your thoughts on what name is supposed to be used.

Website: Some download links for files hosted on curseforge seem outdated.

Writing Turtle

Hey Dan it would be TOTALLY awesome if you would add a turtle which could remotely control other turtles (i.e. restart them) and to give them the possibility to copy code for other turtles from floppy disks

Wireless modems graphical bug.

Wireless modems don't change color of border to red when they have open channel. Happens on: turtles and standalone blocks and wireless pocket computers(little knob don't turn red). Channel still opens and messages go trough. It just don't indicate that visually like it used to.
Wired ones are ok.

textutils.serializeJSON keys are in qoutes

Reproduce:
-Summon a cow
-run commands.entitydata("@e[r=10]",{Motion={0.0001,1.8,1.8}})
Expected result:
-cow flying into the distance
Real result:
NBT of cow: {"Motion":[0.00001,1.8,1.8],Motion:[0,0,0]}

[1.76pr3] Left curly brackets have an extra pixel

2015-12-11_19 01 01

Title says all, there is an extra pixel in all left curly brackets, but not the right ones, which looks very funny and is really messing with me. (I think everyone else took all the good bugs...)

Page Up/Down Not Working

I believe the page up and down buttons used to work in ComputerCraft. They currently do not seem to be working. (CCv1.6.4) Tested with: while true do print(os.pullEvent()) end

IModel is deprecated

Not actually a bug, but reporting anyway.

Forge has deprecated Minecraft's IBakedModel in favour of net.minecraftforge.client.model.IFlexibleBakedModel (used in the Turtle upgrades). Not sure though if there are issues with rendering a IFlexibleBakedModel compared with the original one.

For getItemModel you can always wrap the IBakedModel with IFlexibleBakedModel.Wrapper.

Command Computer results being translated

If a command of a command computer fails there is currently no way of knowing why it failed since the error message is in the language of the player (or the server). There is no way a command computer program can check for a spezific errormessage in every language minecraft offers. Most of the languages are not even printable (e.g. german because of äüö).

Please make commands return the untranslated string. So that an lua program written on an english server does still work on a german server and vice versa.

Steps to reproduce:
-Turn language of the server to spanish, swedish, german or chinesse.
-run the lua program
-enter: commands.entitydate("@e","{}")

In pr2 it crashes because of the window api, in pr3 it probatly wont, but it is still not comparable and therefore not useful.

The only thing that can be done with an translated string is outputing it to the minecraft chat, but with the tellraw command a string can be translated as well.

Rednet crash using malformed dns message.

In line 245 of rednet api:

if sProtocol == "dns" and tMessage.sType == "lookup" then

If rednet is open and computer receives message on sProtocol = "dns" but tMessage if different type from table (like string or number) this line crashes/turns off the computer by causing rednet.run to error.
It can be simply fixed by adding type() test in said line. Per example:

if sProtocol == "dns" and type(tMessage) == "table" and tMessage.sType == "lookup" then

Only english!

This isn't that much of a issue, but there is no language support. I'm german, with about 75% or more english.

Problem when erroring öäü§....

If you open a lua prompt and do "error("ö")" it will result into some weird chars.
Anavrins told me that everything that has a higer byte value than 127 does that.
2015-12-12_07 12 09

Turtles Exploding

There is a problem when mining in the nether with turtles (netherores) or having creepers explode next to turtles, where the turtle disappears. I believe it should be an option in the config to have this happen, or an option so advanced turtles are more blast resistant and tnt proof.

Turtle Peripherals

My current issue is that with my ITurtleUpgrade it appears that all upgrades are instances of the same IPheripheral, this makes it difficult/nearly impossible to store data on the peripheral unique to each turtle, or even a reference to the turtle who "owns" the peripheral - to allow for use of the turtle's location and inventory when executing commands

If there is a workaround that I am just not seeing I'd really appreciate some advice, but it does seem unnecessarily difficult as it currently stands

[1.76pr2] Command usage may interfere with event system

Resolving commands (from the commands API available to command computers) may interfere with the event system, seemingly at random.

The more that are requested between yields (eg by using commands.execAsync()), the less likely it becomes that the computer which executed the commands will receive all events that should be due to it (other computers in the world do not appear to be affected at all).

Most often task_complete events are affected, as they're the most common events flooding into the event queue while command-heavy scripts execute, but using eg os.startTimer() in an attempt to "time-out" while waiting for these events is a poor workaround - it's just as possible to miss the timer events as well!

A sample script can be found here:

http://pastebin.com/MZtHfe5Z

It orders as many commands as are allowed by "commandLimit" (setblock'ing stone in the square directly above the system), and then yields until it detects a task_complete event (at which point it executes another command, resumes yielding, etc). This goes on until 10000 commands have been executed, and if 10000 task_complete events are detected in return, the script ends.

Often there's a mismatch in the number of events received and so the script never finishes. I find it has about a 9/10 chance of running to completion as-is (with "commandLimit" at 30). Changing "commandLimit" to ~100 decreases that to about a 2/3 chance, whereas ~230 is more like 1/2.

Other commands may be used (eg "tell" instead of "setblock") with much the same result, though I've not had problems with commands.getBlockInfo(). Regardless as to whether the resulting events are received, best I can make out the commands do always execute correctly and perform their proper function.

Entities suffocate in turtles

Steps to reproduce:
/gamemode 0
place turtle on your head level
walk towards turtle
result:
turtles are cacti now

[Enhancement] Better line numbers on pocket computers

When using the edit program on pocket computers, line numbers will not show up properly due to the "Press Ctrl to access menu" text covering them up. My suggestion to fix this is to not write "Press " on pockets. (or something of that nature)

if not pocket then
term.write("Press ")
end
term.write("Ctrl to access menu")

There are some unlocalized variables/functions in lua programs. Also stray ’ in help/changelog.

Reposting from.
http://www.computercraft.info/forums2/index.php?/topic/23448-175smpssp-rom-program-functions-in-env/
I know its kinda old but it should be fast to fix with line numbers.

adventure:610: attempt to create global function "doCommand" in the current environment
adventure:476: attempt to create global function "findItem" in the current environment
worm:20: attempt to create global function "printCentred" in the current environment
help:1: attempt to create global table "tArgs" in the current environment
monitor:2: attempt to create global function "printUsage" in the current environment
edit:31: attempt to create global number "stringColour" in the current environment
redirection:178: attempt to create global table "fLevel" in the current environment

Also there is a letter ’ in the help/changelog file in line 124 "Conway’s Game of Life" that makes said file not readable correctly in-game. Reposting from: http://www.computercraft.info/forums2/index.php?/topic/24475-174-stray-%E2%80%99-in-changelog/

Signs n Turtles

The turtle.place("text") function crashes the game because signs are like tellraw/books now.

I beg you, please let us be able to make colorful signs with the turtles 🙏

turtle.attack issues

turtle.attack does not allways return true when there is a mob infront of it and it has a weapon.

Skeletons keep spooting at the spot where the turtle has been while attacking.
Creepers blow up, once they have been hit.

Pasting characters 1 through 31 results in ?

Pasting in any character (except ¶ and §) in the ASCII range of 1 through 31 into a computer results in ?s to be displayed.

¶ works properly. § doesn't paste at all.

EDIT: clarified the description

Can't open file with ":" in the name

I made some files "player:nbs.lua" "player:monitor.lua" etc, and they can't be opened with fs.open(). Trying to make a file "player:test.lua" from in-game removes the ":".

EDIT: Why I want to use ":"? Well, MC items are named e.g. "minecraft:stone", so I decided to name my files like that because it's better.

[1.76pr2-3] External monitor rendering

Tall monitors may bug out when viewed from specific angles / distances. The taller the display, the easier it is to reproduce; I find it needs to be at least 4 blocks high before I can trigger it. Compass direction does not appear to matter, but world height does.

To trigger, move close to the top of an affected display, then slowly tilt your view upwards.

For example, building a staircase of monitors at around y110, I get:

2015-12-12_12 13 34

[!still broken!][1.76pr6] cd .... crashes shell

... or cd with any other number of additional periods over two (or, since pr3, over three).

Under Windows 8.1 with an NTFS file system, when the shell is working within a folder other than the root of the drive, shell.resolve("...") returns "current directory + ..." (as opposed to the expected "current directory alone"). It should act in the same manner as shell.resolve(".").

Because fs.exists( shell.resolve( "..." ) ) always (correctly) resolves as true, typing "cd ..." into the command line leads to the shell switching to a non-existant directory (as shell.resolve() brings it to the wrong location). Auto-complete promptly crashes shell when the next character is typed ("Java Exception Thrown: java.lang.NullPointerException").

cddotdotdot

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.