@@ -4,11 +4,119 @@ This is a guide to help users migrate from the `v1.y.z` to `v2.y.z`.
4
4
???+ info
5
5
The ` v2.y.z ` is not yet officially out and is still in the devlopment phase!
6
6
7
+ ## Library rename
8
+
9
+ The biggest change of all, the rename of the library from ` MultiCrater Lib ` to ` omnicrafter ` .
10
+
11
+ === "Dependency"
12
+ You will have to update your ` mod.json ` and change the name of the dependency.
13
+
14
+ ```diff
15
+ - "dependencies": ["multi-crafter"]
16
+ + "dependencies": ["omnicrafter"]
17
+ ```
18
+
19
+ === "Injection"
20
+ ???+ info inline end
21
+ This repo doesn't exist because the rename didn't occured yet!
22
+ ##### Step 1
23
+ You will have to download a zip, named ` omnicrafter-injection.zip ` , in [ here] ( https://github.com/liplum/omnicrafter/releases/latest ) .
24
+
25
+ ##### Step 2
26
+ Unzip the downloaded zip and copy its contents into the root directory of your mod.
27
+
28
+ <details>
29
+ <summary>
30
+ Unzip will add essential files into the root directory.
31
+ <br>
32
+ Please pay attention to your structure and avoid secondary directory in your mod zip.
33
+ </summary>
34
+ Suppose your have this structure:
35
+
36
+ - Before unzip:
37
+ ```
38
+ your-mod/
39
+ ├─ content/
40
+ | ├─ crafter.hjson
41
+ ├─ mod.hjson
42
+ ├─ icon.png
43
+ ```
44
+
45
+ - After unzip:
46
+ ```
47
+ your-mod/
48
+ ├─ multicrafter/
49
+ ├─ scripts/
50
+ | ├─ multi-crafter/
51
+ | | ├─ lib.js
52
+ ├─ content/
53
+ | ├─ crafter.hjson
54
+ ├─ mod.hjson
55
+ ├─ icon.png
56
+ ├─ classes.dex
57
+ ```
58
+
59
+ MultiCrafter injection doesn't work when you zip your mod folder in a wrong way
60
+ where have created a secondary directory.
61
+
62
+ Suppose you had a mod zip, named `your-mod.zip`.
63
+
64
+ - This will work.
65
+ In your-mod.zip, there are...
66
+ ```
67
+ multicrafter/
68
+ scripts/
69
+ content/
70
+ mod.hjson
71
+ icon.png
72
+ ```
73
+
74
+ - But this will not.
75
+ In your-mod.zip, there are...
76
+ ```
77
+ your-mod/
78
+ ├─ multicrafter/
79
+ ├─ scripts/
80
+ ├─ content/
81
+ ├─ mod.hjson
82
+ ├─ icon.png
83
+ ```
84
+
85
+ If you're using `ZArchiver` app, you could multi-select the each file inside your mod folder
86
+ and zip them all into one.
87
+ </details>
88
+
89
+ ##### Step 3
90
+ Then modify this line in your `mod.[h]json`:
91
+
92
+ ```diff
93
+ - "main": "MultiCrafterAdapter"
94
+ + "main": "OmnicrafterAdapter"
95
+ ```
96
+
97
+ === "Jitpack (Java)"
98
+ You will have to update your ` build.gradle(.kts) ` and change the name of the library.
99
+
100
+ === "Groovy"
101
+ ```diff
102
+ dependencies {
103
+ - implementation 'com.github.liplum:MultiCrafterLib:<version>'
104
+ + implementation 'com.github.liplum:omnicrafter:<version>'
105
+ }
106
+ ```
107
+ === "Kotlin"
108
+ ```diff
109
+ dependencies {
110
+ - implementation("com.github.liplum:MultiCrafterLib:<version>")
111
+ + implementation("com.github.liplum:omnicrafter:<version>")
112
+ }
113
+ ```
114
+
7
115
## Nullary Constructor (Java)
8
116
9
117
The class ` Recipe ` and ` IOEntry ` now use nullary constructor.
10
118
11
- ??? example "Example: Before"
119
+ ???+ example "Example: Before"
12
120
```java
13
121
new Recipe(
14
122
new IOEntry(
@@ -25,7 +133,7 @@ The class `Recipe` and `IOEntry` now use nullary constructor.
25
133
120f
26
134
)
27
135
```
28
- ??? example "Example: After"
136
+ ???+ example "Example: After"
29
137
```java
30
138
new Recipe() {{
31
139
input = new IOEntry() {{
@@ -46,7 +154,7 @@ The class `Recipe` and `IOEntry` now use nullary constructor.
46
154
47
155
Instead of using ` Seq<Stack[]> ` we now simply use ` Stack[] ` . It only impacts the variables in the ` IOEntry ` class (` items ` , ` fluids ` and ` payloads ` ).
48
156
49
- ??? example "Example: Before"
157
+ ???+ example "Example: Before"
50
158
```java
51
159
input = new IOEntry() {{
52
160
items = Seq.with(
@@ -59,7 +167,7 @@ Instead of using `Seq<Stack[]>` we now simply use `Stack[]`. It only impacts the
59
167
);
60
168
}};
61
169
```
62
- ??? example "Example: After"
170
+ ???+ example "Example: After"
63
171
```java
64
172
input = new IOEntry() {{
65
173
items = ItemStack.with(Items.copper, 1);
@@ -68,28 +176,3 @@ Instead of using `Seq<Stack[]>` we now simply use `Stack[]`. It only impacts the
68
176
liquids = LiquidStack.with(Liquids.water, 1f);
69
177
}};
70
178
```
71
-
72
-
73
- <!-- === "Dependency"
74
- === "JSON"
75
- yes
76
-
77
- === "JavaScript"
78
- h
79
-
80
- === "Java"
81
- i
82
-
83
- === "Injection"
84
- === "JSON"
85
- yes
86
-
87
- === "JavaScript"
88
- h
89
-
90
- === "Java"
91
- i
92
-
93
- === "Jitpack"
94
- ???+ info
95
- This is Java only! -->
0 commit comments