예제 #1
0
        internal void ExchangeBlockAt(IWorldAccessor world, BlockPos pos)
        {
            world.BlockAccessor.ExchangeBlock(BlockId, pos);

            BlockEntity      be   = world.BlockAccessor.GetBlockEntity(pos);
            BEBehaviorMPBase bemp = be.GetBehavior <BEBehaviorMPBase>();

            bemp.Block = this;
            bemp.SetOrientations();
            bemp.Shape = Shape;
        }
예제 #2
0
        internal void ExchangeBlockAt(IWorldAccessor world, BlockPos pos)
        {
            world.BlockAccessor.ExchangeBlock(BlockId, pos);

            BlockEntity      be   = world.BlockAccessor.GetBlockEntity(pos);
            BEBehaviorMPBase bemp = be?.GetBehavior <BEBehaviorMPBase>();

            if (bemp != null)
            {
                bemp.SetOrientations();
                bemp.Shape = Shape;
                be.MarkDirty();
            }
        }