Skip to content

Commit

Permalink
remove PROTOCOL
Browse files Browse the repository at this point in the history
  • Loading branch information
KobeBryant114514 committed Sep 25, 2023
1 parent e85056f commit 12981fa
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 25 deletions.
7 changes: 0 additions & 7 deletions src/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ std::string defaultConfig = R"({
//保存路径为 ./logs/DeathLog.log
//如果未启用控制台死亡信息,此选项无效
"EnableDeathLogFile": false,
//是否修复龙息伤害定义
//在Java版15w31c前,末影龙的龙息攻击使用dragon_breath伤害类型,但之后则改为了indirect_magic伤害类型。
//启用此项后死于龙息会有特殊的死亡信息
"EnableDragonBreathFix": false,
//是否启用玩家进退服信息
"EnableJoin&LeftMessage": false
})";
Expand Down Expand Up @@ -47,9 +43,6 @@ void initConfig() {
if (Plugin_Config.contains("EnableDeathLogFile") && Plugin_Config["EnableDeathLogFile"].is_boolean()) {
FileLog = Plugin_Config["EnableDeathLogFile"].get<bool>();
}
if (Plugin_Config.contains("EnableDragonBreathFix") && Plugin_Config["EnableDragonBreathFix"].is_boolean()) {
fixDragonBreath = Plugin_Config["EnableDragonBreathFix"].get<bool>();
}
if (Plugin_Config.contains("EnableJoin&LeftMessage") && Plugin_Config["EnableJoin&LeftMessage"].is_boolean()) {
JLLog = Plugin_Config["EnableJoin&LeftMessage"].get<bool>();
}
Expand Down
4 changes: 0 additions & 4 deletions src/DamageCause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

extern std::vector<unsigned char> resource;

bool fixDragonBreath = false;
bool ConsoleLog = false;
bool FileLog = false;
bool JLLog = false;
Expand Down Expand Up @@ -67,9 +66,6 @@ void regesterDamageCause() {
GMLib_Mod::addDamageCause(ActorDamageCause::Projectile, "arrow", "minecraft:arrow");
GMLib_Mod::addDamageCause(ActorDamageCause::Projectile, "thrown");
//GMLib_Mod::addDamageCause(ActorDamageCause::Projectile, "generic", "null");
if (fixDragonBreath) {
GMLib_Mod::addDamageCauseWithMessage(ActorDamageCause::Magic, "dragonBreath", "death.attack.dragonBreath.player", "minecraft:ender_dragon");
}
}

void buildResourcePack() {
Expand Down
13 changes: 1 addition & 12 deletions src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ void PluginInit();

Logger logger(PLUGIN_NAME);

void CheckProtocolVersion() {
auto current_protocol = ll::getServerProtocolVersion();
if (TARGET_BDS_PROTOCOL_VERSION != current_protocol) {
logger.error("Protocol version mismatched! Target version: {}. Current version: {}.", TARGET_BDS_PROTOCOL_VERSION, current_protocol);
logger.error("This may result in crash. Please switch to the version matching the BDS version!");
}
else {
PluginInit();
}
}

BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
Expand Down Expand Up @@ -46,6 +35,6 @@ extern "C"
_declspec(dllexport) void onPostInit()
{
std::ios::sync_with_stdio(false);
CheckProtocolVersion();
PluginInit();
}
}
3 changes: 1 addition & 2 deletions src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

#define PLUGIN_VERSION_MAJOR 5
#define PLUGIN_VERSION_MINOR 0
#define PLUGIN_VERSION_REVISION 0
#define TARGET_BDS_PROTOCOL_VERSION 594
#define PLUGIN_VERSION_REVISION 1

#define PLUGIN_VERSION_STATUS 2

Expand Down

0 comments on commit 12981fa

Please sign in to comment.