diff --git a/SDK-GMLIB b/SDK-GMLIB index 2bb9134..b1e7ebd 160000 --- a/SDK-GMLIB +++ b/SDK-GMLIB @@ -1 +1 @@ -Subproject commit 2bb91343e1885f21937705b8fcce304b94bc40ba +Subproject commit b1e7ebd770e667604016f93dc43359dc8212c043 diff --git a/src/EventAPI.cpp b/src/EventAPI.cpp index a4c1e25..0011644 100644 --- a/src/EventAPI.cpp +++ b/src/EventAPI.cpp @@ -8,8 +8,8 @@ void Export_Event_API() { "callCustomEvent", [eventBus](std::string eventName, std::string eventId) -> bool { if (RemoteCall::hasFunc(eventName, eventId)) { - switch (do_hash(eventName)) { - case do_hash("onClientLogin"): { + switch (doHash(eventName)) { + case doHash("onClientLogin"): { auto Call = RemoteCall::importAs< bool(std::string realName, std::string uuid, std::string serverXuid, std::string clientXuid)>( eventName, @@ -29,7 +29,7 @@ void Export_Event_API() { ); return true; } - case do_hash("onWeatherChange"): { + case doHash("onWeatherChange"): { auto Call = RemoteCall::importAs( eventName, @@ -53,7 +53,7 @@ void Export_Event_API() { ); return true; } - case do_hash("onMobPick"): { + case doHash("onMobPick"): { auto Call = RemoteCall::importAs(eventName, eventId); eventBus->emplaceListener( [Call](GMLIB::Event::EntityEvent::MobPickupItemBeforeEvent& ev) { @@ -68,7 +68,7 @@ void Export_Event_API() { ); return true; } - case do_hash("onItemTrySpawn"): { + case doHash("onItemTrySpawn"): { auto Call = RemoteCall::importAs< bool(const ItemStack* item, std::pair position, Actor* spawner)>(eventName, eventId); eventBus->emplaceListener( @@ -87,7 +87,7 @@ void Export_Event_API() { ); return true; } - case do_hash("onItemSpawned"): { + case doHash("onItemSpawned"): { auto Call = RemoteCall::importAs< bool(const ItemStack* item, Actor* itemActor, std::pair position, Actor* spawner)>( eventName, @@ -105,7 +105,7 @@ void Export_Event_API() { ); return true; } - case do_hash("onTextSend"): { + case doHash("onTextSend"): { auto Call = RemoteCall::importAs(eventName, eventId); eventBus->emplaceListener( [Call](GMLIB::Event::PacketEvent::TextPacketSendBeforeEvent& ev) { @@ -121,7 +121,7 @@ void Export_Event_API() { ); return true; } - case do_hash("onLeaveBed"): { + case doHash("onLeaveBed"): { auto Call = RemoteCall::importAs(eventName, eventId); eventBus->emplaceListener( [Call](GMLIB::Event::PlayerEvent::PlayerStopSleepBeforeEvent& ev) { @@ -136,7 +136,7 @@ void Export_Event_API() { ); return true; } - case do_hash("onDeathMessage"): { + case doHash("onDeathMessage"): { auto Call = RemoteCall::importAs, Actor * dead)>( eventName, eventId diff --git a/src/LegacyModApi.cpp b/src/LegacyModApi.cpp index 51a4eb0..b9b5846 100644 --- a/src/LegacyModApi.cpp +++ b/src/LegacyModApi.cpp @@ -33,7 +33,7 @@ void Export_Legacy_GMLib_ModAPI() { } auto res = RecipeIngredient(result, 0, count); auto unl = makeRecipeUnlockingKey(unlock); - GMLIB::Mod::CustomRecipe::registerShapelessCraftingTableRecipe(recipe_id, types, res, unl); + GMLIB::Mod::JsonRecipe::registerShapelessCraftingTableRecipe(recipe_id, types, res, unl); } ); RemoteCall::exportAs( @@ -56,7 +56,7 @@ void Export_Legacy_GMLib_ModAPI() { } auto res = RecipeIngredient(result, 0, count); auto unl = makeRecipeUnlockingKey(unlock); - GMLIB::Mod::CustomRecipe::registerShapedCraftingTableRecipe(recipe_id, shape, types, res, unl); + GMLIB::Mod::JsonRecipe::registerShapedCraftingTableRecipe(recipe_id, shape, types, res, unl); } ); RemoteCall::exportAs( @@ -69,7 +69,7 @@ void Export_Legacy_GMLib_ModAPI() { } auto inp = RecipeIngredient(input, 0, 1); auto outp = RecipeIngredient(output, 0, 1); - GMLIB::Mod::CustomRecipe::registerFurnaceRecipe(recipe_id, inp, outp, tags); + GMLIB::Mod::JsonRecipe::registerFurnaceRecipe(recipe_id, inp, outp, tags); } ); RemoteCall::exportAs( @@ -81,7 +81,7 @@ void Export_Legacy_GMLib_ModAPI() { return; } auto rea = RecipeIngredient(reagent, 0, 1); - GMLIB::Mod::CustomRecipe::registerBrewingMixRecipe(recipe_id, input, output, rea); + GMLIB::Mod::JsonRecipe::registerBrewingMixRecipe(recipe_id, input, output, rea); } ); RemoteCall::exportAs( @@ -95,7 +95,7 @@ void Export_Legacy_GMLib_ModAPI() { auto inp = RecipeIngredient(input, 0, 1); auto outp = RecipeIngredient(output, 0, 1); auto rea = RecipeIngredient(reagent, 0, 1); - GMLIB::Mod::CustomRecipe::registerBrewingContainerRecipe(recipe_id, inp, outp, rea); + GMLIB::Mod::JsonRecipe::registerBrewingContainerRecipe(recipe_id, inp, outp, rea); } ); RemoteCall::exportAs( @@ -110,7 +110,7 @@ void Export_Legacy_GMLib_ModAPI() { if (!level) { return; } - GMLIB::Mod::CustomRecipe::registerSmithingTransformRecipe( + GMLIB::Mod::JsonRecipe::registerSmithingTransformRecipe( recipe_id, smithing_template, base, @@ -127,7 +127,7 @@ void Export_Legacy_GMLib_ModAPI() { if (!level) { return; } - GMLIB::Mod::CustomRecipe::registerSmithingTrimRecipe(recipe_id, smithing_template, base, addition); + GMLIB::Mod::JsonRecipe::registerSmithingTrimRecipe(recipe_id, smithing_template, base, addition); } ); RemoteCall::exportAs( @@ -145,7 +145,7 @@ void Export_Legacy_GMLib_ModAPI() { } auto inp = RecipeIngredient(input, 0, 1); auto outp = RecipeIngredient(output, 0, 1); - GMLIB::Mod::CustomRecipe::registerStoneCutterRecipe(recipe_id, inp, outp); + GMLIB::Mod::JsonRecipe::registerStoneCutterRecipe(recipe_id, inp, outp); } ); // 错误方块清理 diff --git a/tooth.json b/tooth.json index 454d9bb..0036ea3 100644 --- a/tooth.json +++ b/tooth.json @@ -1,7 +1,7 @@ { "format_version": 2, "tooth": "github.com/GroupMountain/GMLIB-LegacyRemoteCallApi", - "version": "0.9.1", + "version": "0.9.2", "info": { "name": "GMLIB-LegacyRemoteCallApi", "description": "Legacy RemoteCall API for GMLIB", @@ -14,9 +14,9 @@ "library" ] }, - "asset_url": "https://github.com/GroupMountain/GMLIB-LegacyRemoteCallApi/releases/download/v0.9.1/GMLIB-LegacyRemoteCallApi-windows-x64.zip", + "asset_url": "https://github.com/GroupMountain/GMLIB-LegacyRemoteCallApi/releases/download/v0.9.2/GMLIB-LegacyRemoteCallApi-windows-x64.zip", "dependencies": { - "github.com/GroupMountain/GMLIB": ">=0.9.2" + "github.com/GroupMountain/GMLIB": ">=0.9.6" }, "files": { "place": [