package com.example.addon.mixin; import net.minecraft.client.network.PendingUpdateManager; import net.minecraft.client.world.ClientWorld; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Invoker; /** * Reaches the client's prediction bookkeeping, which is package-private. * *

A packet-triggered rebreak fires while the position still reads as air locally — that air is * our own prediction of the previous break — even though the server has just put a block back * there. Predicting another break would otherwise record "the server has air here", so a rebreak * the server rejects would roll back to air and leave a hole that isn't there. * Recording the replacement first makes the rollback restore the real block. */ @Mixin(ClientWorld.class) public interface ClientWorldAccessor { @Invoker("getPendingUpdateManager") PendingUpdateManager quinn$getPendingUpdateManager(); }