Skip to content

Commit

Permalink
ComputerCraft 1.79 initial upload
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dan200 committed May 1, 2017
1 parent 38623b3 commit e85cdac
Show file tree
Hide file tree
Showing 1,123 changed files with 191,332 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build
out
run
deploy
*.ipr
*.iws
*.iml
.gradle
98 changes: 98 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
ComputerCraft Public License
============================

Version 1.0.0 (Based on Minecraft Mod Public License 1.0.1)

0. Definitions
--------------

Minecraft: Denotes a copy of the PC Java version of the game “Minecraft” licensed by Mojang AB

User: Anybody that interacts with the software in one of the following ways:
- play
- decompile
- recompile or compile
- modify
- distribute

Mod: The mod code designated by the present license, in source form, binary
form, as obtained standalone, as part of a wider distribution or resulting from
the compilation of the original or modified sources.

Dependency: Code required for the mod to work properly. This includes
dependencies required to compile the code as well as any file or modification
that is explicitly or implicitly required for the mod to be working.

1. Scope
--------

The present license is granted to any user of the mod. As a prerequisite,
a user must own a legally acquired copy of Minecraft

2. Liability
------------

This mod is provided 'as is' with no warranties, implied or otherwise. The owner
of this mod takes no responsibility for any damages incurred from the use of
this mod. This mod alters fundamental parts of the Minecraft game, parts of
Minecraft may not work with this mod installed. All damages caused from the use
or misuse of this mad fall on the user.

3. Play rights
--------------

The user is allowed to install this mod on a Minecraft client or server and to play
without restriction.

4. Modification rights
----------------------

The user has the right to decompile the source code, look at either the
decompiled version or the original source code, and to modify it.

5. Distribution of original or modified copy rights
---------------------------------------------------

Is subject to distribution rights this entire mod in its various forms. This
include:
- original binary or source forms of this mod files
- modified versions of these binaries or source files, as well as binaries
resulting from source modifications
- patch to its source or binary files
- any copy of a portion of its binary source files

The user is allowed to redistribute this mod partially, in totality, or
included in a distribution.

When distributing binary files, the user must provide means to obtain its
entire set of sources or modified sources at no cost.

All distributions of this mod must remain licensed under the CCPL.

All dependencies that this mod have on other mods or classes must be licensed
under conditions comparable to this version of CCPL, with the exception of the
Minecraft code and the mod loading framework (e.g. Forge).

Modified version of binaries and sources, as well as files containing sections
copied from this mod, should be distributed under the terms of the present
license.

7. Use of mod code and assets in other projects
-----------------------------------------------

It is permitted to use the code and assets contained in this mod (and modified
versions thereof) in other Minecraft Mods, provided they are non-commercial.
However: the code and assets may not be used in commercial mods, mods for other
games, other games, other non-game projects, or any commercial projects.

When using code covered by this license in other projects, the source code used
must be made available at no cost and remain licensed under the CCPL.

8. Contributing
---------------

If you choose to contribute code or assets to be included in this mod, you
agree that, if added to to the main repository at
https://github.com/dan200/ComputerCraft, your contributions will be covered by
this license, and that Daniel Ratcliffe will retain the right to re-license the
mod, including your contributions, in part or in whole, under other licenses.
19 changes: 19 additions & 0 deletions LICENSE-luaj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2007 LuaJ. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
ComputerCraft
=============

Issue tracker for ComputerCraft and ComputerCraftEdu
* http://www.computercraft.info
* http://www.computercraftedu.com
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](http://www.computercraft.info/download) or the [Wiki](http://www.computercraft.info/wiki) to find out more.

About this Repository
=====================

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.

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.

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 requests 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.
85 changes: 85 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

/*
// for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
*/

version = "1.79"
group = "dan200.computercraft"
archivesBaseName = "ComputerCraft"

minecraft {
version = "1.8.9-11.15.0.1715"
runDir = "run"
replace '${version}', project.version

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20151224"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"

// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

}

processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

12 changes: 12 additions & 0 deletions build_luaj.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
cd luaj-2.0.3
echo "Building LuaJ..."
ant clean
ant

echo "Copying output to libs..."
rm ../libs/luaj-jse-2.0.3.jar
cp luaj-jse-2.0.3.jar ../libs

echo "Done."
cd ..
46 changes: 46 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh

echo "Building with gradle..."
rm -rf build/libs
rm -rf build/resources
rm -rf build/classes
chmod -R +rw src/main/resources
chmod +x gradlew
./gradlew build

echo "Deleting old deployment..."
rm -rf deploy
mkdir deploy

echo "Making new deployment..."
INPUTJAR=`ls -1 build/libs | grep -v sources`
OUTPUTJAR=`ls -1 build/libs | grep -v sources | sed s/\-//g`
FRIENDLYNAME=`ls -1 build/libs | grep -v sources | sed s/\-/\ /g | sed s/\.jar//g`
cp build/libs/$INPUTJAR deploy/$OUTPUTJAR

echo "Creating API..."
mkdir -p deploy/api/src/dan200/computercraft
cp -r build/sources/main/java/dan200/computercraft/api deploy/api/src/dan200/computercraft/api

echo "Creating API Javadocs..."
mkdir -p deploy/api/doc
cd src/main/java/dan200/computercraft/api
find . -type f -name "*.java" | xargs javadoc -d ../../../../../../deploy/api/doc -windowtitle "$FRIENDLYNAME"
cd ../../../../../..

echo "Adding API and Javadocs to deployment..."
cd deploy
zip -r $OUTPUTJAR api/doc > /dev/null
zip -r $OUTPUTJAR api/src/dan200/computercraft > /dev/null
cd ..
rm -rf deploy/api

echo "Adding LuaJ to deployment..."
mkdir deploy/luaj
cd deploy/luaj
jar xf ../../libs/luaj-jse-2.0.3.jar
zip -r ../$OUTPUTJAR org > /dev/null
cd ../..
rm -rf deploy/luaj

echo "Done."
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Mon Sep 14 12:28:28 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
Loading

2 comments on commit e85cdac

@SquidDev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you so much for this. ❤️

@dan200
Copy link
Owner Author

@dan200 dan200 commented on e85cdac May 1, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.