Skip to content

Commit e85cdac

Browse files
committed
ComputerCraft 1.79 initial upload
Added the complete source code to ComputerCraft 1.79 for Minecraft 1.8.9, plus newly written README and LICENSE files for the open source release.
1 parent 38623b3 commit e85cdac

File tree

1,123 files changed

+191332
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,123 files changed

+191332
-3
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build
2+
out
3+
run
4+
deploy
5+
*.ipr
6+
*.iws
7+
*.iml
8+
.gradle

LICENSE

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
ComputerCraft Public License
2+
============================
3+
4+
Version 1.0.0 (Based on Minecraft Mod Public License 1.0.1)
5+
6+
0. Definitions
7+
--------------
8+
9+
Minecraft: Denotes a copy of the PC Java version of the game “Minecraft” licensed by Mojang AB
10+
11+
User: Anybody that interacts with the software in one of the following ways:
12+
- play
13+
- decompile
14+
- recompile or compile
15+
- modify
16+
- distribute
17+
18+
Mod: The mod code designated by the present license, in source form, binary
19+
form, as obtained standalone, as part of a wider distribution or resulting from
20+
the compilation of the original or modified sources.
21+
22+
Dependency: Code required for the mod to work properly. This includes
23+
dependencies required to compile the code as well as any file or modification
24+
that is explicitly or implicitly required for the mod to be working.
25+
26+
1. Scope
27+
--------
28+
29+
The present license is granted to any user of the mod. As a prerequisite,
30+
a user must own a legally acquired copy of Minecraft
31+
32+
2. Liability
33+
------------
34+
35+
This mod is provided 'as is' with no warranties, implied or otherwise. The owner
36+
of this mod takes no responsibility for any damages incurred from the use of
37+
this mod. This mod alters fundamental parts of the Minecraft game, parts of
38+
Minecraft may not work with this mod installed. All damages caused from the use
39+
or misuse of this mad fall on the user.
40+
41+
3. Play rights
42+
--------------
43+
44+
The user is allowed to install this mod on a Minecraft client or server and to play
45+
without restriction.
46+
47+
4. Modification rights
48+
----------------------
49+
50+
The user has the right to decompile the source code, look at either the
51+
decompiled version or the original source code, and to modify it.
52+
53+
5. Distribution of original or modified copy rights
54+
---------------------------------------------------
55+
56+
Is subject to distribution rights this entire mod in its various forms. This
57+
include:
58+
- original binary or source forms of this mod files
59+
- modified versions of these binaries or source files, as well as binaries
60+
resulting from source modifications
61+
- patch to its source or binary files
62+
- any copy of a portion of its binary source files
63+
64+
The user is allowed to redistribute this mod partially, in totality, or
65+
included in a distribution.
66+
67+
When distributing binary files, the user must provide means to obtain its
68+
entire set of sources or modified sources at no cost.
69+
70+
All distributions of this mod must remain licensed under the CCPL.
71+
72+
All dependencies that this mod have on other mods or classes must be licensed
73+
under conditions comparable to this version of CCPL, with the exception of the
74+
Minecraft code and the mod loading framework (e.g. Forge).
75+
76+
Modified version of binaries and sources, as well as files containing sections
77+
copied from this mod, should be distributed under the terms of the present
78+
license.
79+
80+
7. Use of mod code and assets in other projects
81+
-----------------------------------------------
82+
83+
It is permitted to use the code and assets contained in this mod (and modified
84+
versions thereof) in other Minecraft Mods, provided they are non-commercial.
85+
However: the code and assets may not be used in commercial mods, mods for other
86+
games, other games, other non-game projects, or any commercial projects.
87+
88+
When using code covered by this license in other projects, the source code used
89+
must be made available at no cost and remain licensed under the CCPL.
90+
91+
8. Contributing
92+
---------------
93+
94+
If you choose to contribute code or assets to be included in this mod, you
95+
agree that, if added to to the main repository at
96+
https://github.com/dan200/ComputerCraft, your contributions will be covered by
97+
this license, and that Daniel Ratcliffe will retain the right to re-license the
98+
mod, including your contributions, in part or in whole, under other licenses.

LICENSE-luaj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2007 LuaJ. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
ComputerCraft
22
=============
33

4-
Issue tracker for ComputerCraft and ComputerCraftEdu
5-
* http://www.computercraft.info
6-
* http://www.computercraftedu.com
4+
ComputerCraft is a Minecraft modification which adds programmable Robots and Computers to the world of Minecraft.
5+
If you're not familiar with ComputerCraft, visit the [Website](http://www.computercraft.info/download) or the [Wiki](http://www.computercraft.info/wiki) to find out more.
6+
7+
About this Repository
8+
=====================
9+
10+
ComputerCraft was originally released in late 2011 by [Daniel Ratcliffe](https://twitter.com/DanTwoHundred). 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.
11+
12+
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](https://github.com/dan200/ComputerCraft/releases) page.
13+
14+
Contributing
15+
============
16+
17+
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 requests is more likely to be accepted if it meets the following criteria:
18+
19+
* It does not add any new dependencies for compiling, running or using the mod.
20+
* It does not break compatibility with world saves or programs created with previous versions of the mod.
21+
* It does not add unneccessary complexity for users of the mod, and maintains the accessibility for which the mod is known.
22+
* It does not add unneccessary complexity or stylistic changes to the code, especially where functionality is not being changed.
23+
* It does not create bugs!
24+
25+
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.

build.gradle

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
// For those who want the bleeding edge
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
maven {
7+
name = "forge"
8+
url = "http://files.minecraftforge.net/maven"
9+
}
10+
}
11+
dependencies {
12+
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
13+
}
14+
}
15+
apply plugin: 'net.minecraftforge.gradle.forge'
16+
17+
/*
18+
// for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
19+
plugins {
20+
id "net.minecraftforge.gradle.forge" version "2.0.2"
21+
}
22+
*/
23+
24+
version = "1.79"
25+
group = "dan200.computercraft"
26+
archivesBaseName = "ComputerCraft"
27+
28+
minecraft {
29+
version = "1.8.9-11.15.0.1715"
30+
runDir = "run"
31+
replace '${version}', project.version
32+
33+
// the mappings can be changed at any time, and must be in the following format.
34+
// snapshot_YYYYMMDD snapshot are built nightly.
35+
// stable_# stables are built at the discretion of the MCP team.
36+
// Use non-default mappings at your own risk. they may not allways work.
37+
// simply re-run your setup task after changing the mappings to update your workspace.
38+
mappings = "snapshot_20151224"
39+
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
40+
}
41+
42+
dependencies {
43+
// you may put jars on which you depend on in ./libs
44+
// or you may define them like so..
45+
//compile "some.group:artifact:version:classifier"
46+
//compile "some.group:artifact:version"
47+
48+
// real examples
49+
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
50+
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
51+
52+
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
53+
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
54+
55+
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
56+
// except that these dependencies get remapped to your current MCP mappings
57+
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
58+
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
59+
60+
// for more info...
61+
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
62+
// http://www.gradle.org/docs/current/userguide/dependency_management.html
63+
64+
}
65+
66+
processResources
67+
{
68+
// this will ensure that this task is redone when the versions change.
69+
inputs.property "version", project.version
70+
inputs.property "mcversion", project.minecraft.version
71+
72+
// replace stuff in mcmod.info, nothing else
73+
from(sourceSets.main.resources.srcDirs) {
74+
include 'mcmod.info'
75+
76+
// replace version and mcversion
77+
expand 'version':project.version, 'mcversion':project.minecraft.version
78+
}
79+
80+
// copy everything else, thats not the mcmod.info
81+
from(sourceSets.main.resources.srcDirs) {
82+
exclude 'mcmod.info'
83+
}
84+
}
85+

build_luaj.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
cd luaj-2.0.3
3+
echo "Building LuaJ..."
4+
ant clean
5+
ant
6+
7+
echo "Copying output to libs..."
8+
rm ../libs/luaj-jse-2.0.3.jar
9+
cp luaj-jse-2.0.3.jar ../libs
10+
11+
echo "Done."
12+
cd ..

deploy.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/sh
2+
3+
echo "Building with gradle..."
4+
rm -rf build/libs
5+
rm -rf build/resources
6+
rm -rf build/classes
7+
chmod -R +rw src/main/resources
8+
chmod +x gradlew
9+
./gradlew build
10+
11+
echo "Deleting old deployment..."
12+
rm -rf deploy
13+
mkdir deploy
14+
15+
echo "Making new deployment..."
16+
INPUTJAR=`ls -1 build/libs | grep -v sources`
17+
OUTPUTJAR=`ls -1 build/libs | grep -v sources | sed s/\-//g`
18+
FRIENDLYNAME=`ls -1 build/libs | grep -v sources | sed s/\-/\ /g | sed s/\.jar//g`
19+
cp build/libs/$INPUTJAR deploy/$OUTPUTJAR
20+
21+
echo "Creating API..."
22+
mkdir -p deploy/api/src/dan200/computercraft
23+
cp -r build/sources/main/java/dan200/computercraft/api deploy/api/src/dan200/computercraft/api
24+
25+
echo "Creating API Javadocs..."
26+
mkdir -p deploy/api/doc
27+
cd src/main/java/dan200/computercraft/api
28+
find . -type f -name "*.java" | xargs javadoc -d ../../../../../../deploy/api/doc -windowtitle "$FRIENDLYNAME"
29+
cd ../../../../../..
30+
31+
echo "Adding API and Javadocs to deployment..."
32+
cd deploy
33+
zip -r $OUTPUTJAR api/doc > /dev/null
34+
zip -r $OUTPUTJAR api/src/dan200/computercraft > /dev/null
35+
cd ..
36+
rm -rf deploy/api
37+
38+
echo "Adding LuaJ to deployment..."
39+
mkdir deploy/luaj
40+
cd deploy/luaj
41+
jar xf ../../libs/luaj-jse-2.0.3.jar
42+
zip -r ../$OUTPUTJAR org > /dev/null
43+
cd ../..
44+
rm -rf deploy/luaj
45+
46+
echo "Done."

gradle/wrapper/gradle-wrapper.jar

51 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Mon Sep 14 12:28:28 PDT 2015
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip

0 commit comments

Comments
 (0)