homes mod link corrected, typography

Also took care of some typographic details: Java, JavaScript, ScriptCraft capitalization, dashes, ellipses prettified
This commit is contained in:
Robert Storlind 2015-04-16 22:02:22 +02:00
parent defce04a45
commit 1865e9b8a4

View file

@ -1,19 +1,19 @@
# Let's begin... # Let's begin …
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/walterhiggins/ScriptCraft?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/walterhiggins/ScriptCraft?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
I created ScriptCraft to make it easier for younger programmers to I created ScriptCraft to make it easier for younger programmers to
create their own Minecraft Mods. Mods are written using the create their own Minecraft Mods. Mods are written using the
Javascript programming language. Once the ScriptCraft mod is JavaScript programming language. Once the ScriptCraft mod is
installed, you can add your own new Mods by adding Javascript (.js) installed, you can add your own new Mods by adding JavaScript (.js)
files in a directory. files in a directory.
* If you're new to programming and want to start modding Minecraft, then [Start Here][yp]. * If you're new to programming and want to start modding Minecraft, then [Start Here][yp].
* If you've already used [Scratch][scr], have attended a few * If you've already used [Scratch][scr], have attended a few
[CoderDojo][cd] sessions, or have already dabbled with Javascript, [CoderDojo][cd] sessions, or have already dabbled with JavaScript,
then [Start Here][cda]. then [Start Here][cda].
* Watch some [demos][ytpl] of what you can do with ScriptCraft. * Watch some [demos][ytpl] of what you can do with ScriptCraft.
This is a simple mod in a file called greet.js in the scriptcraft/plugins directory... This is a simple mod in a file called greet.js in the scriptcraft/plugins directory …
```javascript ```javascript
function greet( player ) { function greet( player ) {
@ -29,13 +29,13 @@ At the in-game prompt, type:
``` ```
Anything you can do using the CanaryMod or CraftBukkit APIs in Java, Anything you can do using the CanaryMod or CraftBukkit APIs in Java,
you can do using ScriptCraft in Javascript. you can do using ScriptCraft in JavaScript.
# Description # Description
ScriptCraft is a plugin for Minecraft Servers which lets operators, ScriptCraft is a plugin for Minecraft Servers which lets operators,
administrators and plug-in authors customize the game using administrators and plug-in authors customize the game using
Javascript. ScriptCraft makes it easier to create your own mods. Mods JavaScript. ScriptCraft makes it easier to create your own mods. Mods
can be written in Javscript and can use the full [CanaryMod API][cm] can be written in Javscript and can use the full [CanaryMod API][cm]
or [Bukkit API][bukkit]. ScriptCraft works with all of the following Minecraft Server software: or [Bukkit API][bukkit]. ScriptCraft works with all of the following Minecraft Server software:
@ -53,7 +53,7 @@ the in-game prompt press the `/` key then type `js ` followed by any
javascript statement. For example: `/js 1 + 1` will print 2. javascript statement. For example: `/js 1 + 1` will print 2.
ScriptCraft also includes many objects and functions to make building ScriptCraft also includes many objects and functions to make building
and modding easier using Javascript. The Javascript `Drone` object and modding easier using JavaScript. The JavaScript `Drone` object
bundled with ScriptCraft provides an easy way to build at-scale in bundled with ScriptCraft provides an easy way to build at-scale in
Minecraft. See the attached [temple.js][temple] file for an example Minecraft. See the attached [temple.js][temple] file for an example
of how you can use the sample Drone plugin to create new buildings in of how you can use the sample Drone plugin to create new buildings in
@ -93,23 +93,23 @@ player's username to the ops.txt file in your server directory.
Launch the server, then launch the Minecraft client and create a new Launch the server, then launch the Minecraft client and create a new
server connection. The IP address will be `localhost` . Once you've server connection. The IP address will be `localhost` . Once you've
connected to your server and have entered the game, look at a connected to your server and have entered the game, look at a
ground-level block and type ... ground-level block and type …
/js up().box( blocks.wool.black, 4, 9, 1 ) /js up().box( blocks.wool.black, 4, 9, 1 )
... This will create a black monolith structure 4 blocks wide by 9 … This will create a black monolith structure 4 blocks wide by 9
blocks high by 1 block long. Take a look at the blocks high by 1 block long. Take a look at the
src/main/javascript/drone/drone.js file to see what ScriptCraft's src/main/javascript/drone/drone.js file to see what ScriptCraft's
drone can do. If you're interested in customizing minecraft beyond drone can do. If you're interested in customizing minecraft beyond
just creating new buildings, take a look at [the homes mod][homes] for an example of how to create a more fully-featured javascript plugin for Minecraft. just creating new buildings, take a look at [the homes mod][homes] for an example of how to create a more fully-featured JavaScript plugin for Minecraft.
A Javascript mod for minecraft is just a javascript source file (.js) A JavaScript mod for minecraft is just a JavaScript source file (.js)
located in the scriptcraft/plugins directory. All .js files in this located in the scriptcraft/plugins directory. All .js files in this
directory will be automatically loaded when the server starts. To get directory will be automatically loaded when the server starts. To get
started writing your own mod, take a look at some of the started writing your own mod, take a look at some of the
[examples][examples]. [examples][examples].
[ho]: src/main/js/plugins/homes/homes.js [homes]: src/main/js/plugins/homes/homes.js
[examples]: src/main/js/plugins/examples/ [examples]: src/main/js/plugins/examples/
# Additional information # Additional information
@ -117,19 +117,19 @@ started writing your own mod, take a look at some of the
Because the CanaryMod API is open, all of the CanaryMod API is accessible Because the CanaryMod API is open, all of the CanaryMod API is accessible
via javascript once the ScriptCraft plugin is loaded. There are a via javascript once the ScriptCraft plugin is loaded. There are a
couple of useful Java objects exposed via javascript in the couple of useful Java objects exposed via javascript in the
ScriptCraft plugin... ScriptCraft plugin …
* `__plugin` - the ScriptCraft Plugin itself. This is a useful * `__plugin` – the ScriptCraft Plugin itself. This is a useful
starting point for accessing other CanaryMod objects. The `__plugin` starting point for accessing other CanaryMod objects. The `__plugin`
object is of type [net.canarymod.plugin.Plugin][api] and all object is of type [net.canarymod.plugin.Plugin][api] and all
of its properties and methods are accessible. For example... `js of its properties and methods are accessible. For example … `js
__plugin.name` returns the plugin's name __plugin.name` returns the plugin's name
(javascript is more concise than the equivalent java code: (JavaScript is more concise than the equivalent Java code:
__plugin.getName() ). `__plugin.getName()` ).
* `server` - The top-level net.canarymod.Server object. See the [CanaryMod API docs][cmapi] for reference. * `server` – The top-level net.canarymod.Server object. See the [CanaryMod API docs][cmapi] for reference.
* `self` - The player/command-block or server console operator who * `self` – The player/command-block or server console operator who
invoked the `/js` command. Again, this is a good jumping off point for invoked the `/js` command. Again, this is a good jumping off point for
diving into the CanaryMod API. diving into the CanaryMod API.
@ -144,7 +144,7 @@ To launch a container with CanaryMod and ScriptCraft you can just do
docker run -p 25565:25565 -it tclavier/scriptcraft docker run -p 25565:25565 -it tclavier/scriptcraft
You can find all files used to build this container in github project : [docker-scriptcraft](https://github.com/tclavier/docker-scriptcraft) You can find all files used to build this container in github project: [docker-scriptcraft](https://github.com/tclavier/docker-scriptcraft)
# Contributing # Contributing
@ -159,7 +159,7 @@ If you would like to contribute source code and/or documentation changes please
ScriptCraft also works with Bukkit Plugin and uses the Bukkit Configuration ScriptCraft also works with Bukkit Plugin and uses the Bukkit Configuration
API. On first loading, ScriptCraft will create a config.yml file in API. On first loading, ScriptCraft will create a config.yml file in
the plugins/scriptcraft/ directory. This file looks like this... the plugins/scriptcraft/ directory. This file looks like this …
extract-js: extract-js:
plugins: true plugins: true
@ -168,17 +168,17 @@ the plugins/scriptcraft/ directory. This file looks like this...
This file allows scriptcraft admins to turn on or off re-unzipping of the `modules`, This file allows scriptcraft admins to turn on or off re-unzipping of the `modules`,
`plugins` and `lib` folders when deploying a new version of `plugins` and `lib` folders when deploying a new version of
scriptcraft. It's strongly recommended that the `lib` directory always ScriptCraft. It's strongly recommended that the `lib` directory always
be set to true to get the latest core scriptcraft code . The modules be set to true to get the latest core ScriptCraft code . The modules
and plugins directories are optional and not part of scriptcraft core. and plugins directories are optional and not part of ScriptCraft core.
# Further Reading # Further Reading
ScriptCraft has [its own website][website] with further information. ScriptCraft has [its own website][website] with further information.
* To get started using ScriptCraft to Learn Javascript, read [The Young Person's Guide to Programming in Minecraft][yp]. * To get started using ScriptCraft to Learn JavaScript, read [The Young Person's Guide to Programming in Minecraft][yp].
* The ScriptCraft [API documentation][api]. * The ScriptCraft [API documentation][api].
* To delve deeper into creating your own minecraft mod for use by others, read [Creating a complete Minecraft Mod in Javascript][mm]. * To delve deeper into creating your own minecraft mod for use by others, read [Creating a complete Minecraft Mod in JavaScript][mm].
* Take a look at some [examples][ex] * Take a look at some [examples][ex]
You can find more information about [ScriptCraft on my blog][blog]. You can find more information about [ScriptCraft on my blog][blog].
@ -187,13 +187,13 @@ You can find more information about [ScriptCraft on my blog][blog].
CoderDojo Athenry have some [excellent tutorials][cda] for younger CoderDojo Athenry have some [excellent tutorials][cda] for younger
programmers who have used [Scratch][scr] and are interested in Modding programmers who have used [Scratch][scr] and are interested in Modding
Minecraft using Javascript. In particular, they have an excellent Minecraft using JavaScript. In particular, they have an excellent
[Scratch - to - Javascript][sj] tutorial which explains Scratch [Scratch - to - JavaScript][sj] tutorial which explains Scratch
programs and how to do the same thing in Javascript. programs and how to do the same thing in JavaScript.
I highly recommend the series of [tutorials provided by CoderDojo Athenry][cda]. I highly recommend the series of [tutorials provided by CoderDojo Athenry][cda].
Developer Chris Cacciatore has created some interesting tools using Scriptcraft... Developer Chris Cacciatore has created some interesting tools using ScriptCraft …
* [A wolf-bot][wb] * [A wolf-bot][wb]
* [L-Systems (Large-scale fractal structures in Minecraft)][ls] * [L-Systems (Large-scale fractal structures in Minecraft)][ls]