You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
8
8
@@ -21,7 +21,6 @@ English documentation [here](https://github.com/Stevertus/mcscript/blob/master/R
21
21
-[file setup](#files)
22
22
-[Dateien erweitern](#extend)
23
23
-[Command Grouping](#groups)
24
-
-[file](#files)
25
24
-[Variablen](#vars)
26
25
-[Boolean Variablen](#boolean)
27
26
-[Konstanten](#consts)
@@ -450,13 +449,14 @@ Das ist bei 2 dimensionalen Loops sinnvoll:
450
449
<aid="raycast"></a>
451
450
### 3.11 Raycasting
452
451
```
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]
455
454
},{
456
455
[actions for every flight step]
457
456
}
458
457
default distance = 100 Blocks
459
458
default block = air
459
+
default target = any block
460
460
```
461
461
Raycasting ist eine große Sache in Minecraft 1.13 und bietet viele Möglichkeiten.
462
462
Es ist allerdings bisschen schwierig, also warum nicht leichter machen?
@@ -476,6 +476,35 @@ raycast(10) {
476
476
}
477
477
```
478
478
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.
479
508
<aid="while"></a>
480
509
### 3.12 while-Loops
481
510
Der while-Loop ist so zu definieren:
@@ -608,7 +637,7 @@ Auch sind optionale und vordefinierte Argumente verfügbar:
608
637
Es gibt schon einige vordefinierte Modals, die hilfreich sein könnten. Bitte schaue dir dafür die spezifischen Dokumentationen [hier](#) an.
609
638
610
639
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.
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.
8
8
@@ -445,13 +445,14 @@ That makes especially with two-dimensional loops sence:
445
445
<aid="raycast"></a>
446
446
### 3.11 Raycasting
447
447
```
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]
450
450
},{
451
451
[actions for every flight step]
452
452
}
453
453
default distance = 100 Blocks
454
454
default block = air
455
+
default target = any block
455
456
```
456
457
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:
457
458
```
@@ -469,6 +470,35 @@ raycast(10) {
469
470
}
470
471
```
471
472
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.
472
502
<aid="while"></a>
473
503
### 3.12 while loops
474
504
The while loop is defined like so:
@@ -586,13 +616,13 @@ There are optional and predefined arguments, too:
586
616
587
617
say('test')
588
618
# => say test
589
-
619
+
<aid="systemModals"></a>
590
620
### 3.11 System Modals
591
621
592
622
There are already some helpful predefined modals. Please read the specific documentation [here](#).
593
623
594
624
You have ideas which modals should be a standart? Send me your [configuration file](#ownmodal) to check.
0 commit comments