From f55e64254921f0b9fe224f67c1a81d43f068c364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=B2=90=E5=91=80?= <163636894+zimuya4153@users.noreply.github.com> Date: Tue, 28 May 2024 03:12:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99include?= =?UTF-8?q?=E5=92=8C=E4=BF=AE=E6=AD=A3=E6=8E=A5=E5=8F=A3=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/GMLIB_API-JS.js | 16 ++++++++-------- src/CompatibilityApi.cpp | 3 --- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/GMLIB_API-JS.js b/lib/GMLIB_API-JS.js index 3a2fe29..1b6df03 100644 --- a/lib/GMLIB_API-JS.js +++ b/lib/GMLIB_API-JS.js @@ -442,14 +442,6 @@ class Minecraft { static readNbtFromFile(path, isBinary = true) { return GMLIB_API.readNbtFromFile(path, isBinary); } - - static getBlockDestroySpeed(block) { - return GMLIB_API.getBlockDestroySpeed(block); - } - - static getDestroyBlockSpeed(item,block) { - return GMLIB_API.getDestroyBlockSpeed(item,block); - } } class Recipes { @@ -973,6 +965,14 @@ LLSE_Item.prototype.getTranslateName = function (language) { return I18nAPI.get(this.getTranslateKey(), [], language); } +LLSE_Block.prototype.getBlockDestroySpeed = function () { + return GMLIB_API.getBlockDestroySpeed(this); +} + +LLSE_Item.prototype.getDestroyBlockSpeed = function (block) { + return GMLIB_API.getDestroyBlockSpeed(this,block); +} + module.exports = { StaticFloatingText, DynamicFloatingText, diff --git a/src/CompatibilityApi.cpp b/src/CompatibilityApi.cpp index 8cd63dd..9ed1fe6 100644 --- a/src/CompatibilityApi.cpp +++ b/src/CompatibilityApi.cpp @@ -1,7 +1,4 @@ #include "Global.h" -#include "RemoteCallAPI.h" -#include "mc/world/actor/Actor.h" -#include "mc/world/item/registry/ItemStack.h" #include bool isInteger(const std::string& str) {