diff --git a/gradle.properties b/gradle.properties index 988e521..8fb993c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -34,7 +34,7 @@ mod_name=Power Tool # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPL-3.0 # The mod version. See https://semver.org/ -mod_version=1.4.41 +mod_version=1.4.42 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/org/teacon/powertool/block/DistantHorizonCheatingBlock.java b/src/main/java/org/teacon/powertool/block/DistantHorizonCheatingBlock.java index 8993691..bc2a4f5 100644 --- a/src/main/java/org/teacon/powertool/block/DistantHorizonCheatingBlock.java +++ b/src/main/java/org/teacon/powertool/block/DistantHorizonCheatingBlock.java @@ -2,11 +2,16 @@ import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import javax.annotation.ParametersAreNonnullByDefault; +import java.util.List; @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault @@ -21,5 +26,9 @@ protected float getShadeBrightness(BlockState state, BlockGetter level, BlockPos return 1f; } - + @Override + public void appendHoverText(ItemStack stack, Item.TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { + super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); + tooltipComponents.add(Component.translatable("tooltip.powertool.distant_horizon_cheating_block")); + } } diff --git a/src/main/resources/assets/powertool/lang/en_us.json b/src/main/resources/assets/powertool/lang/en_us.json index f63d053..e6cae22 100644 --- a/src/main/resources/assets/powertool/lang/en_us.json +++ b/src/main/resources/assets/powertool/lang/en_us.json @@ -69,6 +69,31 @@ "block.powertool.observer_realtime_cyl": "Realtime Cycle Observer", "block.powertool.observer_gametime_cyl": "Gametime Cycle Observer", "block.powertool.delayer": "Delayer", + "block.powertool.bezier_curve_block": "Bezier Curve Block", + "block.powertool.white_distant_horizon_cheating_block": "White \"Distant Horizon\" Cheating Block", + "block.powertool.orange_distant_horizon_cheating_block": "Orange \"Distant Horizon\" Cheating Block", + "block.powertool.magenta_distant_horizon_cheating_block": "Magenta \"Distant Horizon\" Cheating Block", + "block.powertool.light_blue_distant_horizon_cheating_block": "Light Blue \"Distant Horizon\" Cheating Block", + "block.powertool.yellow_distant_horizon_cheating_block": "Yellow \"Distant Horizon\" Cheating Block", + "block.powertool.lime_distant_horizon_cheating_block": "Lime \"Distant Horizon\" Cheating Block", + "block.powertool.pink_distant_horizon_cheating_block": "Pink \"Distant Horizon\" Cheating Block", + "block.powertool.gray_distant_horizon_cheating_block": "Gray \"Distant Horizon\" Cheating Block", + "block.powertool.light_gray_distant_horizon_cheating_block": "Light Gray \"Distant Horizon\" Cheating Block", + "block.powertool.cyan_distant_horizon_cheating_block": "Cyan \"Distant Horizon\" Cheating Block", + "block.powertool.purple_distant_horizon_cheating_block": "Purple \"Distant Horizon\" Cheating Block", + "block.powertool.blue_distant_horizon_cheating_block": "Blue \"Distant Horizon\" Cheating Block", + "block.powertool.brown_distant_horizon_cheating_block": "Brown \"Distant Horizon\" Cheating Block", + "block.powertool.green_distant_horizon_cheating_block": "Green \"Distant Horizon\" Cheating Block", + "block.powertool.red_distant_horizon_cheating_block": "Red \"Distant Horizon\" Cheating Block", + "block.powertool.black_distant_horizon_cheating_block": "Black \"Distant Horizon\" Cheating Block", + "block.powertool.cosmetic_smoker": "Smoker(Cosmetic)", + "block.powertool.cosmetic_cartography_table": "Cartography Table(Cosmetic)", + "block.powertool.cosmetic_crafting_table": "Crafting Table(Cosmetic)", + "block.powertool.cosmetic_fletching_table": "Fletching Table(Cosmetic)", + "block.powertool.cosmetic_smithing_table": "Smithing Talbe(Cosmetic)", + "block.powertool.cosmetic_beacon": "Beacon(Cosmetic)", + "block.powertool.cosmetic_enchanting_table": "Enchanting Table(Cosmetic)", + "block.powertool.cosmetic_stonecutter": "StoneCutter(Cosmetic)", "item.powertool.useless_stick": "Seemingly Useless Stick", "item.powertool.clap": "Clap", "item.powertool.clap_but_sad": "Sad Clap", @@ -91,7 +116,8 @@ "item.powertool.auto_vanish_bamboo_boat": "Auto Vanish Bamboo Boat", "item.powertool.auto_vanish_minecart": "Auto Vanish Minecart", "item.powertool.display_mode_tool": "Display Mode Tool", - + "item.powertool.static_mode_tool": "Static Mode Tool", + "item.powertool.texture_extractor": "Texture Extractor", "entity.powertool.fence_knot": "Knot On Fence", "entity.powertool.fence_knot.tooltip": "Like vanilla leash, but between fences", @@ -177,5 +203,6 @@ "powertool.gui.bezier_curve.use_world_coordinate.tooltip": "Determines whether control points represent relative or absolute(world) coordinates.", "powertool.gui.examine_holo_glass.warn": "Calculated independently relative to the left side.", "powertool.gui.static_mode_enabled": "Enabled static mode on %s", - "powertool.gui.static_mode_disabled": "Disabled static mode on %s" + "powertool.gui.static_mode_disabled": "Disabled static mode on %s", + "tooltip.powertool.distant_horizon_cheating_block": "Normally this block is invisible. If installed \"Distant Horizon\" mod,then this block will be displayed as the corresponding color in the LOD." } \ No newline at end of file diff --git a/src/main/resources/assets/powertool/lang/zh_cn.json b/src/main/resources/assets/powertool/lang/zh_cn.json index 732b8a8..2481b33 100644 --- a/src/main/resources/assets/powertool/lang/zh_cn.json +++ b/src/main/resources/assets/powertool/lang/zh_cn.json @@ -120,6 +120,31 @@ "block.powertool.observer_realtime_cyl": "现实日循环侦测器", "block.powertool.observer_gametime_cyl": "游戏日循环侦测器", "block.powertool.delayer": "延时器", + "block.powertool.bezier_curve_block": "贝塞尔曲线方块", + "block.powertool.white_distant_horizon_cheating_block": "白色 \"遥远的地平线\" 欺骗方块", + "block.powertool.orange_distant_horizon_cheating_block": "橙色 \"遥远的地平线\" 欺骗方块", + "block.powertool.magenta_distant_horizon_cheating_block": "品红色 \"遥远的地平线\" 欺骗方块", + "block.powertool.light_blue_distant_horizon_cheating_block": "淡蓝色 \"遥远的地平线\" 欺骗方块", + "block.powertool.yellow_distant_horizon_cheating_block": "黄色 \"遥远的地平线\" 欺骗方块", + "block.powertool.lime_distant_horizon_cheating_block": "黄绿色 \"遥远的地平线\" 欺骗方块", + "block.powertool.pink_distant_horizon_cheating_block": "粉色 \"遥远的地平线\" 欺骗方块", + "block.powertool.gray_distant_horizon_cheating_block": "灰色 \"遥远的地平线\" 欺骗方块", + "block.powertool.light_gray_distant_horizon_cheating_block": "淡灰色 \"遥远的地平线\" 欺骗方块", + "block.powertool.cyan_distant_horizon_cheating_block": "青色 \"遥远的地平线\" 欺骗方块", + "block.powertool.purple_distant_horizon_cheating_block": "紫色 \"遥远的地平线\" 欺骗方块", + "block.powertool.blue_distant_horizon_cheating_block": "蓝色 \"遥远的地平线\" 欺骗方块", + "block.powertool.brown_distant_horizon_cheating_block": "棕色 \"遥远的地平线\" 欺骗方块", + "block.powertool.green_distant_horizon_cheating_block": "绿色 \"遥远的地平线\" 欺骗方块", + "block.powertool.red_distant_horizon_cheating_block": "红色 \"遥远的地平线\" 欺骗方块", + "block.powertool.black_distant_horizon_cheating_block": "黑色 \"遥远的地平线\" 欺骗方块", + "block.powertool.cosmetic_smoker": "烟熏炉(装饰品)", + "block.powertool.cosmetic_cartography_table": "制图台(装饰品)", + "block.powertool.cosmetic_crafting_table": "工作台(装饰品)", + "block.powertool.cosmetic_fletching_table": "制箭台(装饰品)", + "block.powertool.cosmetic_smithing_table": "锻造台(装饰品)", + "block.powertool.cosmetic_beacon": "信标(装饰品)", + "block.powertool.cosmetic_enchanting_table": "附魔台(装饰品)", + "block.powertool.cosmetic_stonecutter": "切石机(装饰品)", "item.powertool.examine_holo_glass": "全息透视眼镜", "item.powertool.command_rune": "命令碎片", "item.powertool.tonk": "\"绳拴\"", @@ -135,6 +160,8 @@ "item.powertool.auto_vanish_mangrove_boat": "自动消失红木船", "item.powertool.auto_vanish_bamboo_boat": "自动消失竹筏", "item.powertool.auto_vanish_minecart": "自动消失矿车", + "item.powertool.static_mode_tool": "静态模式工具", + "item.powertool.texture_extractor": "材质提取器", "powertool.gametime_cycle_observer.gui": "游戏日循环侦测器", "powertool.realtime_cycle_observer.gui": "现实日循环侦测器", @@ -144,8 +171,8 @@ "powertool.gui.button.local_time": "设置时区为本地时区", "itemGroup.powertool.cosmetic": "PowerTool: 装饰方块", - "tooltip.powertool.static_tool": "在方块上使用以切换静态模式", - "tooltip.powertool.display_tool": "在方块上使用以切换展示模式", + "tooltip.powertool.static_tool": "在方块上使用以切换静态模式(禁止左键或右键方块)", + "tooltip.powertool.display_tool": "在方块上使用以切换展示模式(禁止操作打开的GUI)", "powertool.gui.display_mode_enabled": "已在%s上启用展示模式", "powertool.gui.display_mode_disabled": "已在%s上禁用展示模式", "powertool.gui.display_mode_error": "无法在%s上启用展示模式,因为它无法打开任何可交互界面.按下shift键强制启用展示模式.", @@ -178,5 +205,6 @@ "powertool.gui.bezier_curve.use_world_coordinate.tooltip": "决定控制点代表相对坐标还是绝对(世界)坐标.", "powertool.gui.examine_holo_glass.warn": "相对左侧独立计算.", "powertool.gui.static_mode_enabled": "已在%s上启用静态模式", - "powertool.gui.static_mode_disabled": "已在%s上禁用静态模式" + "powertool.gui.static_mode_disabled": "已在%s上禁用静态模式", + "tooltip.powertool.distant_horizon_cheating_block": "正常情况下此方块透明. 如果安装了\"遥远的地平线\"模组,则此方块会在LOD中显示为对应颜色." } \ No newline at end of file diff --git a/src/main/resources/assets/powertool/models/item/static_mode_tool.json b/src/main/resources/assets/powertool/models/item/static_mode_tool.json new file mode 100644 index 0000000..746a297 --- /dev/null +++ b/src/main/resources/assets/powertool/models/item/static_mode_tool.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "powertool:item/static_mode_tool" + } +} \ No newline at end of file