From 70fc659ba27978c3613722f84a9ab6c06548e2c4 Mon Sep 17 00:00:00 2001 From: Qiuzhizhe <42761326+quizhizhe@users.noreply.github.com> Date: Sat, 18 Mar 2023 06:41:56 -0700 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LiteLoader/src/llapi/EventAPI.cpp | 40 ------------------------------- 1 file changed, 40 deletions(-) diff --git a/LiteLoader/src/llapi/EventAPI.cpp b/LiteLoader/src/llapi/EventAPI.cpp index cd906ed..3701cf9 100644 --- a/LiteLoader/src/llapi/EventAPI.cpp +++ b/LiteLoader/src/llapi/EventAPI.cpp @@ -1267,26 +1267,6 @@ TInstanceHook(bool, "?_canSpreadTo@LiquidBlockDynamic@@AEBA_NAEAVBlockSource@@AE return result; } -// THook(void, "?_trySpreadTo@LiquidBlockDynamic@@AEBAXAEAVBlockSource@@AEBVBlockPos@@H1E@Z", -// LiquidBlockDynamic* _this, BlockSource* bs, BlockPos* to, unsigned int a4, BlockPos* from, char id) -//{ -// IF_LISTENED(LiquidSpreadEvent) -// { -// LiquidSpreadEvent ev{}; -// ev.mBlockInstance = BlockInstance::createBlockInstance( -// const_cast(&_this->getRenderBlock()), *from, bs->getDimensionId()); -// ev.mTarget = *to; -// ev.mDimensionId = bs->getDimensionId(); -// logger.warn("LiquidSpreadEvent - {} - {} -> {}", -// ev.mBlockInstance.getBlock()->getTypeName(), from->toString(), to->toString()); -// if (!ev.call()) -// return; -// } -// IF_LISTENED_END(LiquidSpreadEvent) -// return; -// original(_this, bs, to, a4, from, id); -// } - /////////////////// PlayerDeath /////////////////// TInstanceHook(void*, "?die@ServerPlayer@@UEAAXAEBVActorDamageSource@@@Z", ServerPlayer, ActorDamageSource* src) { @@ -1308,26 +1288,6 @@ TInstanceHook(void*, "?die@ServerPlayer@@UEAAXAEBVActorDamageSource@@@Z", Server #include /////////////////// PlayerDestroy /////////////////// -// TInstanceHook(bool, "?destroyBlock@SurvivalMode@@UEAA_NAEBVBlockPos@@E@Z", -// SurvivalMode, BlockPos a3, unsigned __int8 a4) -//{ -// IF_LISTENED(PlayerDestroyBlockEvent) -// { -// if (getPlayer()->isPlayer()) -// { -// PlayerDestroyBlockEvent ev{}; -// ev.mPlayer = getPlayer(); -// auto bl = Level::getBlockInstance(a3, getPlayer()->getDimensionId()); -// ev.mBlockInstance = bl; -// if (!ev.call()) -// { -// return false; -// } -// } -// } -// IF_LISTENED_END(PlayerDestroyBlockEvent) -// return original(this, a3, a4); -// } TInstanceHook(bool, "?destroyBlock@GameMode@@UEAA_NAEBVBlockPos@@E@Z", GameMode, BlockPos blockPos, char face) {