hschwar / AccurateBlockPlacement-Reborn

Makes block placement smarter by timing it for you.
https://modrinth.com/mod/accurate-block-placement-reborn
MIT License
10 stars 4 forks source link

weird fence behavior when mod is used along with Cut Through [1.20.4] #11

Closed TheRedstoneShark closed 1 day ago

TheRedstoneShark commented 5 months ago

Current behavior: when right-clicking to close fence with any item in your hand, the fence does not close, and if you're holding a block, the block is placed behind the fence.

Steps to reproduce:

  1. use these mods: accurate-block-placement-1.2.1, CutThrough-v20.4.2-1.20.4-Fabric, fabric-api-0.97.0+1.20.4, ForgeConfigAPIPort-v20.4.3-1.20.4-Fabric, PuzzlesLib-v20.4.43-1.20.4-Fabric
  2. place a fence and open it.
  3. hold an item in your hand and right click the fence to close it. OR
  4. hold a block in your hand and right click the fence to close it.

https://github.com/hschwar/AccurateBlockPlacement-Reborn/assets/67612434/c0317614-dda8-41dc-aad2-a2f4b5feb953

KadTheHunter commented 5 months ago

No idea if hschwar is still active, or if I'll ever follow up on this, but I'll put this here for future reference: Line 261 of GameRendererMixin.java appears to be related to this.

// don't override behavior of clicking activatable blocks (and stairs) unless holding SNEAKING to replicate vanilla behaviors
if(isTargetBlockActivatable && !(targetBlock instanceof StairsBlock) && !client.player.isSneaking()) {
    return;
}

Interestingly it seems like that should be preventing this very issue from happening, by handing control back to Vanilla if the target block is activatable, not a stair and you're not sneaking. I've also looked through CutThroughs source, specifically its GameRendererMixin file, and can't find anything there that would cause this.

For now I recommend binding a key to toggle ABPs placement mode, so you can swap back to Vanilla handling when needed.

KadTheHunter commented 1 day ago

@TheRedstoneShark Managed to fix this accidentally when working on the 1.21.3 update; Unfortunately couldn't bundle the two together for Reasons™, so am releasing v1.2.6 with this fix added, and then v1.2.7 for MC 1.21.3

Apologies for the ~6 month wait.