fix: Хотфиксы внутренних API
This commit is contained in:
@@ -199,11 +199,11 @@ public class NativeAPI {
|
||||
}
|
||||
|
||||
public static void leaveGame() {
|
||||
InnerCoreServer.useClientMethod("NativeAPI.leaveGame()");
|
||||
Server.getInstance().shutdown();
|
||||
}
|
||||
|
||||
public static void forceCrash() {
|
||||
InnerCoreServer.useNotCurrentSupport("NativeAPI.forceCrash()");
|
||||
Server.getInstance().forceShutdown();
|
||||
}
|
||||
|
||||
public static void forceLevelSave() {
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.reider745.InnerCoreServer;
|
||||
import com.reider745.api.CustomManager;
|
||||
import com.reider745.block.BlockMethods;
|
||||
import com.reider745.block.CustomBlock;
|
||||
import com.reider745.block.CustomBlockLiquid;
|
||||
import com.zhekasmirnov.apparatus.ecs.ECS;
|
||||
import com.zhekasmirnov.apparatus.ecs.core.ComponentCollection;
|
||||
import com.zhekasmirnov.apparatus.ecs.core.EntityManager;
|
||||
@@ -260,8 +259,9 @@ public class NativeBlock {
|
||||
BlockMethods.setCanBeExtraBlock(id, canBeExtraBlock);
|
||||
}
|
||||
|
||||
// TODO: Block.recalculateBoundingBox
|
||||
public static void setShape(int id, int data, float x1, float y1, float z1, float x2, float y2, float z2) {
|
||||
InnerCoreServer.useClientMethod("NativeBlock.setShape(id, data, x1, y1, z1, x2, y2, z2)");
|
||||
InnerCoreServer.useNotCurrentSupport("NativeBlock.setShape(id, data, x1, y1, z1, x2, y2, z2)");
|
||||
}
|
||||
|
||||
private static HashMap<Integer, Float> blockDestroyTimes = new HashMap<>();
|
||||
|
||||
@@ -33,7 +33,6 @@ import com.zhekasmirnov.innercore.api.commontypes.ItemInstance;
|
||||
import com.zhekasmirnov.innercore.api.commontypes.ScriptableParams;
|
||||
import com.zhekasmirnov.innercore.api.entities.NativePathNavigation;
|
||||
import com.zhekasmirnov.innercore.api.log.ICLog;
|
||||
import com.zhekasmirnov.innercore.api.mod.ScriptableObjectHelper;
|
||||
import com.zhekasmirnov.innercore.api.mod.adaptedscript.AdaptedScriptAPI.IDRegistry;
|
||||
import com.zhekasmirnov.innercore.api.mod.recipes.workbench.WorkbenchRecipe;
|
||||
import com.zhekasmirnov.innercore.api.mod.recipes.workbench.WorkbenchRecipeRegistry;
|
||||
@@ -522,15 +521,13 @@ public class NativeCallback {
|
||||
}
|
||||
|
||||
public static void onPlayerLogin(ConnectedClient client, String username, Consumer<String> acceptor) {
|
||||
Callback.invokeAPICallback("ServerPlayerLogin",
|
||||
Context.javaToJS(client, ScriptableObjectHelper.getDefaultScope()), username,
|
||||
new ScriptableFunctionImpl() {
|
||||
@Override
|
||||
public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
|
||||
acceptor.accept(args.length > 0 ? (String) args[0] : null);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
Callback.invokeAPICallback("ServerPlayerLogin", client, username, new ScriptableFunctionImpl() {
|
||||
@Override
|
||||
public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
|
||||
acceptor.accept(args.length > 0 ? (String) args[0] : null);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* ENTITY CALLBACKS */
|
||||
@@ -633,7 +630,8 @@ public class NativeCallback {
|
||||
someBool2);
|
||||
|
||||
// if (entity == NativeAPI.getPlayer()) {
|
||||
// ArmorRegistry.onHurt(attacker, damageValue, damageType, someBool1, someBool2);
|
||||
// ArmorRegistry.onHurt(attacker, damageValue, damageType, someBool1,
|
||||
// someBool2);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user