Skip to content

Commit

Permalink
Merge pull request LiteLDev#928 from LiteLDev/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox authored Dec 4, 2022
2 parents 9428605 + a6ea47f commit 1c2a3d8
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/[email protected]
with:
fetch-depth: 1
#submodules: 'true'
submodules: 'true'

- name: Cache Bedrock Dedicated Server Library
id: cache-bds-lib
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "assets/plugins/LiteLoader/ResourcePacks/LiteLoaderBDS-CUI"]
path = assets/plugins/LiteLoader/ResourcePacks/LiteLoaderBDS-CUI
url = https://github.com/OEOTYAN/LiteLoaderBDS-CUI.git
[submodule "PermissionAPI"]
path = PermissionAPI
url = https://github.com/LiteLDev/PermissionAPI.git
[submodule "ParticleAPI"]
path = ParticleAPI
url = https://github.com/LiteLDev/ParticleAPI.git
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ add_subdirectory(Tools/ScriptX/CMake/ScriptX-Lua)
add_subdirectory(Tools/ScriptX/CMake/ScriptX-QuickJs)
add_subdirectory(Tools/ScriptX/CMake/ScriptX-NodeJs)
add_subdirectory(Tools/SymDBHelper)
add_subdirectory(ParticleAPI)
add_subdirectory(PermissionAPI/PermissionAPI)

include(${CMAKE_SOURCE_DIR}/CMake/PackOutput.cmake)
include(${CMAKE_SOURCE_DIR}/CMake/PackSDK.cmake)
Expand Down
2 changes: 1 addition & 1 deletion LiteLoader/include/llapi/mc/Types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ class WeakPtr {
};

template <typename T>
struct SharePtrRefTraits;
struct SharePtrRefTraits {};

template <typename T>
class SubChunkStorage;
Expand Down
1 change: 1 addition & 0 deletions ParticleAPI
Submodule ParticleAPI added at 00db3b
1 change: 1 addition & 0 deletions PermissionAPI
Submodule PermissionAPI added at 0f3655
18 changes: 9 additions & 9 deletions ScriptEngine/src/api/EventAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ void EnableEventListener(int eventId) {
case EVENT_TYPES::onChat:
Event::PlayerChatEvent::subscribe([](const PlayerChatEvent& ev) {
IF_LISTENED(EVENT_TYPES::onChat) {
CallEvent(EVENT_TYPES::onChat, PlayerClass::newPlayer(ev.mPlayer), ev.mMessage);
CallEvent(EVENT_TYPES::onChat, PlayerClass::newPlayer(ev.mPlayer), String::newString(ev.mMessage));
}
IF_LISTENED_END(EVENT_TYPES::onChat);
});
Expand Down Expand Up @@ -589,7 +589,7 @@ void EnableEventListener(int eventId) {
Event::ContainerChangeEvent::subscribe([](const ContainerChangeEvent& ev) {
IF_LISTENED(EVENT_TYPES::onContainerChange) {
CallEvent(EVENT_TYPES::onContainerChange, PlayerClass::newPlayer(ev.mPlayer), BlockClass::newBlock(ev.mBlockInstance),
ev.mSlot, ItemClass::newItem(ev.mPreviousItemStack), ItemClass::newItem(ev.mNewItemStack));
Number::newNumber(ev.mSlot), ItemClass::newItem(ev.mPreviousItemStack), ItemClass::newItem(ev.mNewItemStack));
}
IF_LISTENED_END(EVENT_TYPES::onContainerChange);
});
Expand Down Expand Up @@ -762,11 +762,11 @@ void EnableEventListener(int eventId) {
IF_LISTENED(EVENT_TYPES::onCmdBlockExecute) {
if (ev.mIsMinecart) {
CallEvent(EVENT_TYPES::onCmdBlockExecute, String::newString(ev.mCommand),
FloatPos::newPos(ev.mMinecart->getPosition(), ev.mMinecart->getDimensionId()), ev.mIsMinecart);
FloatPos::newPos(ev.mMinecart->getPosition(), ev.mMinecart->getDimensionId()), Boolean::newBoolean(ev.mIsMinecart));
} else {
BlockInstance bl = ev.mBlockInstance;
CallEvent(EVENT_TYPES::onCmdBlockExecute, String::newString(ev.mCommand),
FloatPos::newPos(bl.getPosition().toVec3(), bl.getDimensionId()), ev.mIsMinecart);
FloatPos::newPos(bl.getPosition().toVec3(), bl.getDimensionId()), Boolean::newBoolean(ev.mIsMinecart));
}
}
IF_LISTENED_END(EVENT_TYPES::onCmdBlockExecute);
Expand Down Expand Up @@ -808,7 +808,7 @@ void EnableEventListener(int eventId) {

CallEvent(EVENT_TYPES::onMobHurt, EntityClass::newEntity(ev.mMob),
source ? EntityClass::newEntity(source) : Local<Value>(),
float(ev.mDamage), Number::newNumber((int)ev.mDamageSource->getCause()));
Number::newNumber(float(ev.mDamage)), Number::newNumber((int)ev.mDamageSource->getCause()));
}
IF_LISTENED_END(EVENT_TYPES::onMobHurt)
});
Expand Down Expand Up @@ -962,10 +962,10 @@ void EnableEventListener(int eventId) {
Event::HopperSearchItemEvent::subscribe([](const HopperSearchItemEvent& ev) {
IF_LISTENED(EVENT_TYPES::onHopperSearchItem) {
if (ev.isMinecart) {
CallEvent(EVENT_TYPES::onHopperSearchItem, FloatPos::newPos(ev.mMinecartPos, ev.mDimensionId), ev.isMinecart);
CallEvent(EVENT_TYPES::onHopperSearchItem, FloatPos::newPos(ev.mMinecartPos, ev.mDimensionId), Boolean::newBoolean(ev.isMinecart));
} else {
BlockInstance bl = ev.mHopperBlock;
CallEvent(EVENT_TYPES::onHopperSearchItem, FloatPos::newPos(bl.getPosition().toVec3(), ev.mDimensionId), ev.isMinecart);
CallEvent(EVENT_TYPES::onHopperSearchItem, FloatPos::newPos(bl.getPosition().toVec3(), ev.mDimensionId), Boolean::newBoolean(ev.isMinecart));
}
}
IF_LISTENED_END(EVENT_TYPES::onHopperSearchItem);
Expand Down Expand Up @@ -1074,7 +1074,7 @@ void EnableEventListener(int eventId) {
Event::ContainerChangeEvent::subscribe([](const ContainerChangeEvent& ev) {
IF_LISTENED(EVENT_TYPES::onContainerChange) {
CallEvent(EVENT_TYPES::onContainerChange, PlayerClass::newPlayer(ev.mPlayer), BlockClass::newBlock(ev.mBlockInstance),
ev.mSlot, ItemClass::newItem(ev.mPreviousItemStack), ItemClass::newItem(ev.mNewItemStack));
Number::newNumber(ev.mSlot), ItemClass::newItem(ev.mPreviousItemStack), ItemClass::newItem(ev.mNewItemStack));
}
IF_LISTENED_END(EVENT_TYPES::onContainerChange);
});
Expand Down Expand Up @@ -1369,4 +1369,4 @@ bool MoneyEventCallback(LLMoneyEvent type, xuid_t from, xuid_t to, money_t value
break;
}
return true;
}
}
Binary file modified assets/plugins/LLMoney.dll
Binary file not shown.
Binary file removed assets/plugins/LiteLoader/ParticleAPI.dll
Binary file not shown.
Binary file removed assets/plugins/LiteLoader/PermissionAPI.dll
Binary file not shown.

0 comments on commit 1c2a3d8

Please sign in to comment.