Compare commits

..

5 Commits

4 changed files with 21 additions and 21 deletions
+9 -9
View File
@@ -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<bool(int lightningLevel, int rainLevel, int lightningLast, int rainLast)>(
eventName,
@@ -53,7 +53,7 @@ void Export_Event_API() {
);
return true;
}
case do_hash("onMobPick"): {
case doHash("onMobPick"): {
auto Call = RemoteCall::importAs<bool(Actor * mob, Actor * item)>(eventName, eventId);
eventBus->emplaceListener<GMLIB::Event::EntityEvent::MobPickupItemBeforeEvent>(
[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<Vec3, int> position, Actor* spawner)>(eventName, eventId);
eventBus->emplaceListener<GMLIB::Event::EntityEvent::ItemActorSpawnBeforeEvent>(
@@ -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<Vec3, int> 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<bool(std::string author, std::string message)>(eventName, eventId);
eventBus->emplaceListener<GMLIB::Event::PacketEvent::TextPacketSendBeforeEvent>(
[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<bool(Player * pl)>(eventName, eventId);
eventBus->emplaceListener<GMLIB::Event::PlayerEvent::PlayerStopSleepBeforeEvent>(
[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<bool(std::string message, std::vector<std::string>, Actor * dead)>(
eventName,
eventId
+8 -8
View File
@@ -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);
}
);
// 错误方块清理
+3 -3
View File
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/GroupMountain/GMLIB-LegacyRemoteCallApi",
"version": "0.9.1",
"version": "0.9.3",
"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.3/GMLIB-LegacyRemoteCallApi-windows-x64.zip",
"dependencies": {
"github.com/GroupMountain/GMLIB": ">=0.9.2"
"github.com/GroupMountain/GMLIB": ">=0.9.6"
},
"files": {
"place": [