content: package com.alrex.parcool.mixin.client;
  
  import com.alrex.parcool.common.action.impl.HideInBlock;
  import com.alrex.parcool.common.capability.Parkourability;
  import net.minecraft.block.BlockState;
  import net.minecraft.client.Minecraft;
  import net.minecraft.client.entity.player.ClientPlayerEntity;
  import net.minecraft.client.world.ClientWorld;
  import net.minecraft.profiler.IProfiler;
  import net.minecraft.util.RegistryKey;
  import net.minecraft.util.math.BlockPos;
  import net.minecraft.world.DimensionType;
  import net.minecraft.world.World;
  import net.minecraft.world.storage.ISpawnWorldInfo;
  import org.spongepowered.asm.mixin.Mixin;
  import org.spongepowered.asm.mixin.injection.At;
  import org.spongepowered.asm.mixin.injection.Inject;
  import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
  
  import java.util.function.Supplier;
  
  @Mixin(ClientWorld.class)
  public abstract class ClientWorldMixin extends World {
      protected ClientWorldMixin(ISpawnWorldInfo p_i241925_1_, RegistryKey<World> p_i241925_2_, DimensionType p_i241925_3_, Supplier<IProfiler> p_i241925_4_, boolean p_i241925_5_, boolean p_i241925_6_, long p_i241925_7_) {
          super(p_i241925_1_, p_i241925_2_, p_i241925_3_, p_i241925_4_, p_i241925_5_, p_i241925_6_, p_i241925_7_);
      }
  
      @Inject(method = "setBlocksDirty", at = @At("TAIL"))
      public void onSetBlocksDirty(BlockPos pos, BlockState oldState, BlockState newState, CallbackInfo ci) {
          ClientPlayerEntity player = Minecraft.getInstance().player;
          if (player == null) return;
          Parkourability parkourability = Parkourability.get(player);
          if (parkourability == null) return;
          parkourability.get(HideInBlock.class).notifyBlockChanged(pos);
      }
  }
  