Обновлен: Nukkit-Mot & поддержка b120
This commit is contained in:
+5
-5
@@ -121,9 +121,9 @@ override-player-uuid: on
|
||||
|
||||
## Техническая информация
|
||||
|
||||
| Ключ | Значение |
|
||||
|---|---|
|
||||
| Версия протокола | 422 (1.16.200) |
|
||||
| Коммит Apparatus | `73194cfd` |
|
||||
| Ключ | Значение |
|
||||
|-------------------------|---|
|
||||
| Версия протокола | 422 (1.16.200) |
|
||||
| Коммит InnerCore-1.16 | `96197c3b3426c6fa022332b7825cd018370d2a7c` |
|
||||
| Коммит Instant Referrer | `a264591` |
|
||||
| Коммит Nukkit-MOT | `191f6ea2b29c083d41470125fd6cd1fb3d698399` |
|
||||
| Коммит Nukkit-MOT | `e85deb189b829c9e23908a6443dd06d67f340a90` |
|
||||
|
||||
@@ -115,9 +115,9 @@ override-player-uuid: on
|
||||
|
||||
## Technical information
|
||||
|
||||
| Ключ | Значение |
|
||||
|---|---|
|
||||
| Protocol version | 422 (1.16.200) |
|
||||
| Commit Apparatus | `73194cfd` |
|
||||
| Ключ | Значение |
|
||||
|-------------------------|---|
|
||||
| Protocol version | 422 (1.16.200) |
|
||||
| Commit InnerCore-1.16 | `96197c3b3426c6fa022332b7825cd018370d2a7c` |
|
||||
| Commit Instant Referrer | `a264591` |
|
||||
| Commit Nukkit-MOT | `191f6ea2b29c083d41470125fd6cd1fb3d698399` |
|
||||
| Commit Nukkit-MOT | `e85deb189b829c9e23908a6443dd06d67f340a90` |
|
||||
|
||||
Binary file not shown.
@@ -506,13 +506,13 @@ public class InnerCoreServer {
|
||||
}
|
||||
|
||||
public static String getVersionName() {
|
||||
return getPropertyString("pack-version", "2.3.1b115 test");
|
||||
return getPropertyString("pack-version", "2.3.1b120");
|
||||
}
|
||||
|
||||
public static int getVersionCode() {
|
||||
List<Integer> versions = getVersionsCode();
|
||||
if(versions.isEmpty())
|
||||
return 159;
|
||||
return 160;
|
||||
return versions.get(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.zhekasmirnov.innercore.api;
|
||||
|
||||
import com.reider745.InnerCoreServer;
|
||||
import org.mozilla.javascript.annotations.JSStaticFunction;
|
||||
import com.zhekasmirnov.apparatus.mcpe.NativeBlockSource;
|
||||
|
||||
|
||||
public class NativeGameController {
|
||||
@JSStaticFunction// Can break a block that breaks instantly
|
||||
public static boolean startDestroyBlock(int x, int y, int z, int side){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.startDestroyBlock");
|
||||
return false;
|
||||
}
|
||||
@JSStaticFunction
|
||||
public static boolean continueDestroyBlock(int x, int y, int z, int side){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.continueDestroyBlock");
|
||||
return false;
|
||||
}
|
||||
@JSStaticFunction// Interrupts the destruction animation
|
||||
public static void stopDestroyBlock(int x, int y, int z){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.stopDestroyBlock");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@JSStaticFunction
|
||||
public static void startBuildBlock(int x, int y, int z, int side){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.startBuildBlock");
|
||||
}
|
||||
@JSStaticFunction
|
||||
public static void continueBuildBlock(int x, int y, int z, int side){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.continueBuildBlock");
|
||||
}
|
||||
@JSStaticFunction
|
||||
public static void stopBuildBlock(){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.stopBuildBlock");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Methods for interaction between the player and the world
|
||||
@JSStaticFunction
|
||||
public static void destroyBlock(int x, int y, int z, int side){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.destroyBlock");
|
||||
}
|
||||
@JSStaticFunction
|
||||
public static void buildBlock(int x, int y, int z, int side){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.buildBlock");
|
||||
}
|
||||
public static void useItemOn(long itemStack, float x, float y, float z, int side, long regionPtr){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.useItemOn");
|
||||
}
|
||||
public static void attack(long entity){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.attack");
|
||||
}
|
||||
public static void interact(long entity, float x, float y, float z){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.interact");
|
||||
}
|
||||
@JSStaticFunction
|
||||
public static void releaseUsingItem(){
|
||||
InnerCoreServer.useClientMethod("NativeGameController.releaseUsingItem");
|
||||
}
|
||||
|
||||
@JSStaticFunction
|
||||
public static void onItemUse(double x, double y, double z, int side){
|
||||
useItemOn(0, (float) x, (float) y, (float) z, side, 0);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -659,6 +659,12 @@ public class AdaptedScriptAPI extends API {
|
||||
return new NativeArray(NativeCallback.getAllEntities().toArray());
|
||||
}
|
||||
|
||||
@JSStaticFunction
|
||||
public static NativeArray getAllLocal() {
|
||||
InnerCoreServer.useClientMethod("Entity.getAllLocal");
|
||||
return new NativeArray(0);
|
||||
}
|
||||
|
||||
@JSStaticFunction
|
||||
public static float[] getPosition(Object entity) {
|
||||
float[] pos = new float[3];
|
||||
@@ -2796,6 +2802,19 @@ public class AdaptedScriptAPI extends API {
|
||||
}
|
||||
}
|
||||
|
||||
public static class GameController extends NativeGameController {
|
||||
@JSStaticFunction
|
||||
public static void attack(Object entity){
|
||||
attack(Entity.unwrapEntity(entity));
|
||||
}
|
||||
|
||||
@JSStaticFunction
|
||||
public static void interact(Object entity, double x, double y, double z){
|
||||
interact(Entity.unwrapEntity(entity), (float) x, (float) y, (float) z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@JSStaticFunction
|
||||
public static Function requireMethodFromNativeAPI(String _className, final String methodName,
|
||||
final boolean denyConversion) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Change resolution of pack that client should have to log into server.
|
||||
# However, no deprecated or unimplemented methods will be added.
|
||||
pack: Inner Core Test
|
||||
pack-version: 2.3.0b119
|
||||
pack-version-code: 159
|
||||
pack-version: 2.3.0b120
|
||||
pack-version-code: 160
|
||||
|
||||
# Sets the list of mods and configs to load, you can specify
|
||||
# name, folder name of a modpack from /modpacks or a path.
|
||||
|
||||
Reference in New Issue
Block a user