Skip to content

Commit a8f2853

Browse files
authored
Add files via upload
1 parent 6540905 commit a8f2853

File tree

4 files changed

+37
-8
lines changed

4 files changed

+37
-8
lines changed

src/main/java/furnygo/arttp/ArtTpConfigModel.java

+9-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ public class ArtTpConfigModel {
99
public boolean isActive = false;
1010
public boolean clientSideTeleports = true;
1111
public boolean useTp = false;
12-
public int cLimX = 99999;
13-
public int cCrdX = 99999;
14-
public int cCrdY = 99999;
15-
public int cYaw = -90;
16-
public int cPitch = 75;
12+
public double cLimX = 99999;
13+
public double cCrdX = 99999;
14+
public double cCrdY = 99999;
15+
public double cYaw = -90;
16+
public double cPitch = 14;
1717
public int cStep = 1;
18-
public int checkTimer = 200;
18+
public int cStepSpeed = 1;
19+
public int checkTimer = 50;
20+
public boolean pitchAnim = true;
21+
public int pitchSpeed = 0;
1922
public int inaccuracy = 10;
2023
}

src/main/java/furnygo/arttp/mixin/CheckerStartMixin.java

+22-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,31 @@ private void init(CallbackInfo info) {
3232
else {
3333
if (crdX >= CONFIG.cLimX() && crdX <= CONFIG.cLimX() + CONFIG.inaccuracy()) {
3434
// End of line
35-
MinecraftClient.getInstance().player.updatePositionAndAngles(CONFIG.cLimX()-1, MinecraftClient.getInstance().player.getY(), MinecraftClient.getInstance().player.getZ()+CONFIG.cStep(), CONFIG.cYaw(), CONFIG.cPitch());
35+
for (int i = 0; i < CONFIG.cStep(); i++) {
36+
MinecraftClient.getInstance().player.updatePosition(CONFIG.cLimX()-1, CONFIG.cCrdY(), MinecraftClient.getInstance().player.getZ()+CONFIG.cStep());
37+
Thread.sleep(CONFIG.cStepSpeed());
38+
}
39+
MinecraftClient.getInstance().player.setYaw((float) CONFIG.cYaw());
40+
if (CONFIG.pitchAnim()){
41+
for (float i = 0; i <= CONFIG.cPitch(); i+=0.1){
42+
MinecraftClient.getInstance().player.setPitch(i);
43+
Thread.sleep(CONFIG.pitchSpeed());
44+
}
45+
} else MinecraftClient.getInstance().player.setPitch((float) CONFIG.cPitch());
3646
}
3747
else if (crdX <= CONFIG.cCrdX() && crdX >= CONFIG.cCrdX() - CONFIG.inaccuracy()) {
3848
// Start of line
39-
MinecraftClient.getInstance().player.updatePositionAndAngles(CONFIG.cCrdX()+1, MinecraftClient.getInstance().player.getY(), MinecraftClient.getInstance().player.getZ()+CONFIG.cStep(), CONFIG.cYaw()+180, CONFIG.cPitch());
49+
for (int i = 0; i < CONFIG.cStep(); i++) {
50+
MinecraftClient.getInstance().player.updatePosition(CONFIG.cCrdX()+1, CONFIG.cCrdY(), MinecraftClient.getInstance().player.getZ()+CONFIG.cStep());
51+
Thread.sleep(CONFIG.cStepSpeed());
52+
}
53+
MinecraftClient.getInstance().player.setYaw((float) CONFIG.cYaw()+180);
54+
if (CONFIG.pitchAnim()) {
55+
for (float i = 0; i <= CONFIG.cPitch(); i += 0.1) {
56+
MinecraftClient.getInstance().player.setPitch(i);
57+
Thread.sleep(CONFIG.pitchSpeed());
58+
}
59+
} else MinecraftClient.getInstance().player.setPitch((float) CONFIG.cPitch());
4060
}
4161
Thread.sleep(CONFIG.checkTimer());
4262
}

src/main/resources/assets/arttp/lang/en_us.json

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
"text.config.arttp-config.option.cYaw": "Horizontal angle of rotation of the camera during teleportation",
1010
"text.config.arttp-config.option.cPitch": "Vertical angle of rotation of the camera during teleportation",
1111
"text.config.arttp-config.option.cStep": "Number of lines to which you will be teleported next",
12+
"text.config.arttp-config.option.cStepSpeed": "Teleportation speed to the desired line (only with tp on the client side)",
1213
"text.config.arttp-config.option.checkTimer": "Speed of coordinate checker (ms)",
14+
"text.config.arttp-config.option.pitchAnim": "Enable smooth camera tilt after teleportation",
15+
"text.config.arttp-config.option.pitchSpeed": "The speed of the camera tilt, if the anti-cheat does not allow instant (ms)",
1316
"text.config.arttp-config.option.inaccuracy": "Additional coord range for teleports (during lags)",
1417

1518
"modmenu.summaryTranslation.arttp": "Teleportation by mapart line by line",

src/main/resources/assets/arttp/lang/ru_ru.json

+3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
"text.config.arttp-config.option.cYaw": "Горизонтальный угол поворота камеры при телепортации",
1010
"text.config.arttp-config.option.cPitch": "Вертикальный угол поворота камеры при телепортации",
1111
"text.config.arttp-config.option.cStep": "Кол-во строк, на которое вас тепнет дальше",
12+
"text.config.arttp-config.option.cStepSpeed": "Скорость телепортации на нужную строку (только при тп на стороне клиента)",
1213
"text.config.arttp-config.option.checkTimer": "Скорость проверки координат (мс)",
14+
"text.config.arttp-config.option.pitchAnim": "Включить плавный наклон камеры после телепортации",
15+
"text.config.arttp-config.option.pitchSpeed": "Скорость наклона камеры, если античит не позволяет моментально (мс)",
1316
"text.config.arttp-config.option.inaccuracy": "Доп. диапазон координат для телепорта (во время лагов)",
1417

1518
"modmenu.summaryTranslation.arttp": "Телепортация по арту построчно",

0 commit comments

Comments
 (0)