Skip to content

Commit

Permalink
Merge pull request LiteLDev#943 from LiteLDev/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox authored Dec 10, 2022
2 parents 402b4a5 + 1e131bd commit 64d3657
Show file tree
Hide file tree
Showing 4,249 changed files with 77,126 additions and 68,550 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
18 changes: 9 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!-- Version: 2.8.0 -->
<!-- Version: 2.9.0 -->

# LiteLoader Release Note

**Adapted to BDS-1.19.41 | ProtocolVersion 557**
**Adapted to BDS-1.19.50 | ProtocolVersion 560**

## New features
- Support 1.19.41 @dreamguxiang
- Add Player::getAbilities Player::setAbility #890 @dreamguxiang
- Add Actor::getBiomeId Actor::getBiomeName #883 @dreamguxiang
- Support 1.19.50 @dreamguxiang @ShrBox
- Add offline nbt API #305 @Tsubasa6848
- Add more parameters for LLSE PlayerEffectChangedEvent #922 @Tsubasa6848
- Add Player::getAllUuid @Tsubasa6848
- Add PlayerInfo::getUUIDByXuid #940 @Tsubasa6848
- Add data.name2uuid and data.xuid2uuid for LLSE #940 @Tsubasa6848

## Bug Fixes
- Fix #888 @ShrBox
- Fix Abilities(MayFly) Permissions #890 @dreamguxiang
- Fix `Player::getrealName` error #886 @dreamguxiang
- Fix `Biome::getName` is empty @dreamguxiang
- Fix isMinecart always true #923 @StarsDream00
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
11 changes: 11 additions & 0 deletions LiteLoader/include/liteloader/PlayerDeathPositions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Created by ShrBox on 2022/12/5.
//
#include <unordered_map>
#include <llapi/mc/Vec3.hpp>

namespace PlayerDeathPositions {
std::pair<Vec3, int> makeDeathPos(Vec3 vec3, int dim);
std::unordered_map<std::string, std::pair<Vec3, int>> getDeathPositions();
void deathEventListener();
}
6 changes: 3 additions & 3 deletions LiteLoader/include/liteloader/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#define LITELOADER_VERSION_RELEASE 2

#define LITELOADER_VERSION_MAJOR 2
#define LITELOADER_VERSION_MINOR 8
#define LITELOADER_VERSION_REVISION 1
#define LITELOADER_VERSION_MINOR 9
#define LITELOADER_VERSION_REVISION 0
#define LITELOADER_VERSION_COMMIT_SHA UNKNOWN
#define LITELOADER_VERSION_STATUS LITELOADER_VERSION_DEV
#define LITELOADER_VERSION_STATUS_VERSION 0

#define TARGET_BDS_PROTOCOL_VERSION 557
#define TARGET_BDS_PROTOCOL_VERSION 560

#define LITELOADER_VERSION ll::getLoaderVersion()

Expand Down
8 changes: 7 additions & 1 deletion LiteLoader/include/llapi/EventAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,13 @@ class PlayerEatEvent : public EventTemplate<PlayerEatEvent> {
public:
Player* mPlayer;
ItemStack* mFoodItem;
};
};

class PlayerAteEvent : public EventTemplate<PlayerAteEvent> {
public:
Player* mPlayer;
ItemStack* mFoodItem;
};

class PlayerConsumeTotemEvent : public EventTemplate<PlayerConsumeTotemEvent> {
public:
Expand Down
5 changes: 4 additions & 1 deletion LiteLoader/include/llapi/Global.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#pragma once
#pragma warning(disable : 4250)
#pragma warning(disable : 4949)

#ifndef LIAPI
#ifdef LITELOADER_EXPORTS
Expand Down Expand Up @@ -62,7 +63,9 @@
// windows types
#include <minwindef.h>

#pragma unmanaged
#include <entt/entt.hpp>
#pragma managed
#include <gsl/gsl>
#include <FMT/chrono.h>
#include <FMT/color.h>
Expand Down
1 change: 1 addition & 0 deletions LiteLoader/include/llapi/PlayerInfoAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ LIAPI std::vector<Info> getAllPlayerInfo();
LIAPI bool insert(std::string name, std::string xuid, std::string uuid);
LIAPI std::string getXuid(std::string name);
LIAPI std::string getUUID(std::string name);
LIAPI std::string getUUIDByXuid(xuid_t xuid) ;
LIAPI std::string fromXuid(std::string xuid);
LIAPI std::string fromUUID(std::string uuid);
LIAPI void forEachInfo(std::function<bool(std::string_view name, std::string_view xuid, std::string_view uuid)> callback);
Expand Down
14 changes: 7 additions & 7 deletions LiteLoader/include/llapi/mc/AABBBucket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,37 @@ struct AABBBucket {
public:
/**
* @symbol ??0AABBBucket@@QEAA@XZ
* @hash 668584294
* @hash 1138259590
*/
MCAPI AABBBucket();
/**
* @symbol ?clearDirty@AABBBucket@@QEAAXXZ
* @hash 286800965
* @hash 756476261
*/
MCAPI void clearDirty();
/**
* @symbol ?clearNeedsFinalize@AABBBucket@@QEAAXXZ
* @hash -230536587
* @hash 239138709
*/
MCAPI void clearNeedsFinalize();
/**
* @symbol ?isDirty@AABBBucket@@QEAA_NXZ
* @hash 6635692
* @hash 476310988
*/
MCAPI bool isDirty();
/**
* @symbol ?markDirty@AABBBucket@@QEAAXXZ
* @hash -841656685
* @hash -856740541
*/
MCAPI void markDirty();
/**
* @symbol ?mergeAABBs@AABBBucket@@QEAAXXZ
* @hash -1374509499
* @hash -904834203
*/
MCAPI void mergeAABBs();
/**
* @symbol ?needsFinalize@AABBBucket@@QEBA_NXZ
* @hash -1474576590
* @hash -1004901294
*/
MCAPI bool needsFinalize() const;

Expand Down
2 changes: 1 addition & 1 deletion LiteLoader/include/llapi/mc/AABBPred.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AABBPred {
public:
/**
* @symbol ??RAABBPred@@QEBA_NAEBVAABB@@0@Z
* @hash 2050674055
* @hash -1676841961
*/
MCAPI bool operator()(class AABB const &, class AABB const &) const;

Expand Down
2 changes: 1 addition & 1 deletion LiteLoader/include/llapi/mc/AABBShapeComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct AABBShapeComponent {
public:
/**
* @symbol ?toString@AABBShapeComponent@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ
* @hash -1312388324
* @hash -1298303908
*/
MCAPI std::string toString() const;

Expand Down
67 changes: 36 additions & 31 deletions LiteLoader/include/llapi/mc/Abilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,132 +31,137 @@ class Abilities {
public:
/**
* @symbol ??0Abilities@@QEAA@_N@Z
* @hash -228219123
* @hash -538675939
*/
MCAPI Abilities(bool);
/**
* @symbol ??0Abilities@@QEAA@AEBV0@@Z
* @hash 1581073841
* @hash 1270617025
*/
MCAPI Abilities(class Abilities const &);
/**
* @symbol ?addSaveData@Abilities@@QEBAXAEAVCompoundTag@@@Z
* @hash -1145973002
* @hash -1456629706
*/
MCAPI void addSaveData(class CompoundTag &) const;
/**
* @symbol ?forEachAbility@Abilities@@QEAAXAEBV?$function@$$A6AXAEAVAbility@@W4AbilitiesIndex@@@Z@std@@W4Options@Ability@@@Z
* @hash -1864321866
* @hash 2119988726
*/
MCAPI void forEachAbility(class std::function<void (class Ability &, enum class AbilitiesIndex)> const &, enum class Ability::Options);
/**
* @symbol ?forEachAbility@Abilities@@QEBAXAEBV?$function@$$A6AXAEBVAbility@@W4AbilitiesIndex@@@Z@std@@W4Options@Ability@@@Z
* @hash -1166633868
* @hash -1477290572
*/
MCAPI void forEachAbility(class std::function<void (class Ability const &, enum class AbilitiesIndex)> const &, enum class Ability::Options) const;
/**
* @symbol ?getAbility@Abilities@@QEAAAEAVAbility@@W4AbilitiesIndex@@@Z
* @hash 707473089
* @hash 396816385
*/
MCAPI class Ability & getAbility(enum class AbilitiesIndex);
/**
* @symbol ?getAbility@Abilities@@QEBAAEBVAbility@@W4AbilitiesIndex@@@Z
* @hash 1377140065
* @hash 1066483361
*/
MCAPI class Ability const & getAbility(enum class AbilitiesIndex) const;
/**
* @symbol ?getBool@Abilities@@QEBA_NW4AbilitiesIndex@@@Z
* @hash -733397399
* @hash -1044054103
*/
MCAPI bool getBool(enum class AbilitiesIndex) const;
/**
* @symbol ?getFloat@Abilities@@QEBAMW4AbilitiesIndex@@@Z
* @hash 910267139
* @hash 600256227
*/
MCAPI float getFloat(enum class AbilitiesIndex) const;
/**
* @symbol ?isAnyAbilitySet@Abilities@@QEBA_NXZ
* @hash -1140033538
* @hash -1450044450
*/
MCAPI bool isAnyAbilitySet() const;
/**
* @symbol ?loadSaveData@Abilities@@QEAA_NAEBVCompoundTag@@@Z
* @hash 319627767
* @hash 9616855
*/
MCAPI bool loadSaveData(class CompoundTag const &);
/**
* @symbol ??4Abilities@@QEAAAEAV0@AEBV0@@Z
* @hash 2108791308
* @hash 1798334492
*/
MCAPI class Abilities & operator=(class Abilities const &);
/**
* @symbol ??8Abilities@@QEBA_NAEBV0@@Z
* @hash 1483217871
*/
MCAPI bool operator==(class Abilities const &) const;
/**
* @symbol ?setAbility@Abilities@@QEAAXW4AbilitiesIndex@@AEBVAbility@@@Z
* @hash -609002473
* @hash -919013385
*/
MCAPI void setAbility(enum class AbilitiesIndex, class Ability const &);
/**
* @symbol ?setAbility@Abilities@@QEAAXW4AbilitiesIndex@@M@Z
* @hash 1238565743
* @hash 928554831
*/
MCAPI void setAbility(enum class AbilitiesIndex, float);
/**
* @symbol ?setAbility@Abilities@@QEAAXW4AbilitiesIndex@@_N@Z
* @hash -1081523177
* @hash -1391534089
*/
MCAPI void setAbility(enum class AbilitiesIndex, bool);
/**
* @symbol ?setAbilityDiff@Abilities@@QEAAXW4AbilitiesIndex@@_NAEA_N@Z
* @hash 1316017129
* @hash 1006006217
*/
MCAPI void setAbilityDiff(enum class AbilitiesIndex, bool, bool &);
/**
* @symbol ?setDefault@Abilities@@QEAAXXZ
* @hash -2135878511
* @hash 1849077873
*/
MCAPI void setDefault();
/**
* @symbol ?setFromPermissions@Abilities@@QEAAXW4PlayerPermissionLevel@@@Z
* @hash -303297776
* @hash -613308688
*/
MCAPI void setFromPermissions(enum class PlayerPermissionLevel);
/**
* @symbol ?unSet@Abilities@@QEAAXW4AbilitiesIndex@@@Z
* @hash -492801292
* @hash -802812204
*/
MCAPI void unSet(enum class AbilitiesIndex);
/**
* @symbol ?unSet@Abilities@@QEAAXXZ
* @hash 249787559
* @hash -60223353
*/
MCAPI void unSet();
/**
* @symbol ?DIFF_ABILITIY_AT@Abilities@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B
* @hash -1256648363
*/
MCAPI static std::string const DIFF_ABILITIY_AT;
/**
* @symbol ?INVALID_ABILITY@Abilities@@2VAbility@@A
* @hash 1692814301
* @hash -1725044451
*/
MCAPI static class Ability INVALID_ABILITY;
/**
* @symbol ?SERIALIZATION_TAG@Abilities@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B
* @hash -1392328909
* @hash 55752019
*/
MCAPI static std::string const SERIALIZATION_TAG;
/**
* @symbol ?getAbilityName@Abilities@@SAPEBDW4AbilitiesIndex@@@Z
* @hash -122343608
* @hash -433000312
*/
MCAPI static char const * getAbilityName(enum class AbilitiesIndex);
/**
* @symbol ?getDefault@Abilities@@SAAEBVAbility@@W4AbilitiesIndex@@@Z
* @hash 394093709
* @hash 83437005
*/
MCAPI static class Ability const & getDefault(enum class AbilitiesIndex);
/**
* @symbol ?getDiff@Abilities@@SA?AV?$optional@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@AEBV1@0@Z
* @hash -815128476
*/
MCAPI static class std::optional<std::string> getDiff(class Abilities const &, class Abilities const &);
/**
* @symbol ?nameToAbilityIndex@Abilities@@SA?AW4AbilitiesIndex@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
* @hash 1824011607
* @hash 1514000695
*/
MCAPI static enum class AbilitiesIndex nameToAbilityIndex(std::string const &);

Expand All @@ -165,7 +170,7 @@ class Abilities {
private:
/**
* @symbol ?ABILITY_NAMES@Abilities@@0V?$array@PEBD$0BC@@std@@A
* @hash -546409532
* @hash 303898644
*/
MCAPI static class std::array<char const *, 18> ABILITY_NAMES;

Expand Down
Loading

0 comments on commit 64d3657

Please sign in to comment.