Skip to content

Commit 7d81d7a

Browse files
committed
update readme
1 parent 4eec9cb commit 7d81d7a

File tree

2 files changed

+55
-9
lines changed

2 files changed

+55
-9
lines changed

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ MCFPP is a brand new objected-oriented language that can be compiled into Minecr
77
**This project is still in the early stage of development and cannot be used for actual use. Some functions have not been implemented, and features may change in future versions. The library is also not complete.**
88

99
# QuickStart
10-
[MCFPP Guider](https://alumopper.github.io/mcfppguide/en-US/quickstart)
10+
[MCFPP API](https://www.mcfpp.top)
1111
# Relative Projects
1212
## [MCSharp](https://github.com/Voziv/MCSharp)
1313

@@ -34,28 +34,28 @@ JustMCF is a project to simplify mcfunction projects. Using JustMCF, you can not
3434

3535

3636
# Features
37-
## basic logical statements
37+
## Basic logical statements
3838
```
39-
void example(){
40-
int i = @s.pos[0];
39+
func example(){
40+
int i = @s.nbt.pos[0];
4141
if(i > 0){
4242
@s.say("Hello Minecraft!");
4343
}
4444
}
4545
```
46-
## object-oriented programming
46+
## Object-oriented programming
4747
```
4848
class Example{
4949
int i;
5050
public Example(int i){
5151
this.i = i;
5252
}
53-
public void print(){
54-
sys.print(this.i);
53+
public func print(){
54+
print(this.i);
5555
}
5656
}
5757
```
58-
## libraries
58+
## Libraries
5959
```
6060
import mcfpp.math;
6161
@@ -66,3 +66,26 @@ void example{
6666
print(out);
6767
}
6868
```
69+
## Generics
70+
```
71+
class Example<type T>{
72+
T i;
73+
public Example(T i){
74+
this.i = i;
75+
}
76+
public func print(){
77+
print(this.i);
78+
}
79+
}
80+
81+
func test<type T>(T i){
82+
print(i);
83+
}
84+
```
85+
## Original Minecraft Command
86+
```
87+
func test(){
88+
/execute as @a run say Hello Minecraft!
89+
}
90+
```
91+
To see more features, please refer to the [MCFPP API](https://www.mcfpp.top)

README_CN.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ MCFPP是一个能被编译为Minecraft数据包的全新的面向对象的语言
77
**这个项目仍然处于早期的开发阶段中,尚不能用于实际运用。部分功能尚未实现,特性可能会在未来的版本中发生变化。库函数尚不齐全。**
88

99
# 快速开始
10-
[MCFPP Guider](https://alumopper.github.io/mcfppguide/quickstart)
10+
[MCFPP API](https://www.mcfpp.top)
1111

1212
# [更新计划](./TODO_CN.md)
1313
* [ ] 代码优化
@@ -66,3 +66,26 @@ void example{
6666
print(out);
6767
}
6868
```
69+
## 泛型
70+
```
71+
class Example<type T>{
72+
T i;
73+
public Example(T i){
74+
this.i = i;
75+
}
76+
public func print(){
77+
print(this.i);
78+
}
79+
}
80+
81+
func test<type T>(T i){
82+
print(i);
83+
}
84+
```
85+
## 直接使用原版Minecraft命令
86+
```
87+
func test(){
88+
/execute as @a run say Hello Minecraft!
89+
}
90+
```
91+
To see more features, please refer to the [MCFPP API](https://www.mcfpp.top)

0 commit comments

Comments
 (0)