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.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.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; } }