Fixed getToolModifiedState for AXE_SCRAPE (#10881)

This commit is contained in:
coolsim authored and GitHub committed 2026-08-26 18:24:54 -07:00
1 parent b1008b481b
commit d5d1e3157d
1 file changed
+1 -1
@@ -25,7 +25,7 @@
return strippedBlock;
} else {
- Optional<BlockState> scrapedBlock = WeatheringCopper.getPrevious(oldState);
+ var scrape = ctx == null ? null : oldState.getToolModifiedState(ctx, net.minecraftforge.common.ToolActions.AXE_STRIP, false);
+ var scrape = ctx == null ? null : oldState.getToolModifiedState(ctx, net.minecraftforge.common.ToolActions.AXE_SCRAPE, false);
+ Optional<BlockState> scrapedBlock = scrape != null ? Optional.of(scrape) : WeatheringCopper.getPrevious(oldState);
if (scrapedBlock.isPresent()) {
spawnSoundAndParticle(level, pos, player, oldState, SoundEvents.AXE_SCRAPE, 3005);