Skip to content

Commit 080c0ac

Browse files
committed
added unless, in and Math
1 parent a2aa407 commit 080c0ac

File tree

14 files changed

+1998
-1392
lines changed

14 files changed

+1998
-1392
lines changed

_changelog.md

Lines changed: 87 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,102 @@
1+
# Minecraft Script Changes
12

2-
Minecraft Script Changes
3-
==============================
43
> Update your Version by running: `npm install -g mcscript@latest`
4+
5+
### v0.2.3
6+
7+
This will be the last update for mcscript fixing the most crucial bugs and simple requests. Thank you so much for all your support, all users of mcscript and the contributers for this update.
8+
9+
- added: A new unless keyword which does the same as the if keyword, but negates the condition
10+
- added: aside console the Javascript Math object is now also accessible in the modaljs block
11+
512
### v0.2.2
6-
* added: log.var core modal and documentation
7-
* fixed: watch did not reset variables, modals and booleans on recompile
13+
14+
- added: log.var core modal and documentation
15+
- fixed: watch did not reset variables, modals and booleans on recompile
16+
817
### v0.2.1
9-
* added: new JavaScript Modal [here](https://github.com/Stevertus/mcscript#modaljs) by cblech.
10-
* added: Map const type
11-
* added: Array const type
12-
* new structured documentation at [stevertus.com/mcscript/documentation](https://stevertus.com/mcscript/documentation)
13-
* refactored the code
14-
* fixed: extend bugs. I am very sorry that this took so long :(
15-
* fixed: forEach operation
18+
19+
- added: new JavaScript Modal [here](https://github.com/Stevertus/mcscript#modaljs) by cblech.
20+
- added: Map const type
21+
- added: Array const type
22+
- new structured documentation at [stevertus.com/mcscript/documentation](https://stevertus.com/mcscript/documentation)
23+
- refactored the code
24+
- fixed: extend bugs. I am very sorry that this took so long :(
25+
- fixed: forEach operation
26+
1627
### v0.2
28+
1729
This is the first full release version of Minecraft Script! The language has all the necessary features now. I am open for new suggestions nevertheless.
18-
* added: a brand new error handling system. If you find some nonsense errors please report an issue and I will fix it.
19-
* added: the function and run function feature. Read more about its capabilities [here](https://github.com/Stevertus/mcscript#functions).
20-
* added: a few more debugging options with the debug keyword. Read more [here](https://github.com/Stevertus/mcscript#debugging).
21-
* added: a -fullErr flag for compile and watch to see full Errors and files references
22-
* changed: if an execute command is generated after an execute command they will be combined now.
23-
* changed: if an error accures in a file you will be notified and the other files generate nevertheless.
24-
* fixed: an load.mcfunction issue that it generates random stuff sometimes
25-
* fixed: modal calls inside modals should work again (thanks to coolsa)
26-
* fixed: the watch mode crashes no longer if an error accures
27-
* fixed: if a #file tag was added after commands the compiler used to create a file with the name of the first command
30+
31+
- added: a brand new error handling system. If you find some nonsense errors please report an issue and I will fix it.
32+
- added: the function and run function feature. Read more about its capabilities [here](https://github.com/Stevertus/mcscript#functions).
33+
- added: a few more debugging options with the debug keyword. Read more [here](https://github.com/Stevertus/mcscript#debugging).
34+
- added: a -fullErr flag for compile and watch to see full Errors and files references
35+
- changed: if an execute command is generated after an execute command they will be combined now.
36+
- changed: if an error accures in a file you will be notified and the other files generate nevertheless.
37+
- fixed: an load.mcfunction issue that it generates random stuff sometimes
38+
- fixed: modal calls inside modals should work again (thanks to coolsa)
39+
- fixed: the watch mode crashes no longer if an error accures
40+
- fixed: if a #file tag was added after commands the compiler used to create a file with the name of the first command
41+
2842
### v0.1.5
29-
* added: multiline comments
30-
* added: global variables and `.gl.mcscript` files | Take a look at the documentation.
31-
* added: save the command response in a variable `var test = run: command`
32-
* added: a replace function on constant values and modals.
33-
* added: override keyword to change old modals
34-
* fixed: the common asat issue, should run now
35-
* fixed: while declaring the same variable twice, nothing generates
36-
* changed: the watch feature. Now it generates all files on change, not only the changed
37-
* changed the overall variable handling (but outputs are the same)
43+
44+
- added: multiline comments
45+
- added: global variables and `.gl.mcscript` files | Take a look at the documentation.
46+
- added: save the command response in a variable `var test = run: command`
47+
- added: a replace function on constant values and modals.
48+
- added: override keyword to change old modals
49+
- fixed: the common asat issue, should run now
50+
- fixed: while declaring the same variable twice, nothing generates
51+
- changed: the watch feature. Now it generates all files on change, not only the changed
52+
- changed the overall variable handling (but outputs are the same)
3853

3954
### v0.1.4
40-
* added: a `mcscript add` package command
41-
* reduced file size
55+
56+
- added: a `mcscript add` package command
57+
- reduced file size
4258

4359
### v0.1.3
44-
* added: Minecraft Cam datapack modals
45-
* added: Core Modal documentation
46-
* changed: the load.mcscript will automaticly generate the mcscript/load file and execute it
47-
* changed: the corresponding file generator for load.mcscript
48-
* changed: . are now allowed in variable names
49-
* changed: the mcscript folder will be automaticly deleted! save important files!!
50-
* fixed: the forWeb.js file
60+
61+
- added: Minecraft Cam datapack modals
62+
- added: Core Modal documentation
63+
- changed: the load.mcscript will automaticly generate the mcscript/load file and execute it
64+
- changed: the corresponding file generator for load.mcscript
65+
- changed: . are now allowed in variable names
66+
- changed: the mcscript folder will be automaticly deleted! save important files!!
67+
- fixed: the forWeb.js file
5168

5269
### v0.1.2
53-
* changed: fixed asat to "at @s"
54-
* changed: raycasting is more accurate
55-
* changed raycast performance
56-
* added a not block operator for Raycasting
57-
* added raycast entity option
58-
* added raycast target option
59-
* added Nodepad++ Highlighting
70+
71+
- changed: fixed asat to "at @s"
72+
- changed: raycasting is more accurate
73+
- changed raycast performance
74+
- added a not block operator for Raycasting
75+
- added raycast entity option
76+
- added raycast target option
77+
- added Nodepad++ Highlighting
78+
6079
## v0.1.1
61-
* fixed: forEach function was written uppercase, which is not allowed by Minecraft
62-
* fixed: raycast score didn´t reset and messed up
63-
* added: now cases can accept a direct value instead of "== [value]"
80+
81+
- fixed: forEach function was written uppercase, which is not allowed by Minecraft
82+
- fixed: raycast score didn´t reset and messed up
83+
- added: now cases can accept a direct value instead of "== [value]"
84+
6485
## v0.1
65-
* added a changelog
66-
* added table of contents for documentation
67-
* modified documentation
68-
* added asat([selector]) wrapper
69-
* added var++ and var--
70-
* added new modal play()
71-
* changed: while executes only if the statement at entry is true now
72-
* added do-while loop
73-
* added forEach loop
74-
* added a raycast feature
75-
* added boolean variables (tags) and if check
76-
* changed: selector behaviour with variables
77-
* added a custom scripts folder for all files
78-
* added a switch functionality
79-
____
86+
87+
- added a changelog
88+
- added table of contents for documentation
89+
- modified documentation
90+
- added asat([selector]) wrapper
91+
- added var++ and var--
92+
- added new modal play()
93+
- changed: while executes only if the statement at entry is true now
94+
- added do-while loop
95+
- added forEach loop
96+
- added a raycast feature
97+
- added boolean variables (tags) and if check
98+
- changed: selector behaviour with variables
99+
- added a custom scripts folder for all files
100+
- added a switch functionality
101+
102+
---

examples/functions/foreach.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
######
77
# basic loop
88
scoreboard players set i i 0
9-
execute if score i i matches ..9 run function examples:mcscript/foreach2
9+
execute if score i i matches ..9 run function examples:mcscript/foreach4
1010
# faculty
1111
scoreboard players set result result 1
1212
scoreboard players set j j 2
13-
execute if score j j matches ..10 run function examples:mcscript/foreach3
13+
execute if score j j matches ..10 run function examples:mcscript/foreach5

examples/functions/mcscript/foreach5.mcfunction

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Generated by Minecraft Script for 1.13
66
######
7-
say hey
8-
scoreboard players add i i 1
9-
execute if entity @s[tag=!mcscriptStop] if score i i matches ..9 run function examples:mcscript/foreach5
7+
scoreboard players operation result result *= i i
8+
scoreboard players add j j 1
9+
execute if entity @s[tag=!mcscriptStop] if score j j matches ..10 run function examples:mcscript/foreach5
1010
tag @s[tag=mcscriptStop] remove mcscriptStop

examples/functions/mcscript/load.mcfunction

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ scoreboard objectives add mcscript_raycast dummy
2323
# please do not touch this file!
2424
# it is used by the compiler!
2525
scoreboard objectives add test dummy
26+
27+
# Extended from /examples/functions/forEach.mcscript
28+
# to examples/functions/mcscript/load.mcfunction
29+
# please do not touch this file!
30+
# it is used by the compiler!
31+
scoreboard objectives add i dummy
32+
scoreboard objectives add result dummy
33+
scoreboard objectives add j dummy

function examples

Whitespace-only changes.

0 commit comments

Comments
 (0)