Skip to content

Commit

Permalink
Fix typo error in disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhxiao committed Apr 16, 2022
1 parent 66e2716 commit 5ebf054
Show file tree
Hide file tree
Showing 10 changed files with 228 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake-build-debug
cmake-build-release
cmake-build-*
version/PDB-1164.txt
cvdump.exe
PDB导出工具.exe
Expand Down
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ project(mod)
set(CMAKE_CXX_STANDARD 17)
#因为ABI原因这个项目只能msvc编译
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_compile_options(/wd4828 /wd4819 /EHsc /utf-8)
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")

else ()
message(this project don't support GNU gcc or clang, please use MSVC instead)
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)

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")


add_library(${MOD_API_NAME} STATIC
api/BDSMod.cpp
Expand Down Expand Up @@ -42,7 +41,7 @@ add_library(${MOD_API_NAME} STATIC
api/tools/ThreadPool.h
api/language/I18nManager.cpp
api/tools/CastHelper.h

api/Offset.h
)

Expand Down Expand Up @@ -131,4 +130,5 @@ target_include_directories(
api/language/lang
)

target_link_libraries(${MOD_NAME} ${MOD_API_NAME})
target_link_libraries(${MOD_NAME} ${MOD_API_NAME})

4 changes: 4 additions & 0 deletions api/block/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@ namespace trapdoor {
return offset_cast<BlockPos *>(this, off::BLOCKACTOR_GET_POSITION);
// return reinterpret_cast<BlockPos *>(reinterpret_cast<VA>(this) + 44);
}
BlockSource *BlockActor::getBlockSource() {
// TODO
return nullptr;
}

} // namespace trapdoor
4 changes: 3 additions & 1 deletion api/block/Block.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace trapdoor {

class BlockLegacy;

class BlockSource;
class Block {
public:
// 获取方块legacy
Expand All @@ -34,6 +34,8 @@ namespace trapdoor {

//获取方块对象
// Block *getBlock();
//通过方块实体获取方块源
BlockSource* getBlockSource();
};
struct TickNextTickData {
trapdoor::BlockPos pos;
Expand Down
Empty file added make_release.ps1
Empty file.
129 changes: 129 additions & 0 deletions plugins/trapdoor/trapdoor-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@

{
"commands": {
"/tick": {
"enable": true,
"permissionLevel": 1
},
"/village": {
"enable": true,
"permissionLevel": 0
},
"/prof": {
"enable": true,
"permissionLevel": 0
},
"/mspt": {
"enable": true,
"permissionLevel": 0
},
"/o": {
"enable": true,
"permissionLevel": 1
},
"/c": {
"enable": true,
"permissionLevel": 1
},
"/s": {
"enable": true,
"permissionLevel": 1
},
"/hsa": {
"enable": true,
"permissionLevel": 0
},
"/func": {
"enable": true,
"permissionLevel": 1
},
"/counter": {
"enable": true,
"permissionLevel": 1
},
"/td?": {
"enable": true,
"permissionLevel": 0
},
"/os": {
"enable": true,
"permissionLevel": 0
},
"/apicfg": {
"enable": true,
"permissionLevel": 1
},
"/draw": {
"enable": true,
"permissionLevel": 0
},
"/slime": {
"enable": true,
"permissionLevel": 0
},
"/backup": {
"enable": true,
"permissionLevel": 1
},
"/self": {
"enable": true,
"permissionLevel": 0
},
"/cl": {
"enable": true,
"permissionLevel": 0
},
"/dev": {
"enable": true,
"permissionLevel": 1
},
"/here": {
"enable": true,
"permissionLevel": 0
},
"/l": {
"enable": true,
"permissionLevel": 1
},
"/lang": {
"enable": true,
"permissionLevel": 1
},
"/spawn": {
"enable": true,
"permissionLevel": 0
},
"/fakeplayer": {
"enable": true,
"permissionLevel": 1
},
"/rs": {
"enable": true,
"permissionLevel": 1
}
},
"lowLevelVanillaCommands": [],
"server": {
"levelName": "Bedrock level",
"lang": "zh_cn",
"ws": "ws://127.0.0.1:54321"
},
"village": {
"bound": "red",
"spawn": "blue",
"poiQuery": "red",
"center": "minecraft:heart_particle"
},
"functionsEnable": {
"hopperCounter": false,
"spawnHelper": false,
"cactusRotate": false,
"simpleDraw": false,
"playerStat": false
},
"selfEnable": {
"chunkShow": true,
"distanceMeasure": true,
"redstoneStick": true
}
}
80 changes: 80 additions & 0 deletions plugins/trapdoor/trapdoor.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[04-15 20:04:18TRAPDOOR INFO](trapdoor::lang::tryChangeLang) set language to en_us
[04-15 20:04:18TRAPDOOR DEBUG](trapdoor::initializeMod) create BDS mod instance
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::initialize) begin read config file plugins/trapdoor/trapdoor-config.json
[04-15 20:04:18TRAPDOOR WARN](mod::ConfigManager::readConfigFile) Can not find config file,trapdoor will generate a defalue one [plugins/trapdoor/trapdoor-config.json]
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readConfigFile) read config file plugins/trapdoor/trapdoor-config.json successfully
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readDevOption) begin read dev options
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) begin read command permission info
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /apicfg enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /backup enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /c enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /cl enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /counter enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /dev enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /draw enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /fakeplayer enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /func enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /here enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /hsa enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /l enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /lang enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /mspt enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /o enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /os enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /prof enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /rs enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /s enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /self enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /slime enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /spawn enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /td? enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /tick enable:1 level:1
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) - /village enable:1 level:0
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readCommandConfig) read command permission info successfully
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readLowLevelVanillaCommands) begin read low level vanilla command info
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readLowLevelVanillaCommands) here are the all low level commands:
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readLowLevelVanillaCommands) read low level vanilla commands successfully
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readServerConfig) begin read server info
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readServerConfig) - levelMame : Bedrock level
read server info successfully
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readVillageConfig) begin read village config info
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readVillageConfig) - bound color: red
- spawn color: blue
- poiQueryColor: red
- center:minecraft:heart_particle
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readVillageConfig) read village color successfully
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readFunctionConfig) begin read function config
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readFunctionConfig) read function config successfully
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readSelfConfig) begin read self command config
[04-15 20:04:18TRAPDOOR DEBUG](mod::ConfigManager::readSelfConfig) read self command config successfully
[04-15 20:04:19TRAPDOOR DEBUG](TDHook_51CommandRegistry_registerCommand_8574de98::p) set command Registry 000001D544239950
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::BDSMod::setCommandRegistry) set commandRegistry
[04-15 20:04:19TRAPDOOR DEBUG](TDHook_51CommandRegistry_registerCommand_8574de98::p) init commandRegistry
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::BDSMod::registerCommands) begin register command
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command lang
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command apicfg
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command tick
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command prof
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command mspt
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command backup
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command hsa
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command draw
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command village
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command counter
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command o
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command s
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command c
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command slime
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command func
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command self
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command here
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command l
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command os
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command cl
[04-15 20:04:19TRAPDOOR DEBUG](trapdoor::CommandManager::registerCmd) register command td?
[04-15 20:04:20TRAPDOOR DEBUG](TDHook_248ServerLevel_tick_86efb826::p) init level obj
[04-15 20:04:20TRAPDOOR DEBUG](trapdoor::BDSMod::setLevel) init server level
[04-15 20:04:20TRAPDOOR DEBUG](mod::TrapdoorMod::initialize) mod init
[04-15 20:04:20TRAPDOOR DEBUG](trapdoor::BDSMod::initialize) init thread pool
[04-15 20:04:20TRAPDOOR DEBUG](trapdoor::CommandManager::setCommandConfig) set command permission info
[04-15 20:04:20TRAPDOOR DEBUG](mod::initBackup) create backup folder
1 change: 0 additions & 1 deletion tools/scripts/build.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Set-Location ../../cmake-build-release
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
1 change: 1 addition & 0 deletions tools/scripts/run.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MCDllInject.exe "C:\Users\xhy\Desktop\bedrock-server-1.18.12.01\bedrock_server.exe" ".\bin\Release"
2 changes: 1 addition & 1 deletion trapdoor-disclaimer.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ want to bear such risk, please stop using td plugin.
appendix:
Here are some suggestions for use:
- Update the plug-in to the new version in time, because the td is still a beta version, the more you update it, the
less bugs you can expect
fewer bugs you can expect
- Try to turn off unused functions
- Timely backup and archive is always a good habit

Expand Down

0 comments on commit 5ebf054

Please sign in to comment.