Files
7d2dXG/Mods/zzz_REBIRTH__Utils/Scripts/Blocks/Inactive/BlockClearModelsRebirth.cs
Nathaniel Cosford 062dfab2cd Patched
2025-05-30 01:04:40 +09:30

31 lines
1.3 KiB
C#

using Platform;
using System;
using System.Collections.Generic;
using UnityEngine;
public class BlockClearModelsRebirth : Block
{
public override void OnBlockAdded(WorldBase _world, Chunk _chunk, Vector3i _blockPos, BlockValue _blockValue)
{
base.OnBlockAdded(_world, _chunk, _blockPos, _blockValue);
if (!SingletonMonoBehaviour<ConnectionManager>.Instance.IsServer) return;
if (GameManager.Instance.IsEditMode()) return;
_world.GetWBT().AddScheduledBlockUpdate(_chunk.ClrIdx, _blockPos, blockID, (ulong)20UL);
}
public override bool UpdateTick(WorldBase _world, int _clrIdx, Vector3i _blockPos, BlockValue _blockValue, bool _bRandomTick, ulong _ticksIfLoaded, GameRandom _rnd)
{
if (SingletonMonoBehaviour<ConnectionManager>.Instance.IsServer)
{
RebirthUtilities.DestroyBlock(_world, _blockPos, 25, 50, "FuriousRamsaySpawn");
RebirthUtilities.DestroyBlock(_world, _blockPos, 25, 50, "FuriousRamsayEntityMonitorBlock");
RebirthUtilities.DestroyBlock(_world, _blockPos, 25, 50, "FuriousRamsayAnimalChicken");
this.DamageBlock(GameManager.Instance.World, 0, _blockPos, _blockValue, Block.list[_blockValue.type].MaxDamage, -1, null, false, false);
}
return true;
}
}