Skip to content

Commit 4ec14f8

Browse files
committed
v0.2.3 fixed watch reset variables
1 parent 91dea9c commit 4ec14f8

21 files changed

+372
-67
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ node_modules
22
package-lock.json
33
lib/modals/cam.mcscript
44
examples - Kopie
5-
examples
5+
examples/function
6+
#examples
67
mcscript.tmlanguage.json
78
Nodepad++ Highlighter.xml
8-
_changelog.md
9-
Core Modals.md
9+
#_changelog.md
10+
#Core Modals.md
1011
*.html
11-
README-DE.md
12+
#README-DE.md
1213
.bat

.vscode/launch.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

Core Modals.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,24 @@
77

88
` this | or that`
99
### console
10-
> `log( - text <string | number> - , [entity] )`
11-
### ToDo
12-
Logges into a console for the Minecraft Chat
10+
> `log( - text <string | number> - , [target entity] )`
11+
12+
Logs a message into the Minecraft Chat.
13+
14+
### log variable
15+
> `log.var( - objective <string> - , [entityname], [target entity] )`
16+
17+
Logs a variable into the Minecraft Chat.
18+
19+
### newStand
20+
> `newStand( [name] , [position], [tags], [marker], [invisible], [noGravity] )`
21+
22+
Summons a new armor_stand with opional parameters.
23+
24+
### play
25+
> `play(- sound_name - <String>, [target entiy] [type] )`
26+
27+
Plays a sound
1328
## Minecraft Cam Modals
1429
These are integrated Modals from my Camera Datapack for Mapmaking.
1530
Install it [here](https://github.com/Stevertus/McCam).

_changelog.md

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

22
Minecraft Script Changes
33
==============================
4-
> Update your Version by running: `npm install -g mcscript@`
4+
> Update your Version by running: `npm install -g mcscript@latest`
5+
### v0.2.2
6+
* added: log.var core modal and documentation
7+
* fixed: watch did not reset variables, modals and booleans on recompile
58
### v0.2.1
69
* added: new JavaScript Modal [here](https://github.com/Stevertus/mcscript#modaljs) by cblech.
710
* added: Map const type
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#######
2+
# Compiled from /examples/functions/arrays.mcscript
3+
# to .//examples/functions/arrays.mcfunction
4+
#
5+
# Generated by Minecraft Script for 1.13
6+
######
7+
8+
say value
9+
say no value2
10+
11+
# calling it with Inline Array
12+
say value
13+
# with defaults
14+
15+
say value
16+
say value2

examples/functions/maps.mcfunction

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#######
2+
# Compiled from /examples/functions/maps.mcscript
3+
# to .//examples/functions/maps.mcfunction
4+
#
5+
# Generated by Minecraft Script for 1.13
6+
######
7+
8+
say value
9+
say no value2
10+
11+
say undefined
12+
13+
say value
14+
say undefined
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#######
2+
# Compiled from /examples/functions/raycasting.mcscript
3+
# to examples/functions/mcscript/raycast1.mcfunction
4+
#
5+
# Generated by Minecraft Script for 1.13
6+
######
7+
particle flame ~ ~ ~
8+
scoreboard players add raycast1 mcscript_raycast 1
9+
execute positioned ^ ^ ^1 unless block ~ ~ ~ air run tag @s add mcscriptStop
10+
execute positioned ^ ^ ^1 if entity @s[tag=!mcscriptStop] if block ~ ~ ~ air if score raycast1 mcscript_raycast matches ..10 run function examples:mcscript/raycast1
11+
execute if score raycast1 mcscript_raycast matches ..10 if entity @s[tag=mcscriptStop] positioned ^ ^ ^1 run setblock ~ ~ ~ stone
12+
tag @s[tag=mcscriptStop] remove mcscriptStop
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#######
2+
# Compiled from /examples/functions/while-Loops.mcscript
3+
# to examples/functions/mcscript/while2.mcfunction
4+
#
5+
# Generated by Minecraft Script for 1.13
6+
######
7+
tellraw @a [{"text":"console => ","color":"aqua"},{"text":"commands","color":"white"}]
8+
execute if entity @s[tag=!mcscriptStop] if entity @s[tag=loop] run function examples:mcscript/while2
9+
tag @s[tag=mcscriptStop] remove mcscriptStop

examples/scripts/arrays.mcscript

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const arr = Array{
2+
"value",
3+
"value2"
4+
}
5+
/say $(arr).0
6+
7+
/say $(arr).1.replace("value","no value")
8+
9+
// with modal
10+
modal testMap(args){
11+
/say $(args).0
12+
}
13+
# calling it with Inline Array
14+
testMap(Array{"value"})
15+
16+
# with defaults
17+
modal defaultMap(args = Array{"value"}){
18+
/say $(args).0
19+
}
20+
defaultMap()
21+
defaultMap(Array{
22+
"value2"
23+
})

0 commit comments

Comments
 (0)