Added blocks.slime, barrier, trapdoor_iron, prismarine, sunflower

This commit is contained in:
walterhiggins 2015-02-15 13:10:17 +00:00
parent 78ae505504
commit d083da049a
3 changed files with 57 additions and 16 deletions

View file

@ -1012,9 +1012,11 @@ events.on( Packages.net.canarymod.hook.player.BlockDestroyHook, function( evt, c
```
The `this` keyword when used inside the callback function refers to
the Listener object created by ScriptCraft. It has a single method
`unregister()` which can be used to stop listening. This is the same
object which is returned by the `events.on()` function.
the Listener object created by ScriptCraft. It has 2 methods
`unregister()` which can be used to stop listening and `cancel()`
which can be used to cancel the current event. The object returned by
`events.on()` only has the `unregister()` method, the `cancel()`
method is only available from within the event handling function.
To unregister a listener *outside* of the listener function...

View file

@ -130,8 +130,7 @@ For more information on CanaryMod's Permissions and Groups see the following:
## Configuring your Server (optional)
Once you've installed CanaryMod, depending on your specific needs,
you might want to consider setting the following properties in the
`server.cfg` or `config/worlds/<worldName>/<worldName>.cfg` files ...
you might want to consider setting the following properties in the `server.cfg` or `config/worlds/<worldName>/<worldName>.cfg` files ...
# completely flat worlds are best for building from scratch
level-type=FLAT
@ -666,25 +665,27 @@ things...
compare the ages of your friends or siblings to your own age.
## More fun with `true` or `false`
TODO: This needs to be changed for CanaryMod
You can find out if you can Fly in minecraft by typing the following statement ...
/js self.allowFlight
/js self.getCapabilities().mayFly()
... the result will be `true` or `false` depending on whether you can
fly or not. You can turn on and off your ability to fly by setting
your `allowFlight` property to `true` or `false`. Try it...
your `mayFly` property to `true` or `false`. Try it ...
/js self.allowFlight = true
/js self.getCapabilities().setMayFly(true)
/js self.updateCapabilities()
... Now you can fly! To turn off flight ...
/js self.allowFlight = false
/js self.getCapabilities().setMayFly(false)
/js self.setFlying(false)
/js self.updateCapabilities()
... and you come crashing down to earth. This is just one example of
how `true` and `false` are used throughout ScriptCraft - these are
called `boolean` values - named after [George Boole][boole], a 19th Century
how `true` and `false` are used throughout ScriptCraft &ndash; these are
called `boolean` values &ndash; named after [George Boole][boole], a 19th Century
Maths Professor at University College Cork. There are plenty more
examples of boolean values in Minecraft. You can find out if monsters
are allowed in your minecraft world by typing the following

View file

@ -241,6 +241,13 @@ var blocks = {
stained_clay: {
white: 159 // All other colors added below
},
slime: 165,
barrier: 166,
trapdoor_iron: 167,
prismarine: 168,
prismarine_brick: '168:1',
prismarine_dark: '168:2',
sealantern: 169,
hay: 170,
carpet: {
white: 171 // All other colors added below
@ -249,7 +256,38 @@ var blocks = {
coal_block: 173,
packed_ice: 174,
double_plant: 175,
bonemeal: '351:15'
sunflower: 175,
flower: {
sunflower: 175,
lilac: '175:1',
tallgrass: '175:2',
fern: '175:3',
rosebush: '175:4',
peony: '175:5',
yellow: 37,
dandelion: 37,
rose: 38,
red: 38
},
bonemeal: '351:15',
banner: {
standing: 176,
wallmounted: 177
},
gate: {
spruce: 183,
birch: 184,
jungle: 185,
oak: 186,
acacia: 187
},
fence: {
spruce: 188,
birch: 189,
jungle: 190,
oak: 191,
acacia: 192
}
};
// Add all available colors to colorized block collections