Skip to content

Commit

Permalink
adapt: adapt LeviLamina v0.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsubasa6848 committed Mar 31, 2024
1 parent 1d67487 commit 0d7bf94
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion SDK-GMLIB
Submodule SDK-GMLIB updated 56 files
+3 −3 GMLIB/Event/Entity/ActorChangeDImensionEvent.h
+3 −3 GMLIB/Event/Entity/DeathMessageEvent.h
+3 −3 GMLIB/Event/Entity/DragonRespawnEvent.h
+1 −1 GMLIB/Event/Entity/ItemActorEvent.h
+3 −3 GMLIB/Event/Entity/ItemActorSpawnEvent.h
+2 −2 GMLIB/Event/Entity/MobHurtEvent.h
+3 −3 GMLIB/Event/Entity/MobPickupItemEvent.h
+3 −3 GMLIB/Event/Entity/ProjectileCreateEvent.h
+3 −3 GMLIB/Event/Level/ExplodeEvent.h
+3 −3 GMLIB/Event/Level/WeatherUpdateEvent.h
+3 −3 GMLIB/Event/Packet/ClientLoginEvent.h
+5 −5 GMLIB/Event/Packet/TextPacketEvent.h
+3 −3 GMLIB/Event/Player/PlayerChangeDimensionEvent.h
+5 −5 GMLIB/Event/Player/PlayerSleepEvent.h
+18 −0 GMLIB/Event/Registries/CreativeItemsInitEvent.h
+6 −6 GMLIB/Event/Registries/JsonItemInitEvent.h
+2 −2 GMLIB/Event/Registries/ResourcePackInitEvent.h
+1 −1 GMLIB/Files/Config/JsonConfig.h
+1 −1 GMLIB/Files/FileUtils.h
+1 −1 GMLIB/Files/JsonFile.h
+1 −1 GMLIB/Files/Language/I18n/JsonI18n.h
+1 −1 GMLIB/Files/Language/JsonLanguage.h
+1 −1 GMLIB/Files/Language/LangLanguage.h
+1 −1 GMLIB/Files/Language/McLang.h
+2 −1 GMLIB/Files/Language/ResourceLanguage.h
+42 −18 GMLIB/GMLIB.h
+7 −0 GMLIB/Macros.h
+1 −1 GMLIB/Mod/Addons/CustomDamageCause.h
+1 −1 GMLIB/Mod/Addons/CustomPacks.h
+1 −1 GMLIB/Mod/Addons/VanillaFix.h
+1 −1 GMLIB/Mod/CustomGenerator/CustomBiome.h
+1 −1 GMLIB/Mod/CustomItem/CustomItem.h
+1 −1 GMLIB/Mod/CustomItem/JsonItem.h
+1 −1 GMLIB/Mod/CustomRecipe/CustomRecipe.h
+1 −1 GMLIB/Mod/CustomRecipe/JsonRecipe.h
+2 −1 GMLIB/Mod/CustomRecipe/Recipe/CustomFurnaceRecipe.h
+2 −1 GMLIB/Mod/CustomRecipe/Recipe/CustomShapedRecipe.h
+4 −3 GMLIB/Mod/CustomRecipe/Recipe/CustomShapelessRecipe.h
+4 −4 GMLIB/Mod/CustomRecipe/Recipe/CustomShulkerBoxRecipe.h
+1 −1 GMLIB/Server/ActorAPI.h
+1 −1 GMLIB/Server/BinaryStreamAPI.h
+13 −3 GMLIB/Server/CompoundTagAPI.h
+1 −1 GMLIB/Server/FakeListAPI.h
+1 −1 GMLIB/Server/FloatingTextAPI.h
+1 −1 GMLIB/Server/FormAPI/NpcDialogueForm.h
+1 −1 GMLIB/Server/FormAPI/ServerSettingForm.h
+43 −8 GMLIB/Server/ItemStackAPI.h
+1 −1 GMLIB/Server/LevelAPI.h
+1 −1 GMLIB/Server/PlaceholderAPI.h
+5 −6 GMLIB/Server/PlayerAPI.h
+1 −1 GMLIB/Server/ScoreboardAPI.h
+1 −1 GMLIB/Server/SpawnerAPI.h
+1 −1 GMLIB/Server/UserCache.h
+2 −0 GMLIB/include_lib.h
+211 −71 GMLIB/include_mc.h
+ Lib/GMLIB.lib
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "native",
"author": "GroupMountain",
"description": "FLoating Text",
"version": "0.9.1",
"version": "0.10.0",
"dependencies": [
{
"name": "GMLIB"
Expand Down
26 changes: 13 additions & 13 deletions src/Forms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ void invalidInputForm(Player& pl, std::string reason) {
tr("form.invalidInput.return"),
tr("form.invalidInput.exit")
);
fm.sendTo(pl, [](Player& pl, ll::form::ModalForm::SelectedButton result) {
if (result == ll::form::ModalForm::SelectedButton::Upper) {
fm.sendTo(pl, [](Player& pl, ll::form::ModalFormResult result, ll::form::FormCancelReason) {
if (result == ll::form::ModalFormSelectedButton::Upper) {
return addForm(pl);
}
return pl.sendMessage(tr("form.closed"));
Expand All @@ -25,11 +25,11 @@ void dynamicForm(Player& pl, std::string text, Vec3 pos, int dimId) {
auto fm = ll::form::CustomForm(tr("form.dynamic.title"));
fm.appendLabel(tr("form.dynamic.lable"));
fm.appendInput("rate", tr("form.dynamic.rate"), tr("form.dynamic.rate"));
fm.sendTo(pl, [text, pos, dimId](Player& pl, const ll::form::CustomFormResult& result) {
if (result.empty()) {
fm.sendTo(pl, [text, pos, dimId](Player& pl, const ll::form::CustomFormResult& result, ll::form::FormCancelReason) {
if (!result.has_value()) {
return addForm(pl);
}
std::string srate = std::get<std::string>(result.at("rate"));
std::string srate = std::get<std::string>(result->at("rate"));
if (isNumber(srate)) {
int rate = std::stoi(srate);
createDynamicFloatingText(text, pos, dimId, rate);
Expand All @@ -51,20 +51,20 @@ void addForm(Player& pl) {
fm.appendInput("pos.z", tr("form.add.pos.z"), tr("form.add.pos.z"), S(pl.getPosition().z));
fm.appendInput("pos.d", tr("form.add.pos.d"), tr("form.add.pos.d"), S(pl.getDimensionId().id));
fm.appendToggle("dynamic", tr("form.add.isDynamic"), false);
fm.sendTo(pl, [](Player& pl, const ll::form::CustomFormResult& result) {
if (result.empty()) {
fm.sendTo(pl, [](Player& pl, const ll::form::CustomFormResult& result, ll::form::FormCancelReason) {
if (!result.has_value()) {
return pl.sendMessage(tr("form.closed"));
}
std::string text = std::get<std::string>(result.at("text"));
std::string text = std::get<std::string>(result->at("text"));
if (text.empty()) {
return invalidInputForm(pl, tr("form.invalidInput.text"));
}
ll::string_utils::replaceAll(text, "\\n", "\n");
std::string sx = std::get<std::string>(result.at("pos.x"));
std::string sy = std::get<std::string>(result.at("pos.y"));
std::string sz = std::get<std::string>(result.at("pos.z"));
std::string sd = std::get<std::string>(result.at("pos.d"));
uint64 dynamic = std::get<uint64_t>(result.at("dynamic"));
std::string sx = std::get<std::string>(result->at("pos.x"));
std::string sy = std::get<std::string>(result->at("pos.y"));
std::string sz = std::get<std::string>(result->at("pos.z"));
std::string sd = std::get<std::string>(result->at("pos.d"));
uint64 dynamic = std::get<uint64_t>(result->at("dynamic"));
if (isNumber(sx) && isNumber(sy) && isNumber(sz) && isNumber(sd)) {
float x = std::stof(sx);
float y = std::stof(sy);
Expand Down
6 changes: 3 additions & 3 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/GroupMountain/FloatingText",
"version": "0.9.1",
"version": "0.10.0",
"info": {
"name": "FloatingText",
"description": "Floating Text Plugin for BDS. Support PlaceholderAPI.",
Expand All @@ -12,9 +12,9 @@
"floatingtext"
]
},
"asset_url": "https://github.com/GroupMountain/FloatingText/releases/download/v0.9.1/FloatingText-windows-x64.zip",
"asset_url": "https://github.com/GroupMountain/FloatingText/releases/download/v0.10.0/FloatingText-windows-x64.zip",
"prerequisites": {
"github.com/LiteLDev/LeviLamina": "0.9.x"
"github.com/LiteLDev/LeviLamina": "0.10.4"
},
"files": {
"place": [
Expand Down

0 comments on commit 0d7bf94

Please sign in to comment.