16 lines
520 B
C#
16 lines
520 B
C#
namespace Harmony.BlockSiblingRemovePatches
|
|
{
|
|
[HarmonyPatch(typeof(BlockSiblingRemove))]
|
|
[HarmonyPatch("OnBlockRemoved")]
|
|
public class OnBlockRemovedPatch
|
|
{
|
|
public static void Postfix(BlockSiblingRemove __instance, WorldBase _world, Chunk _chunk, Vector3i _blockPos, BlockValue _blockValue)
|
|
{
|
|
if (RebirthVariables.chunkObserver != null)
|
|
{
|
|
GameManager.Instance.RemoveChunkObserver(RebirthVariables.chunkObserver);
|
|
}
|
|
}
|
|
}
|
|
}
|