22
33import net .minecraft .client .MinecraftClient ;
44import net .minecraft .text .Text ;
5- import net .minecraft .world .World ;
65
76import java .util .ArrayList ;
87
@@ -13,11 +12,14 @@ public class TutorialManager {
1312
1413 public static ArrayList <TutorialPoint > checkpoints ;
1514
16- public static void startTutorial () {
15+ public static void preTutorial () {
1716 isEnabled = true ;
1817 checkpoints = new ArrayList <>();
19- StartTutorial ();
18+ }
19+
20+ public static void startFullTutorial () {
2021 pullText ("Включите частицы в настройках и направляйтесь в путь по ним." );
22+ startPNTutorial ();
2123 }
2224
2325 public static void stopTutorial () {
@@ -32,14 +34,16 @@ public static void skipTutorial() {
3234 Runnable action = checkpoints .getLast ().action ;
3335 checkpoints .clear ();
3436 action .run ();
35- pullText ("Часть скипнута" );
3637 }
3738
3839 private static void pullText (String text ) {
3940 MinecraftClient .getInstance ().player .sendMessage (Text .literal (text ));
4041 }
4142
42- private static void StartTutorial () {
43+ public static void startPNTutorial () {
44+ if (!isEnabled || checkpoints == null ) {
45+ preTutorial ();
46+ }
4347 checkpoints .add (new TutorialPoint (18 , 81 , 16 , OVERWORLD , null , false ));
4448 checkpoints .add (new TutorialPoint (14 , 81 , 22 , OVERWORLD , null , false ));
4549 checkpoints .add (new TutorialPoint (11 , 81 , 28 , OVERWORLD , null , false ));
@@ -51,7 +55,10 @@ private static void PNAction() {
5155 startCIKTutorial ();
5256 }
5357
54- private static void startCIKTutorial () {
58+ public static void startCIKTutorial () {
59+ if (!isEnabled || checkpoints == null ) {
60+ preTutorial ();
61+ }
5562 checkpoints .add (new TutorialPoint (10 , 81 , 30 , OVERWORLD , null , false ));
5663 checkpoints .add (new TutorialPoint (6 , 81 , 23 , OVERWORLD , null , false ));
5764 checkpoints .add (new TutorialPoint (0 , 81 , 19 , OVERWORLD , null , false ));
@@ -68,7 +75,10 @@ private static void CIKAction() {
6875 startBankTutorial ();
6976 }
7077
71- private static void startBankTutorial () {
78+ public static void startBankTutorial () {
79+ if (!isEnabled || checkpoints == null ) {
80+ preTutorial ();
81+ }
7282 checkpoints .add (new TutorialPoint (-31 , 78 , -17 , OVERWORLD , null , false ));
7383 checkpoints .add (new TutorialPoint (-30 , 78 , -26 , OVERWORLD , null , false ));
7484 checkpoints .add (new TutorialPoint (-29 , 75 , -34 , OVERWORLD , null , false ));
@@ -84,7 +94,10 @@ private static void BankAction() {
8494 startGalleryTutorial ();
8595 }
8696
87- private static void startGalleryTutorial () {
97+ public static void startGalleryTutorial () {
98+ if (!isEnabled || checkpoints == null ) {
99+ preTutorial ();
100+ }
88101 checkpoints .add (new TutorialPoint (-22 , 72 , -67 , OVERWORLD , null , false ));
89102 checkpoints .add (new TutorialPoint (-17 , 71 , -68 , OVERWORLD , null , false ));
90103 checkpoints .add (new TutorialPoint (-10 , 71 , -72 , OVERWORLD , null , false ));
@@ -108,7 +121,10 @@ private static void GalleryAction() {
108121 startLawCourtTutorial ();
109122 }
110123
111- private static void startLawCourtTutorial () {
124+ public static void startLawCourtTutorial () {
125+ if (!isEnabled || checkpoints == null ) {
126+ preTutorial ();
127+ }
112128 checkpoints .add (new TutorialPoint (59 , 50 , -166 , OVERWORLD , null , false ));
113129 checkpoints .add (new TutorialPoint (59 , 50 , -154 , OVERWORLD , null , false )); // Написать поднимайтесь наверх
114130 checkpoints .add (new TutorialPoint (59 , 64 , -147 , OVERWORLD , null , false ));
@@ -129,12 +145,16 @@ private static void startLawCourtTutorial() {
129145 checkpoints .add (new TutorialPoint (16 , 79 , -27 , OVERWORLD , TutorialManager ::LawCourtAction , true ));
130146
131147 }
148+
132149 private static void LawCourtAction () {
133150 pullText ("Вы пришли в суд" );
134151 startGoToHell ();
135152 }
136153
137- private static void startGoToHell () {
154+ public static void startGoToHell () {
155+ if (!isEnabled || checkpoints == null ) {
156+ preTutorial ();
157+ }
138158 checkpoints .add (new TutorialPoint (16 , 79 , -24 , OVERWORLD , null , false ));
139159 checkpoints .add (new TutorialPoint (10 , 80 , -18 , OVERWORLD , null , false ));
140160 checkpoints .add (new TutorialPoint (8 , 81 , -12 , OVERWORLD , null , false ));
@@ -153,7 +173,10 @@ private static void HellAction() {
153173 startGoToEndAndTalkAboutTrade ();
154174 }
155175
156- private static void startGoToEndAndTalkAboutTrade () {
176+ public static void startGoToEndAndTalkAboutTrade () {
177+ if (!isEnabled || checkpoints == null ) {
178+ preTutorial ();
179+ }
157180 checkpoints .add (new TutorialPoint (-17 , 137 , 14 , NETHER , null , false ));
158181 checkpoints .add (new TutorialPoint (-18 , 136 , 10 , NETHER , null , false ));
159182 checkpoints .add (new TutorialPoint (-23 , 131 , 0 , NETHER , null , false ));
@@ -205,7 +228,10 @@ private static void EndAction() {
205228 goToFSB ();
206229 }
207230
208- private static void goToFSB () {
231+ public static void goToFSB () {
232+ if (!isEnabled || checkpoints == null ) {
233+ preTutorial ();
234+ }
209235 checkpoints .add (new TutorialPoint (11 , 81 , 25 , OVERWORLD , null , false ));
210236 checkpoints .add (new TutorialPoint (12 , 81 , 32 , OVERWORLD , null , false ));
211237 checkpoints .add (new TutorialPoint (14 , 80 , 44 , OVERWORLD , null , false ));
@@ -226,7 +252,10 @@ private static void FSBAction() {
226252 goToBiblioteka ();
227253 }
228254
229- private static void goToBiblioteka () {
255+ public static void goToBiblioteka () {
256+ if (!isEnabled || checkpoints == null ) {
257+ preTutorial ();
258+ }
230259 checkpoints .add (new TutorialPoint (-1 , 71 , 110 , OVERWORLD , null , false ));
231260 checkpoints .add (new TutorialPoint (-7 , 71 , 109 , OVERWORLD , null , false ));
232261 checkpoints .add (new TutorialPoint (11 , 71 , 106 , OVERWORLD , null , false ));
@@ -271,7 +300,10 @@ private static void BibliotekaAction() {
271300 goToSpawn ();
272301 }
273302
274- private static void goToSpawn () {
303+ public static void goToSpawn () {
304+ if (!isEnabled || checkpoints == null ) {
305+ preTutorial ();
306+ }
275307 checkpoints .add (new TutorialPoint (-105 , 71 , 124 , OVERWORLD , null , false ));
276308 checkpoints .add (new TutorialPoint (-104 , 71 , 118 , OVERWORLD , null , false ));
277309 checkpoints .add (new TutorialPoint (-102 , 71 , 112 , OVERWORLD , null , false ));
0 commit comments