Skip to content

Commit

Permalink
Merge pull request #82 from quizhizhe/1.18.30.04
Browse files Browse the repository at this point in the history
Support 1.18.30.04
  • Loading branch information
hhhxiao authored Apr 24, 2022
2 parents 2b4bbb7 + f43d704 commit aeeb3c1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ project(mod)
set(CMAKE_CXX_STANDARD 17)
#因为ABI原因这个项目只能msvc编译
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_compile_options(/wd4828 /wd4819 /Zi /EHsc /utf-8 /MP)
#set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ")
#set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
add_compile_options(/wd4828 /wd4819 /EHsc /utf-8)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")

else ()
message(this project don't support GNU gcc, please use MSVC instead)
endif ()
#set(CMAKE_BUILD_TYPE release)
set(CMAKE_BUILD_TYPE release)
set(MOD_API_NAME trapdoor)


Expand Down Expand Up @@ -62,8 +62,8 @@ target_include_directories(${MOD_API_NAME}
target_link_libraries(${MOD_API_NAME} ${PROJECT_SOURCE_DIR}/api/lib/detours.lib)

####################这里是具体功能##########################
set(TRAPDOOR_VERSION 0.10.2)
set(MCBE_VERSION 1.18.12.01)
set(TRAPDOOR_VERSION 0.10.3)
set(MCBE_VERSION 1.18.30.04)
set(BETA OFF)
set(TEST_NUMBER 1)
add_definitions(-DTD_VERSION="${TRAPDOOR_VERSION}")
Expand Down
2 changes: 1 addition & 1 deletion api/block/BlockSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace trapdoor {

void BlockSource::setBlock(BlockPos *blockPos, Block *block) {
SYM_CALL(void (*)(void *, int, int, int, Block *, int),
BlockSource_setBlock_71ce9a25, this, blockPos->x, blockPos->y,
BlockSource_setBlock_30b3a288, this, blockPos->x, blockPos->y,
blockPos->z, block, 3);
}

Expand Down
2 changes: 1 addition & 1 deletion api/entity/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace trapdoor {
}

Vec3 *Actor::getPos() {
return SYM_CALL(Vec3 * (*)(void *), SymHook::Actor_getPos_cecb628b,
return SYM_CALL(Vec3 * (*)(void *), SymHook::Actor_getPosition_8f5a9c5f,
this);
}

Expand Down
Binary file modified api/lib/SymHook.h
Binary file not shown.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.18.30.04-0.10.3
- 支持1.18.30.04
- 打包脚本添加语言文件

# 1.18.12.01-0.10.2
- 新加`prof chunk`显示每个区块的卡顿情况(固定测量20gt)
- 新加 `prof pt`显示每个区块的计划刻(Pending tick)队列溢出情况(固定测量20gt)
Expand Down
18 changes: 12 additions & 6 deletions tools/package/npack.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os
import zipfile

project_root_dir = 'C:/Users/xhy/dev/TrapDoor/'
build_dir = 'build/'
other_files = ['changelog.md',
'trapdoor-disclaimer.md',
'LICENSE'
# project_root_dir = 'C:/Users/xhy/dev/TrapDoor/'
project_root_dir = os.path.abspath('../..')
build_dir = '/build/'
lang_dir = '/tools/package/lang/'
other_files = ['/changelog.md',
'/trapdoor-disclaimer.md',
'/LICENSE'
]


Expand Down Expand Up @@ -47,10 +49,14 @@ def pack(dll_file):
version + '.dll', arcname=version+'.dll')
release_zip_file.write(project_root_dir + build_dir +
version + '.pdb', arcname=version+'.pdb')
release_zip_file.write(project_root_dir + lang_dir +
'zh_cn.json', arcname= 'trapdoor/lang/zh_cn.json')
release_zip_file.write(project_root_dir + lang_dir +
'en_us.json', arcname= 'trapdoor/lang/en_us.json')
for other_file in other_files:
print('pack: ' + other_file)
release_zip_file.write(project_root_dir+other_file,
arcname='others/'+other_file)
arcname='trapdoor/others/'+other_file)
release_zip_file.close()
input('success pack release:' + version+'.zip\n')

Expand Down

0 comments on commit aeeb3c1

Please sign in to comment.