Skip to content

Commit 50dac94

Browse files
committed
0.1.2
1 parent 32a90cf commit 50dac94

36 files changed

+200
-163
lines changed

README-DE.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
![](https://i.imgur.com/YedWe7W.png)
33

44
# Minecraft Script Dokumentation
5-
> Update 0.1: [Alle Änderungen](https://github.com/Stevertus/mcscript/releases)
5+
> Update 0.1.2: [Alle Änderungen](https://github.com/Stevertus/mcscript/releases)
66
77
Minecraft Script ist eine Programmiersprache für Entwickler der mcfunctions, sowie für die Minecraft Map und Package Erschaffer. Die .mcscript Dateien werden dabei zu mcfunction compiled und generiert. Dies bietet dem Entwickler erweiterte Möglichkeiten, wie zum Beispiel Modals, Loops, Variablen, Konstanten und Command-Wrapping.
88

@@ -21,7 +21,6 @@ English documentation [here](https://github.com/Stevertus/mcscript/blob/master/R
2121
- [file setup](#files)
2222
- [Dateien erweitern](#extend)
2323
- [Command Grouping](#groups)
24-
- [file](#files)
2524
- [Variablen](#vars)
2625
- [Boolean Variablen](#boolean)
2726
- [Konstanten](#consts)
@@ -450,13 +449,14 @@ Das ist bei 2 dimensionalen Loops sinnvoll:
450449
<a id="raycast"></a>
451450
### 3.11 Raycasting
452451
```
453-
raycast([distance](optional), [block to travel through](optional)){
454-
[actions on hitted block]
452+
raycast([distance](optional), [block to travel through](optional),entity | block [target](optional) ){
453+
[actions on hitted block or entity]
455454
},{
456455
[actions for every flight step]
457456
}
458457
default distance = 100 Blocks
459458
default block = air
459+
default target = any block
460460
```
461461
Raycasting ist eine große Sache in Minecraft 1.13 und bietet viele Möglichkeiten.
462462
Es ist allerdings bisschen schwierig, also warum nicht leichter machen?
@@ -476,6 +476,35 @@ raycast(10) {
476476
}
477477
```
478478
Jetzt haben wir schöne Effekte und eine maximale Range von 10 Blöcken.
479+
Das zweite optinale Argument gibt die durchlässigen Blöcke an.
480+
```
481+
raycast(10,"air") {
482+
/setblock ~ ~ ~ stone
483+
}
484+
```
485+
Das Raycasting geht also nur durch Luft.
486+
Auch kann man die durchlässigen Blöcke negieren und mit einem "!" angeben, welche Blöcke nicht durchlässig sind:
487+
```
488+
raycast(10,!"white_wool") {
489+
/setblock ~ ~ ~ stone
490+
}
491+
```
492+
Das Raycasting geht also durch alle Blöcke außer weiße Wolle.
493+
494+
Als drittes optionales Argument kann man ein Ziel angeben:
495+
```
496+
raycast(10,"air",block "white_wool") {
497+
/setblock ~ ~ ~ stone
498+
}
499+
```
500+
Jetzt weiß Mcscript, dass das Ziel ein Block ist und führt den Command nur aus, wenn der Block weiße Wolle ist.
501+
```
502+
raycast(10,"air",entity @e[type=armor_stand]) {
503+
/say test
504+
}
505+
```
506+
Mcscript weiß nun, dass das Ziel eine Entity ist und führt den Command als diese aus, wenn sie getroffen wurde.
507+
Also würde der Armor Stand test sagen.
479508
<a id="while"></a>
480509
### 3.12 while-Loops
481510
Der while-Loop ist so zu definieren:
@@ -608,7 +637,7 @@ Auch sind optionale und vordefinierte Argumente verfügbar:
608637
Es gibt schon einige vordefinierte Modals, die hilfreich sein könnten. Bitte schaue dir dafür die spezifischen Dokumentationen [hier](#) an.
609638

610639
Du hast Ideen, welche Modals unbedingt als Standart-Modal aufgegriffen werden müssen? Sende mir einfach die [Konfigurationsdatei](#24_Dev_mcscript_modals_54) zur Überprüfung.
611-
640+
<a id="ide"></a>
612641
## IDEs und Syntax Highlighting
613642

614643

README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Minecraft Script Documentation
44
==============================
5-
> Update 0.1: [All Changes](https://github.com/Stevertus/mcscript/releases)
5+
> Update 0.1.2: [All Changes](https://github.com/Stevertus/mcscript/releases)
66
77
Minecraft Script is a programming language for developers of mcfunctions, Minecraft maps and packages. The .mcscript files are therefore compiled and generated to the function format. This enables the developer extended possibilities, such as Modals, Loops, Varibles, Constants and Command-Wrapping.
88

@@ -445,13 +445,14 @@ That makes especially with two-dimensional loops sence:
445445
<a id="raycast"></a>
446446
### 3.11 Raycasting
447447
```
448-
raycast([distance](optional), [block to travel through](optional)){
449-
[actions on hitted block]
448+
raycast([distance](optional), [block to travel through](optional),entity | block [target](optional) ){
449+
[actions on hitted block or entity]
450450
},{
451451
[actions for every flight step]
452452
}
453453
default distance = 100 Blocks
454454
default block = air
455+
default target = any block
455456
```
456457
Raycasting is a big thing in Minecraft 1.13 and provides unlimeted opportunities. But it is a bit difficult, so why not making it easier? With Minecraft Script this is really really easy now:
457458
```
@@ -469,6 +470,35 @@ raycast(10) {
469470
}
470471
```
471472
Now there are beautiful effects and a max range of 10 blocks.
473+
The second argument sets the porous blocks.
474+
```
475+
raycast(10,"air") {
476+
/setblock ~ ~ ~ stone
477+
}
478+
```
479+
So the ray only goes through air.
480+
You can also negate the porous blocks and set with a "!" the not porous blocks:
481+
```
482+
raycast(10,!"white_wool") {
483+
/setblock ~ ~ ~ stone
484+
}
485+
```
486+
The ray goes through all blocks, but white wool.
487+
488+
As third optional argument a target can be set:
489+
```
490+
raycast(10,"air",block "white_wool") {
491+
/setblock ~ ~ ~ stone
492+
}
493+
```
494+
Now Mcscript knows that the target is a block and executes the command only if the block is white wool.
495+
```
496+
raycast(10,"air",entity @e[type=armor_stand]) {
497+
/say test
498+
}
499+
```
500+
Now Mcscript knows that the target is an entity and executes as the entity if it´s hitted.
501+
So the armor stand would say test.
472502
<a id="while"></a>
473503
### 3.12 while loops
474504
The while loop is defined like so:
@@ -586,13 +616,13 @@ There are optional and predefined arguments, too:
586616

587617
say('test')
588618
# => say test
589-
619+
<a id="systemModals"></a>
590620
### 3.11 System Modals
591621

592622
There are already some helpful predefined modals. Please read the specific documentation [here](#).
593623

594624
You have ideas which modals should be a standart? Send me your [configuration file](#ownmodal) to check.
595-
625+
<a id="ide"></a>
596626
## IDEs and Syntax Highlighting
597627

598628
> Not available yet

_changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11

22
Minecraft Script Changes
33
==============================
4-
4+
### v0.1.2
5+
* changed: fixed asat to "at @s"
6+
* changed: raycasting is more accurate
7+
* changed raycast performance
8+
* added a not block operator for Raycasting
9+
* added raycast entity option
10+
* added raycast target option
511
## v0.1
612
* added a changelog
713
* added table of contents for documentation

examples/functions/basic_loop.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#######
2-
# Compiled from .//functions/basic Loop.mcscript
3-
# to .//functions/basic_loop.mcfunction
2+
# Compiled from /examples/functions/basic Loop.mcscript
3+
# to .//examples/functions/basic_loop.mcfunction
44
#
55
# Generated by Minecraft Script for 1.13
66
######

examples/functions/basic_modal.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#######
2-
# Compiled from .//functions/basic Modal.mcscript
3-
# to .//functions/basic_modal.mcfunction
2+
# Compiled from /examples/functions/basic Modal.mcscript
3+
# to .//examples/functions/basic_modal.mcfunction
44
#
55
# Generated by Minecraft Script for 1.13
66
######

examples/functions/boolean.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#######
2-
# Compiled from .//functions/boolean.mcscript
3-
# to .//functions/boolean.mcfunction
2+
# Compiled from /examples/functions/boolean.mcscript
3+
# to .//examples/functions/boolean.mcfunction
44
#
55
# Generated by Minecraft Script for 1.13
66
######

examples/functions/consts.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#######
2-
# Compiled from .//functions/consts.mcscript
3-
# to .//functions/consts.mcfunction
2+
# Compiled from /examples/functions/consts.mcscript
3+
# to .//examples/functions/consts.mcfunction
44
#
55
# Generated by Minecraft Script for 1.13
66
######
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#######
2-
# Compiled from .//functions/do-while-Loops.mcscript
3-
# to .//functions/dowhile.mcfunction
2+
# Compiled from /examples/functions/do-while-Loops.mcscript
3+
# to .//examples/functions/dowhile.mcfunction
44
#
55
# Generated by Minecraft Script for 1.13
66
######
7-
function :mcscript/dowhile3
7+
function examples:mcscript/dowhile1

examples/functions/fileloop/1.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#######
2-
# Compiled from .//functions/file Loop.mcscript
3-
# to .//functions/fileloop/1.mcfunction
2+
# Compiled from /examples/functions/file Loop.mcscript
3+
# to .//examples/functions/fileloop/1.mcfunction
44
#
55
# Generated by Minecraft Script for 1.13
66
######

examples/functions/fileloop/2.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#######
2-
# Compiled from .//functions/file Loop.mcscript
3-
# to .//functions/fileloop/2.mcfunction
2+
# Compiled from /examples/functions/file Loop.mcscript
3+
# to .//examples/functions/fileloop/2.mcfunction
44
#
55
# Generated by Minecraft Script for 1.13
66
######

0 commit comments

Comments
 (0)