Skip to content

Commit

Permalink
Merge branch '1.19.4' into 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke100000 committed Jul 31, 2023
2 parents 1aa6c8f + cae79ab commit ee23d03
Show file tree
Hide file tree
Showing 68 changed files with 597 additions and 122 deletions.
27 changes: 20 additions & 7 deletions common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -777,13 +777,13 @@ private void rebuild() {
switch (page) {
case LIBRARY -> {
//page
addDrawableChild(new ButtonWidget(width / 2 - 25 - 30, height / 2 + 80, 30, 20, Text.literal("<<"), sender -> {
addDrawableChild(new ButtonWidget(width / 2 - 30 - 30, height / 2 + 80, 30, 20, Text.literal("<<"), sender -> {
setSelectionPage(selectionPage - 1);
refreshContentList();
}));
pageWidget = addDrawableChild(new ButtonWidget(width / 2 - 25, height / 2 + 80, 50, 20, Text.literal(""), sender -> {
pageWidget = addDrawableChild(new ButtonWidget(width / 2 - 30, height / 2 + 80, 60, 20, Text.literal(""), sender -> {
}));
addDrawableChild(new ButtonWidget(width / 2 + 25, height / 2 + 80, 30, 20, Text.literal(">>"), sender -> {
addDrawableChild(new ButtonWidget(width / 2 + 30, height / 2 + 80, 30, 20, Text.literal(">>"), sender -> {
setSelectionPage(selectionPage + 1);
refreshContentList();
}));
Expand Down Expand Up @@ -885,6 +885,14 @@ private void rebuild() {

drawControls(c, false, cx, cy);

//quick invalid toggle
if (isModerator()) {
addDrawableChild(new ToggleableTooltipIconButtonWidget(cx + 16, cy - 48, 10 * 16, 3 * 16,
false,
Text.literal("Toggle invalid"),
v -> setTag(c.contentid(), "invalid", !c.hasTag("invalid"))));
}

//sorting icons
if (c.tags().contains("invalid")) {
addDrawableChild(new ToggleableTooltipIconButtonWidget(cx + 12, cy - 16, 9 * 16, 3 * 16,
Expand Down Expand Up @@ -1306,7 +1314,7 @@ private void drawControls(LiteContent content, boolean advanced, int cx, int cy)
}

// report
if (advanced) {
if (advanced && authenticated) {
widgets.add(new ToggleableTooltipIconButtonWidget(cx - 12 + 25, cy, 10 * 16, 3 * 16,
true,
Text.translatable("gui.skin_library.report"),
Expand Down Expand Up @@ -1335,7 +1343,8 @@ private void drawControls(LiteContent content, boolean advanced, int cx, int cy)
v -> {
if (isPanning && isModerator()) {
//admin tool
removeContent(content.contentid());
reportContent(content.contentid(), "DEFAULT");
refreshContentList();
} else {
focusedContent = content;
setPage(Page.DETAIL);
Expand Down Expand Up @@ -1503,7 +1512,11 @@ private void refreshContentList() {
// last page reached, go one back
if (contents.isEmpty() && selectionPage > 0) {
selectionPage--;
refreshContentList();
if (subscriptionFilter == SubscriptionFilter.LIBRARY) {
loadPage();
} else {
refreshContentList();
}
return;
}

Expand All @@ -1523,7 +1536,7 @@ private boolean isOp() {
private void setSelectionPage(int p) {
if (pageWidget != null) {
selectionPage = Math.max(0, p);
pageWidget.setMessage(Text.literal(String.valueOf(selectionPage + 1)));
pageWidget.setMessage(Text.translatable("gui.villager_editor.page", selectionPage + 1));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private static void loadResources(int contentid) {

private static void logger(String s) {
//noinspection ConstantConditions
if (true) {
if (false) {
MCA.LOGGER.info(s);
}
}
Expand Down
17 changes: 14 additions & 3 deletions common/src/main/resources/assets/mca/lang/af_za.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,14 @@
"gui.skin_library.authenticating": "Authenticating",
"gui.skin_library.authenticating_browser": "Complete authentication in your browser!",
"gui.skin_library.delete_confirm": "Do you really want to delete this content?",
"gui.skin_library.report_confirm": "Why do you want to report this content?",
"gui.skin_library.report_invalid": "Invalid Texture",
"gui.skin_library.report_invalid_tooltip": "This is not pure hair/clothing and thus does not work correctly. It should get labeled as 'invalid'.",
"gui.skin_library.report_default": "Against Rules",
"gui.skin_library.report_default_tooltip": "This content is against the rules as specified at the help page.",
"gui.skin_library.search": "Search",
"gui.skin_library.cancel": "Cancel",
"gui.skin_library.reported": "Reported!",
"gui.skin_library.drop": "Drop an image here, enter a file path or URL to start.",
"gui.skin_library.locked": "To publish skins, please log in first.",
"gui.skin_library.like_locked": "Please log in to see liked or submitted content.",
Expand All @@ -318,11 +324,16 @@
"gui.skin_library.subscribe": "Use server wide!",
"gui.skin_library.sort_likes": "Sort by likes",
"gui.skin_library.sort_newest": "Sort by date",
"gui.skin_library.filter_invalid": "Filter invalid content",
"gui.skin_library.filter_invalid": "Hide invalid content",
"gui.skin_library.filter_hair": "Hide hair",
"gui.skin_library.filter_clothing": "Hide clothing",
"gui.skin_library.filter_moderator": "Show banned content only",
"gui.skin_library.like": "Like",
"gui.skin_library.edit": "Edit",
"gui.skin_library.delete": "Delete",
"gui.skin_library.ban": "Ban",
"gui.skin_library.unban": "Unban",
"gui.skin_library.report": "Report",
"gui.skin_library.details": "Details",
"gui.skin_library.add": "Add",
"gui.skin_library.add.tooltip": "Tagging content helps user find and filter for specific assets.",
Expand Down Expand Up @@ -396,6 +407,7 @@
"gui.destiny.village_snowy": "Snowy Village",
"gui.destiny.village_plains": "Plains Village",
"gui.destiny.village_savanna": "Savanna Village",
"gui.destiny.ancient_city": "Ancient City",
"destiny.story.reason/1": "One day, you had enough and decided on a journey to explore the world.",
"destiny.story.travelling/1": "You conquered snowy mountains and muggy swamps, Avoiding Husks in the endless deserts.",
"destiny.story.somewhere/1": "You are stranded without food and shelter in the middle of nowhere.",
Expand All @@ -406,15 +418,14 @@
"destiny.story.village_snowy/1": "You fight your way through a heavy snowstorm when you see dim lights up ahead. It is a village, maybe they have an inn to warm up?",
"destiny.story.village_plains/1": "In the middle of a plains biome, a few villagers built themselves a settlement. The climate is moderate, the people friendly, perhaps they have place for another settler?",
"destiny.story.village_savanna/1": "Finally you find a village between dry trees and grass. Let's see if they are friendly!",
"destiny.story.ancient_city/1": "But an unfortunate misstep sends you tumbling into a deep, dark cave. When you regain consciousness, you find yourself surrounded by the ancient ruins of a city forgotten by the world for eons.",
"gui.blueprint.taxes": "Taxes",
"gui.blueprint.birth": "Birth limit",
"gui.blueprint.marriage": "Marriage limit",
"gui.blueprint.guards": "Guards",
"gui.blueprint.rankTooLow": "You need a higher rank.",
"gui.blueprint.currentRank": "Rank: %1$s",
"gui.blueprint.reputation": "Hearts: %1$s",
"gui.blueprint.size": "Size: %1$s blocks",
"gui.blueprint.anySize": "Size: any",
"gui.blueprint.buildings": "Buildings: %1$s",
"gui.blueprint.population": "Population: %1$s of %2$s",
"gui.blueprint.map": "Map",
Expand Down
17 changes: 14 additions & 3 deletions common/src/main/resources/assets/mca/lang/ar_sa.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,14 @@
"gui.skin_library.authenticating": "Authenticating",
"gui.skin_library.authenticating_browser": "Complete authentication in your browser!",
"gui.skin_library.delete_confirm": "Do you really want to delete this content?",
"gui.skin_library.report_confirm": "Why do you want to report this content?",
"gui.skin_library.report_invalid": "Invalid Texture",
"gui.skin_library.report_invalid_tooltip": "This is not pure hair/clothing and thus does not work correctly. It should get labeled as 'invalid'.",
"gui.skin_library.report_default": "Against Rules",
"gui.skin_library.report_default_tooltip": "This content is against the rules as specified at the help page.",
"gui.skin_library.search": "Search",
"gui.skin_library.cancel": "Cancel",
"gui.skin_library.reported": "Reported!",
"gui.skin_library.drop": "Drop an image here, enter a file path or URL to start.",
"gui.skin_library.locked": "To publish skins, please log in first.",
"gui.skin_library.like_locked": "Please log in to see liked or submitted content.",
Expand All @@ -318,11 +324,16 @@
"gui.skin_library.subscribe": "Use server wide!",
"gui.skin_library.sort_likes": "Sort by likes",
"gui.skin_library.sort_newest": "Sort by date",
"gui.skin_library.filter_invalid": "Filter invalid content",
"gui.skin_library.filter_invalid": "Hide invalid content",
"gui.skin_library.filter_hair": "Hide hair",
"gui.skin_library.filter_clothing": "Hide clothing",
"gui.skin_library.filter_moderator": "Show banned content only",
"gui.skin_library.like": "Like",
"gui.skin_library.edit": "Edit",
"gui.skin_library.delete": "Delete",
"gui.skin_library.ban": "Ban",
"gui.skin_library.unban": "Unban",
"gui.skin_library.report": "Report",
"gui.skin_library.details": "Details",
"gui.skin_library.add": "Add",
"gui.skin_library.add.tooltip": "Tagging content helps user find and filter for specific assets.",
Expand Down Expand Up @@ -396,6 +407,7 @@
"gui.destiny.village_snowy": "Snowy Village",
"gui.destiny.village_plains": "Plains Village",
"gui.destiny.village_savanna": "Savanna Village",
"gui.destiny.ancient_city": "Ancient City",
"destiny.story.reason/1": "One day, you had enough and decided on a journey to explore the world.",
"destiny.story.travelling/1": "You conquered snowy mountains and muggy swamps, Avoiding Husks in the endless deserts.",
"destiny.story.somewhere/1": "You are stranded without food and shelter in the middle of nowhere.",
Expand All @@ -406,15 +418,14 @@
"destiny.story.village_snowy/1": "You fight your way through a heavy snowstorm when you see dim lights up ahead. It is a village, maybe they have an inn to warm up?",
"destiny.story.village_plains/1": "In the middle of a plains biome, a few villagers built themselves a settlement. The climate is moderate, the people friendly, perhaps they have place for another settler?",
"destiny.story.village_savanna/1": "Finally you find a village between dry trees and grass. Let's see if they are friendly!",
"destiny.story.ancient_city/1": "But an unfortunate misstep sends you tumbling into a deep, dark cave. When you regain consciousness, you find yourself surrounded by the ancient ruins of a city forgotten by the world for eons.",
"gui.blueprint.taxes": "Taxes",
"gui.blueprint.birth": "Birth limit",
"gui.blueprint.marriage": "Marriage limit",
"gui.blueprint.guards": "Guards",
"gui.blueprint.rankTooLow": "You need a higher rank.",
"gui.blueprint.currentRank": "Rank: %1$s",
"gui.blueprint.reputation": "Hearts: %1$s",
"gui.blueprint.size": "Size: %1$s blocks",
"gui.blueprint.anySize": "Size: any",
"gui.blueprint.buildings": "Buildings: %1$s",
"gui.blueprint.population": "Population: %1$s of %2$s",
"gui.blueprint.map": "Map",
Expand Down
17 changes: 14 additions & 3 deletions common/src/main/resources/assets/mca/lang/be_by.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,14 @@
"gui.skin_library.authenticating": "Authenticating",
"gui.skin_library.authenticating_browser": "Complete authentication in your browser!",
"gui.skin_library.delete_confirm": "Do you really want to delete this content?",
"gui.skin_library.report_confirm": "Why do you want to report this content?",
"gui.skin_library.report_invalid": "Invalid Texture",
"gui.skin_library.report_invalid_tooltip": "This is not pure hair/clothing and thus does not work correctly. It should get labeled as 'invalid'.",
"gui.skin_library.report_default": "Against Rules",
"gui.skin_library.report_default_tooltip": "This content is against the rules as specified at the help page.",
"gui.skin_library.search": "Search",
"gui.skin_library.cancel": "Cancel",
"gui.skin_library.reported": "Reported!",
"gui.skin_library.drop": "Drop an image here, enter a file path or URL to start.",
"gui.skin_library.locked": "To publish skins, please log in first.",
"gui.skin_library.like_locked": "Please log in to see liked or submitted content.",
Expand All @@ -318,11 +324,16 @@
"gui.skin_library.subscribe": "Use server wide!",
"gui.skin_library.sort_likes": "Sort by likes",
"gui.skin_library.sort_newest": "Sort by date",
"gui.skin_library.filter_invalid": "Filter invalid content",
"gui.skin_library.filter_invalid": "Hide invalid content",
"gui.skin_library.filter_hair": "Hide hair",
"gui.skin_library.filter_clothing": "Hide clothing",
"gui.skin_library.filter_moderator": "Show banned content only",
"gui.skin_library.like": "Like",
"gui.skin_library.edit": "Edit",
"gui.skin_library.delete": "Delete",
"gui.skin_library.ban": "Ban",
"gui.skin_library.unban": "Unban",
"gui.skin_library.report": "Report",
"gui.skin_library.details": "Details",
"gui.skin_library.add": "Add",
"gui.skin_library.add.tooltip": "Tagging content helps user find and filter for specific assets.",
Expand Down Expand Up @@ -396,6 +407,7 @@
"gui.destiny.village_snowy": "Засьнежаная вёска",
"gui.destiny.village_plains": "Вёска на раўнінах",
"gui.destiny.village_savanna": "Вёска ў саване",
"gui.destiny.ancient_city": "Ancient City",
"destiny.story.reason/1": "Аднойчы, Вам усё надакучыла, і Вы вырашылі адправіцца ў падарожжа, каб пабачыць сьвет...",
"destiny.story.travelling/1": "Вы засвойвалі засьнежаныя горы, і гразкія балоты, пазьбягалі мумій у бяскрайніх пустынях...",
"destiny.story.somewhere/1": "Цяпер Вы апынуліся без ежы і прытулку пасярод глушы.",
Expand All @@ -406,15 +418,14 @@
"destiny.story.village_snowy/1": "Вы прадзіраліся скрозь моцную завіруху, як раптам пабачылі цьмяныя вагні наперадзе. Гэта вёска, мабыць там ёсьць карчма, дзе можна сагрэцца?",
"destiny.story.village_plains/1": "Пасярод раўнінаў некалькі сялян пабудавалі паселішча. Клімат тут умераны, жыхары ветлівыя, мабыць у іх знойдзецца мейсца дзеля новага жыхара?",
"destiny.story.village_savanna/1": "Нарэшце Вы знайшлі вёску пасярод сухіх дрэваў і травы. Варта паглядзець, ці ветлівыя яны!",
"destiny.story.ancient_city/1": "But an unfortunate misstep sends you tumbling into a deep, dark cave. When you regain consciousness, you find yourself surrounded by the ancient ruins of a city forgotten by the world for eons.",
"gui.blueprint.taxes": "Падаткі",
"gui.blueprint.birth": "Ліміт нараджальнасьці",
"gui.blueprint.marriage": "Ліміт шлюбаў/",
"gui.blueprint.guards": "Вартаўнікі",
"gui.blueprint.rankTooLow": "Вам патрэбны вышэйшы ранг.",
"gui.blueprint.currentRank": "Ранг: %1$s",
"gui.blueprint.reputation": "Сэрцаў: %1$s",
"gui.blueprint.size": "Памер: %1$s блокаў",
"gui.blueprint.anySize": "Памер: любы",
"gui.blueprint.buildings": "Будынкаў: %1$s",
"gui.blueprint.population": "Насельніцтва: %1$s з %2$s",
"gui.blueprint.map": "Мапа",
Expand Down
17 changes: 14 additions & 3 deletions common/src/main/resources/assets/mca/lang/cs_cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,14 @@
"gui.skin_library.authenticating": "Authenticating",
"gui.skin_library.authenticating_browser": "Complete authentication in your browser!",
"gui.skin_library.delete_confirm": "Do you really want to delete this content?",
"gui.skin_library.report_confirm": "Why do you want to report this content?",
"gui.skin_library.report_invalid": "Invalid Texture",
"gui.skin_library.report_invalid_tooltip": "This is not pure hair/clothing and thus does not work correctly. It should get labeled as 'invalid'.",
"gui.skin_library.report_default": "Against Rules",
"gui.skin_library.report_default_tooltip": "This content is against the rules as specified at the help page.",
"gui.skin_library.search": "Search",
"gui.skin_library.cancel": "Cancel",
"gui.skin_library.reported": "Reported!",
"gui.skin_library.drop": "Drop an image here, enter a file path or URL to start.",
"gui.skin_library.locked": "To publish skins, please log in first.",
"gui.skin_library.like_locked": "Please log in to see liked or submitted content.",
Expand All @@ -318,11 +324,16 @@
"gui.skin_library.subscribe": "Use server wide!",
"gui.skin_library.sort_likes": "Sort by likes",
"gui.skin_library.sort_newest": "Sort by date",
"gui.skin_library.filter_invalid": "Filter invalid content",
"gui.skin_library.filter_invalid": "Hide invalid content",
"gui.skin_library.filter_hair": "Hide hair",
"gui.skin_library.filter_clothing": "Hide clothing",
"gui.skin_library.filter_moderator": "Show banned content only",
"gui.skin_library.like": "Like",
"gui.skin_library.edit": "Edit",
"gui.skin_library.delete": "Delete",
"gui.skin_library.ban": "Ban",
"gui.skin_library.unban": "Unban",
"gui.skin_library.report": "Report",
"gui.skin_library.details": "Details",
"gui.skin_library.add": "Add",
"gui.skin_library.add.tooltip": "Tagging content helps user find and filter for specific assets.",
Expand Down Expand Up @@ -396,6 +407,7 @@
"gui.destiny.village_snowy": "Snowy Village",
"gui.destiny.village_plains": "Plains Village",
"gui.destiny.village_savanna": "Savanna Village",
"gui.destiny.ancient_city": "Ancient City",
"destiny.story.reason/1": "One day, you had enough and decided on a journey to explore the world.",
"destiny.story.travelling/1": "You conquered snowy mountains and muggy swamps, Avoiding Husks in the endless deserts.",
"destiny.story.somewhere/1": "You are stranded without food and shelter in the middle of nowhere.",
Expand All @@ -406,15 +418,14 @@
"destiny.story.village_snowy/1": "You fight your way through a heavy snowstorm when you see dim lights up ahead. It is a village, maybe they have an inn to warm up?",
"destiny.story.village_plains/1": "In the middle of a plains biome, a few villagers built themselves a settlement. The climate is moderate, the people friendly, perhaps they have place for another settler?",
"destiny.story.village_savanna/1": "Finally you find a village between dry trees and grass. Let's see if they are friendly!",
"destiny.story.ancient_city/1": "But an unfortunate misstep sends you tumbling into a deep, dark cave. When you regain consciousness, you find yourself surrounded by the ancient ruins of a city forgotten by the world for eons.",
"gui.blueprint.taxes": "Taxes",
"gui.blueprint.birth": "Birth limit",
"gui.blueprint.marriage": "Marriage limit",
"gui.blueprint.guards": "Guards",
"gui.blueprint.rankTooLow": "You need a higher rank.",
"gui.blueprint.currentRank": "Rank: %1$s",
"gui.blueprint.reputation": "Hearts: %1$s",
"gui.blueprint.size": "Size: %1$s blocks",
"gui.blueprint.anySize": "Size: any",
"gui.blueprint.buildings": "Buildings: %1$s",
"gui.blueprint.population": "Population: %1$s of %2$s",
"gui.blueprint.map": "Map",
Expand Down
Loading

0 comments on commit ee23d03

Please sign in to comment.