Skip to content
This repository was archived by the owner on Feb 12, 2023. It is now read-only.

Commit e595c33

Browse files
author
twoone3
committed
v2.1.6更新
- 更改 MobSpawnEvent 为 MobTrySpawnEvent - 更新 python 3.11.2 - 更新 SDK - 新增 lip 适配
1 parent a432aeb commit e595c33

File tree

13 files changed

+44
-35
lines changed

13 files changed

+44
-35
lines changed

.gitmodules

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
[submodule "SDK"]
2-
path = SDK
3-
url = https://github.com/LiteLDev/LiteLoaderSDK
4-
branch = develop
1+
[submodule "sdk"]
2+
path = sdk
3+
url = https://github.com/LiteLDev/SDK-cpp.git

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
![Downloads](https://img.shields.io/github/downloads/twoone-3/BDSpyrunner/latest/total)
55
![Release](https://img.shields.io/github/v/release/twoone-3/BDSpyrunner)
66
![BDS](https://img.shields.io/badge/support--BDS--version-1.19-blue)
7-
![CodeFactor](https://www.codefactor.io/repository/github/twoone-3/bdspyrunner/badge)
87

98
[Wiki](https://github.com/twoone-3/BDSpyrunner/wiki)
109

RELEASENOTE.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
v2.1.5更新
2-
- 修改action
3-
- 更新SDK
1+
v2.1.6更新
2+
- 更改 MobSpawnEvent 为 MobTrySpawnEvent
3+
- 更新 python 3.11.2
4+
- 更新 SDK
5+
- 新增 lip 适配

SDK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 02d254c0b5120c185a4521b385295822ee324797
1+
Subproject commit 96f2f8e863e1b26d9fe6aab4577fd7c8e54dbd35

include/cpython/longintrepr.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ typedef long stwodigits; /* signed variant of twodigits */
7171
0 <= ob_digit[i] <= MASK.
7272
The allocation function takes care of allocating extra memory
7373
so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available.
74+
We always allocate memory for at least one digit, so accessing ob_digit[0]
75+
is always safe. However, in the case ob_size == 0, the contents of
76+
ob_digit[0] may be undefined.
7477
7578
CAUTION: Generic code manipulating subtypes of PyVarObject has to
7679
aware that ints abuse ob_size's sign bit.

include/dynamic_annotations.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
Actual implementation of these macros may differ depending on the
4545
dynamic analysis tool being used.
4646
47-
See http://code.google.com/p/data-race-test/ for more information.
47+
See https://code.google.com/p/data-race-test/ for more information.
4848
4949
This file supports the following dynamic analysis tools:
5050
- None (DYNAMIC_ANNOTATIONS_ENABLED is not defined or zero).
@@ -140,7 +140,7 @@
140140
of the mutex's critical sections individually using the annotations above.
141141
This annotation makes sense only for hybrid race detectors. For pure
142142
happens-before detectors this is a no-op. For more details see
143-
http://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid . */
143+
https://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid . */
144144
#define _Py_ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(mu) \
145145
AnnotateMutexIsUsedAsCondVar(__FILE__, __LINE__, mu)
146146

include/internal/pycore_frame.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ static inline void _PyFrame_StackPush(_PyInterpreterFrame *f, PyObject *value) {
9494

9595
void _PyFrame_Copy(_PyInterpreterFrame *src, _PyInterpreterFrame *dest);
9696

97-
/* Consumes reference to func */
97+
/* Consumes reference to func and locals.
98+
Does not initialize frame->previous, which happens
99+
when frame is linked into the frame stack.
100+
*/
98101
static inline void
99102
_PyFrame_InitializeSpecials(
100103
_PyInterpreterFrame *frame, PyFunctionObject *func,

include/patchlevel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
/*--start constants--*/
1919
#define PY_MAJOR_VERSION 3
2020
#define PY_MINOR_VERSION 11
21-
#define PY_MICRO_VERSION 0
21+
#define PY_MICRO_VERSION 2
2222
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
2323
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.11.0"
26+
#define PY_VERSION "3.11.2"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

src/api/command.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include <llapi/LoggerAPI.h>
44

5+
#include <llapi/mc/CommandBlockName.hpp>
6+
#include <llapi/mc/CommandBlockNameResult.hpp>
57
#include <llapi/mc/Dimension.hpp>
68
#include <llapi/mc/ItemInstance.hpp>
79
#include <llapi/mc/ItemStack.hpp>
@@ -69,8 +71,9 @@ py::object CastResult(const DynamicCommand::Result& result) {
6971
.value_or(ItemInstance::EMPTY_ITEM))));
7072
case DynamicCommand::ParameterType::Block:
7173
return py::cast(BlockClass(BlockInstance::createBlockInstance(
72-
const_cast<Block*>(result.getRaw<Block const*>()), BlockPos::MIN,
73-
-1)));
74+
const_cast<Block*>(
75+
result.getRaw<CommandBlockName>().resolveBlock(0).getBlock()),
76+
BlockPos::MIN, -1)));
7477
case DynamicCommand::ParameterType::Effect:
7578
return py::str(result.getRaw<MobEffect const*>()->getResourceName());
7679
case DynamicCommand::ParameterType::Enum:

src/api/event.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,13 @@ void EnableEventListener(EventCode event_code) {
295295
break;
296296
case EventCode::onMove:
297297
logger.warn("onMove was invaliable!");
298-
//PlayerMoveEvent::subscribe([](const PlayerMoveEvent& ev) {
299-
// EVENT_BEGIN(EventCode::onMove);
300-
// EVENT_INSERT(Player);
301-
// EVENT_INSERT(Pos);
302-
// EVENT_END;
303-
//});
304-
//break;
298+
// PlayerMoveEvent::subscribe([](const PlayerMoveEvent& ev) {
299+
// EVENT_BEGIN(EventCode::onMove);
300+
// EVENT_INSERT(Player);
301+
// EVENT_INSERT(Pos);
302+
// EVENT_END;
303+
// });
304+
// break;
305305
case EventCode::onChangeSprinting:
306306
PlayerSprintEvent::subscribe([](const PlayerSprintEvent& ev) {
307307
EVENT_BEGIN(EventCode::onChangeSprinting);
@@ -626,9 +626,9 @@ void EnableEventListener(EventCode event_code) {
626626
EVENT_END;
627627
});
628628
break;
629-
case EventCode::onMobSpawn:
630-
MobSpawnEvent::subscribe([](const MobSpawnEvent& ev) {
631-
EVENT_BEGIN(EventCode::onMobSpawn);
629+
case EventCode::onMobTrySpawn:
630+
MobTrySpawnEvent::subscribe([](const MobTrySpawnEvent& ev) {
631+
EVENT_BEGIN(EventCode::onMobTrySpawn);
632632
EVENT_INSERT(TypeName);
633633
EVENT_INSERT(Pos);
634634
EVENT_INSERT(DimensionId);

0 commit comments

Comments
 (0)