Skip to content

Commit a497d3f

Browse files
committed
Обновлен: Nukkit-Mot & поддержка b120
1 parent a45ccf8 commit a497d3f

7 files changed

Lines changed: 102 additions & 14 deletions

File tree

README-RU.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ override-player-uuid: on
121121

122122
## Техническая информация
123123

124-
| Ключ | Значение |
125-
|---|---|
126-
| Версия протокола | 422 (1.16.200) |
127-
| Коммит Apparatus | `73194cfd` |
124+
| Ключ | Значение |
125+
|-------------------------|---|
126+
| Версия протокола | 422 (1.16.200) |
127+
| Коммит InnerCore-1.16 | `96197c3b3426c6fa022332b7825cd018370d2a7c` |
128128
| Коммит Instant Referrer | `a264591` |
129-
| Коммит Nukkit-MOT | `191f6ea2b29c083d41470125fd6cd1fb3d698399` |
129+
| Коммит Nukkit-MOT | `e85deb189b829c9e23908a6443dd06d67f340a90` |

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ override-player-uuid: on
115115
116116
## Technical information
117117

118-
| Ключ | Значение |
119-
|---|---|
120-
| Protocol version | 422 (1.16.200) |
121-
| Commit Apparatus | `73194cfd` |
118+
| Ключ | Значение |
119+
|-------------------------|---|
120+
| Protocol version | 422 (1.16.200) |
121+
| Commit InnerCore-1.16 | `96197c3b3426c6fa022332b7825cd018370d2a7c` |
122122
| Commit Instant Referrer | `a264591` |
123-
| Commit Nukkit-MOT | `191f6ea2b29c083d41470125fd6cd1fb3d698399` |
123+
| Commit Nukkit-MOT | `e85deb189b829c9e23908a6443dd06d67f340a90` |

iclibs/Nukkit-MOT-SNAPSHOT.jar

62 Bytes
Binary file not shown.

src/main/java/com/reider745/InnerCoreServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,13 +506,13 @@ public static String getName() {
506506
}
507507

508508
public static String getVersionName() {
509-
return getPropertyString("pack-version", "2.3.1b115 test");
509+
return getPropertyString("pack-version", "2.3.1b120");
510510
}
511511

512512
public static int getVersionCode() {
513513
List<Integer> versions = getVersionsCode();
514514
if(versions.isEmpty())
515-
return 159;
515+
return 160;
516516
return versions.get(0);
517517
}
518518

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
package com.zhekasmirnov.innercore.api;
2+
3+
import com.reider745.InnerCoreServer;
4+
import org.mozilla.javascript.annotations.JSStaticFunction;
5+
import com.zhekasmirnov.apparatus.mcpe.NativeBlockSource;
6+
7+
8+
public class NativeGameController {
9+
@JSStaticFunction// Can break a block that breaks instantly
10+
public static boolean startDestroyBlock(int x, int y, int z, int side){
11+
InnerCoreServer.useClientMethod("NativeGameController.startDestroyBlock");
12+
return false;
13+
}
14+
@JSStaticFunction
15+
public static boolean continueDestroyBlock(int x, int y, int z, int side){
16+
InnerCoreServer.useClientMethod("NativeGameController.continueDestroyBlock");
17+
return false;
18+
}
19+
@JSStaticFunction// Interrupts the destruction animation
20+
public static void stopDestroyBlock(int x, int y, int z){
21+
InnerCoreServer.useClientMethod("NativeGameController.stopDestroyBlock");
22+
}
23+
24+
25+
26+
@JSStaticFunction
27+
public static void startBuildBlock(int x, int y, int z, int side){
28+
InnerCoreServer.useClientMethod("NativeGameController.startBuildBlock");
29+
}
30+
@JSStaticFunction
31+
public static void continueBuildBlock(int x, int y, int z, int side){
32+
InnerCoreServer.useClientMethod("NativeGameController.continueBuildBlock");
33+
}
34+
@JSStaticFunction
35+
public static void stopBuildBlock(){
36+
InnerCoreServer.useClientMethod("NativeGameController.stopBuildBlock");
37+
}
38+
39+
40+
41+
// Methods for interaction between the player and the world
42+
@JSStaticFunction
43+
public static void destroyBlock(int x, int y, int z, int side){
44+
InnerCoreServer.useClientMethod("NativeGameController.destroyBlock");
45+
}
46+
@JSStaticFunction
47+
public static void buildBlock(int x, int y, int z, int side){
48+
InnerCoreServer.useClientMethod("NativeGameController.buildBlock");
49+
}
50+
public static void useItemOn(long itemStack, float x, float y, float z, int side, long regionPtr){
51+
InnerCoreServer.useClientMethod("NativeGameController.useItemOn");
52+
}
53+
public static void attack(long entity){
54+
InnerCoreServer.useClientMethod("NativeGameController.attack");
55+
}
56+
public static void interact(long entity, float x, float y, float z){
57+
InnerCoreServer.useClientMethod("NativeGameController.interact");
58+
}
59+
@JSStaticFunction
60+
public static void releaseUsingItem(){
61+
InnerCoreServer.useClientMethod("NativeGameController.releaseUsingItem");
62+
}
63+
64+
@JSStaticFunction
65+
public static void onItemUse(double x, double y, double z, int side){
66+
useItemOn(0, (float) x, (float) y, (float) z, side, 0);
67+
}
68+
69+
}

src/main/java/com/zhekasmirnov/innercore/api/mod/adaptedscript/AdaptedScriptAPI.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,12 @@ public static NativeArray getAll() {
659659
return new NativeArray(NativeCallback.getAllEntities().toArray());
660660
}
661661

662+
@JSStaticFunction
663+
public static NativeArray getAllLocal() {
664+
InnerCoreServer.useClientMethod("Entity.getAllLocal");
665+
return new NativeArray(0);
666+
}
667+
662668
@JSStaticFunction
663669
public static float[] getPosition(Object entity) {
664670
float[] pos = new float[3];
@@ -2796,6 +2802,19 @@ public EcsActionQueue() {
27962802
}
27972803
}
27982804

2805+
public static class GameController extends NativeGameController {
2806+
@JSStaticFunction
2807+
public static void attack(Object entity){
2808+
attack(Entity.unwrapEntity(entity));
2809+
}
2810+
2811+
@JSStaticFunction
2812+
public static void interact(Object entity, double x, double y, double z){
2813+
interact(Entity.unwrapEntity(entity), (float) x, (float) y, (float) z);
2814+
}
2815+
}
2816+
2817+
27992818
@JSStaticFunction
28002819
public static Function requireMethodFromNativeAPI(String _className, final String methodName,
28012820
final boolean denyConversion) {

src/main/resources/zotecore.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Change resolution of pack that client should have to log into server.
22
# However, no deprecated or unimplemented methods will be added.
33
pack: Inner Core Test
4-
pack-version: 2.3.0b119
5-
pack-version-code: 159
4+
pack-version: 2.3.0b120
5+
pack-version-code: 160
66

77
# Sets the list of mods and configs to load, you can specify
88
# name, folder name of a modpack from /modpacks or a path.

0 commit comments

Comments
 (0)