Skip to content

Commit ede87c9

Browse files
committed
レビュー対応
1 parent 84c9ddc commit ede87c9

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/main/java/com/github/gtexpert/gtmt/integration/tic/materials/ToolMaterialRegistrar.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ private static void registerHarvestLevelNames() {
239239
// Override TiC's native names (0–4) with vanilla/GT naming convention
240240
// so that the same harvest level shows the same name in both GT and TiC tooltips.
241241
java.util.Map<Integer, String> ticNames = slimeknights.tconstruct.library.utils.HarvestLevels.harvestLevelNames;
242-
ticNames.put(0, TextFormatting.DARK_GREEN + "Wood");
243-
ticNames.put(1, TextFormatting.GRAY + "Stone");
244-
ticNames.put(2, TextFormatting.WHITE + "Iron");
242+
ticNames.put(0, TextFormatting.GOLD + "Wood");
243+
ticNames.put(1, TextFormatting.DARK_GRAY + "Stone");
244+
ticNames.put(2, TextFormatting.GRAY + "Iron");
245245
ticNames.put(3, TextFormatting.AQUA + "Diamond");
246246
// Level 4 (Cobalt) — no vanilla equivalent, keep TiC's name
247247

src/main/java/com/github/gtexpert/gtmt/mixins/tic/MixinForgeHooks.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@
2626
@Mixin(value = ForgeHooks.class, remap = false)
2727
public class MixinForgeHooks {
2828

29-
@Inject(method = "canHarvestBlock", at = @At("RETURN"), cancellable = true)
29+
@Inject(method = "canHarvestBlock(Lnet/minecraft/block/Block;Lnet/minecraft/entity/player/EntityPlayer;Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;)Z",
30+
at = @At("RETURN"),
31+
cancellable = true)
3032
private static void checkOffHandTool(Block block, EntityPlayer player, IBlockAccess world,
3133
BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
3234
if (Boolean.TRUE.equals(cir.getReturnValue())) return;
35+
if (pos == null) return;
3336

3437
ItemStack mainhand = player.getHeldItemMainhand();
3538
ItemStack offhand = player.getHeldItemOffhand();

0 commit comments

Comments
 (0)