Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Mar 2, 2024
1 parent ea6d788 commit a8da34a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
maven-group = "net.krlite"
archives-name = "reicollapsibleentries"
mod = "3.0.0"
mod = "3.0.1"

minecraft = "1.20"
yarn = "1.20+build.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ public int run(CommandContext<FabricClientCommandSource> context) {
ItemStack stack = context.getSource().getPlayer().getMainHandStack();
Identifier itemId = Registries.ITEM.getId(stack.getItem());

if (stack.isOf(Items.AIR))
return 0;
if (stack.isOf(Items.AIR)) return 0;
long size = stack.getItem().getRegistryEntry().streamTags().count();

if (stack.getItem().getRegistryEntry().streamTags().findAny().isPresent()) {
context.getSource().sendFeedback(Text.translatable(
size == 0 ? "tagged.none" : size == 1 ? "tagged.only" : "tagged.more",
stack.toHoverableText()
));

if (size > 0) {
context.getSource().sendFeedback(streamTags(stack));
} else context.getSource().sendFeedback(Text.translatable("tagged.none"));
}

return SINGLE_SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"comment_tag": "Tags",

"tagged.#": "#",
"tagged.none": "§7Empty Tag",

"tagged.only": "%s §7has the following tag:",
"tagged.more": "%s §7has the following tags:",
"tagged.none": "%s §7has no tag",

"tagged.c.shulker_boxes": "Shulker Boxes",
"tagged.c.ores" : "Ores",
Expand Down Expand Up @@ -47,6 +50,9 @@

"tagged.catwalksinc.filled_paint_rolls": "§6Filled Paint Rollers",

"tagged.create.toolboxes": "Toolboxes",
"tagged.create.seats" : "Seats",

"tagged.create.stone_types/veridium" : "Veridiums",
"tagged.create.stone_types/scorchia" : "Scorchias",
"tagged.create.stone_types/scoria" : "Scorias",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

"comment_tag": "标签",

"tagged.none": "§7空标签",
"tagged.only": "%s§7有以下标签:",
"tagged.more": "%s§7有以下标签:",
"tagged.none": "%s§7没有标签",

"tagged.c.shulker_boxes": "潜影盒",
"tagged.c.ores" : "矿物",
Expand Down Expand Up @@ -49,6 +51,9 @@

"tagged.catwalksinc.filled_paint_rolls": "§6油漆滚筒",

"tagged.create.toolboxes": "工具箱",
"tagged.create.seats" : "座垫",

"tagged.create.stone_types/veridium" : "辉绿岩系",
"tagged.create.stone_types/scorchia" : "焦黑熔渣岩系",
"tagged.create.stone_types/scoria" : "熔渣岩系",
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"mixins": [
"reicollapsibleentries.mixins.json"
],
"accessWidener": "reicollapsibleentries.accesswidener",

"depends": {
"fabricloader": "*",
Expand Down

0 comments on commit a8da34a

Please sign in to comment.